NUGU SDK Linux  1.7.5
NuguClientKit::IRoutineManager Class Referenceabstract

IRoutineManager interface. More...

#include <routine_manager_interface.hh>

Public Types

using DataRequester = std::function< std::string(const std::string &, const NJson::Value &)>
 
using TextRequester = std::function< std::string(const std::string &, const std::string &, const std::string &)>
 

Public Member Functions

virtual void addListener (IRoutineManagerListener *listener)=0
 Add IRoutineManagerListener. More...
 
virtual void finish ()=0
 Finish action.
 
virtual unsigned int getCountableActionIndex ()=0
 Get index of current countable action. More...
 
virtual unsigned int getCountableActionSize ()=0
 Get size of countable actions. More...
 
virtual unsigned int getCurrentActionIndex ()=0
 Get index of current active action. More...
 
virtual std::string getCurrentActionToken ()=0
 Get token of current active action. More...
 
virtual bool hasRoutineDirective (const NuguDirective *ndir)=0
 Check whether routine directive exist in NuguDirective. More...
 
virtual bool hasToSkipMedia (const std::string &dialog_id)=0
 Check whether current condition should skip media play. More...
 
virtual void interrupt ()=0
 Interrupt routine.
 
virtual bool isActionProgress (const std::string &dialog_id)=0
 Check whether action is in progress currently. More...
 
virtual bool isActionValid (const NJson::Value &action)=0
 Check whether the action is valid. More...
 
virtual bool isConditionToCancel (const NuguDirective *ndir)=0
 Check whether current condition is to cancel directive. More...
 
virtual bool isConditionToFinishAction (const NuguDirective *ndir)=0
 Check whether current condition is possible to finish progressing action. More...
 
virtual bool isConditionToStop (const NuguDirective *ndir)=0
 Check whether current condition is to stop routine. More...
 
virtual bool isMuteDelayed ()=0
 Check whether mute delay is processed. More...
 
virtual bool isRoutineAlive ()=0
 Check whether routine has remained action to execute. More...
 
virtual bool isRoutineProgress ()=0
 Check whether routine is in progress currently. More...
 
virtual bool move (unsigned int index)=0
 Move to the specific action and process. More...
 
virtual void presetActionTimeout ()=0
 Set default time (5 sec) when action timeout is not set.
 
virtual void removeListener (IRoutineManagerListener *listener)=0
 Remove IRoutineManagerListener. More...
 
virtual void resume ()=0
 Resume routine.
 
virtual void setDataRequester (DataRequester requester)=0
 Set DataRequester delegate for handling data type action. More...
 
virtual void setPendingStop (const NuguDirective *ndir)=0
 Set pending stop after checking whether Routine.Stop directive exists. More...
 
virtual void setTextRequester (TextRequester requester)=0
 Set TextRequester delegate for handling text type action. More...
 
virtual bool start (const std::string &token, const NJson::Value &actions)=0
 Start routine. More...
 
virtual void stop ()=0
 Stop routine.
 

Detailed Description

Member Function Documentation

◆ addListener()

virtual void NuguClientKit::IRoutineManager::addListener ( IRoutineManagerListener listener)
pure virtual

Add IRoutineManagerListener.

Parameters
[in]listenerIRoutineManagerListener instance

◆ removeListener()

virtual void NuguClientKit::IRoutineManager::removeListener ( IRoutineManagerListener listener)
pure virtual

Remove IRoutineManagerListener.

Parameters
[in]listenerIRoutineManagerListener instance

◆ setTextRequester()

virtual void NuguClientKit::IRoutineManager::setTextRequester ( TextRequester  requester)
pure virtual

Set TextRequester delegate for handling text type action.

Parameters
[in]requesterTextRequester delegate

◆ setDataRequester()

virtual void NuguClientKit::IRoutineManager::setDataRequester ( DataRequester  requester)
pure virtual

Set DataRequester delegate for handling data type action.

Parameters
[in]requesterDataRequester delegate

◆ start()

virtual bool NuguClientKit::IRoutineManager::start ( const std::string &  token,
const NJson::Value &  actions 
)
pure virtual

Start routine.

Parameters
[in]tokentoken which is delivered from routine play
[in]actionsaction list

◆ move()

virtual bool NuguClientKit::IRoutineManager::move ( unsigned int  index)
pure virtual

Move to the specific action and process.

Parameters
[in]indexaction index
Returns
Result of operation
Return values
truesucceed to move and process
falsefail to move and process

◆ getCurrentActionToken()

virtual std::string NuguClientKit::IRoutineManager::getCurrentActionToken ( )
pure virtual

Get token of current active action.

Returns
token of current active action

◆ getCurrentActionIndex()

virtual unsigned int NuguClientKit::IRoutineManager::getCurrentActionIndex ( )
pure virtual

Get index of current active action.

Returns
index of current active action

◆ getCountableActionSize()

virtual unsigned int NuguClientKit::IRoutineManager::getCountableActionSize ( )
pure virtual

Get size of countable actions.

Returns
size of countable actions.

◆ getCountableActionIndex()

virtual unsigned int NuguClientKit::IRoutineManager::getCountableActionIndex ( )
pure virtual

Get index of current countable action.

Returns
index of current active countable action

◆ isActionValid()

virtual bool NuguClientKit::IRoutineManager::isActionValid ( const NJson::Value &  action)
pure virtual

Check whether the action is valid.

Returns
true if valid, otherwise false

◆ isRoutineProgress()

virtual bool NuguClientKit::IRoutineManager::isRoutineProgress ( )
pure virtual

Check whether routine is in progress currently.

Returns
true if in progress, otherwise false

◆ isRoutineAlive()

virtual bool NuguClientKit::IRoutineManager::isRoutineAlive ( )
pure virtual

Check whether routine has remained action to execute.

Returns
true if has action, otherwise false

◆ isActionProgress()

virtual bool NuguClientKit::IRoutineManager::isActionProgress ( const std::string &  dialog_id)
pure virtual

Check whether action is in progress currently.

Parameters
[in]dialog_iddialog id of action
Returns
true if in progress, otherwise false

◆ hasRoutineDirective()

virtual bool NuguClientKit::IRoutineManager::hasRoutineDirective ( const NuguDirective ndir)
pure virtual

Check whether routine directive exist in NuguDirective.

Parameters
[in]ndirNuguDirective object
Returns
true if exist, otherwise false

◆ isConditionToStop()

virtual bool NuguClientKit::IRoutineManager::isConditionToStop ( const NuguDirective ndir)
pure virtual

Check whether current condition is to stop routine.

Parameters
[in]ndirNuguDirective object
Returns
true if satisfied, otherwise false

◆ isConditionToFinishAction()

virtual bool NuguClientKit::IRoutineManager::isConditionToFinishAction ( const NuguDirective ndir)
pure virtual

Check whether current condition is possible to finish progressing action.

Parameters
[in]ndirNuguDirective object
Returns
true if satisfied, otherwise false

◆ isConditionToCancel()

virtual bool NuguClientKit::IRoutineManager::isConditionToCancel ( const NuguDirective ndir)
pure virtual

Check whether current condition is to cancel directive.

Parameters
[in]ndirNuguDirective object
Returns
true if satisfied, otherwise false

◆ isMuteDelayed()

virtual bool NuguClientKit::IRoutineManager::isMuteDelayed ( )
pure virtual

Check whether mute delay is processed.

Returns
Result of status
Return values
truein progress
falsenot in progress

◆ setPendingStop()

virtual void NuguClientKit::IRoutineManager::setPendingStop ( const NuguDirective ndir)
pure virtual

Set pending stop after checking whether Routine.Stop directive exists.

Parameters
[in]ndirNuguDirective object

◆ hasToSkipMedia()

virtual bool NuguClientKit::IRoutineManager::hasToSkipMedia ( const std::string &  dialog_id)
pure virtual

Check whether current condition should skip media play.

Parameters
[in]dialog_iddialog id
Returns
Whether to skip media play
Return values
trueskip
falsenot skip

The documentation for this class was generated from the following file: