17 #ifndef __NUGU_ROUTINE_MANAGER_INTERFACE_H__
18 #define __NUGU_ROUTINE_MANAGER_INTERFACE_H__
21 #include <njson/njson.h>
26 namespace NuguClientKit {
78 using TextRequester = std::function<std::string(
const std::string&,
const std::string&,
const std::string&)>;
79 using DataRequester = std::function<std::string(
const std::string&,
const NJson::Value&)>;
113 virtual bool start(
const std::string& token,
const NJson::Value& actions) = 0;
137 virtual bool move(
unsigned int index) = 0;
IRoutineManagerListener interface.
Definition: routine_manager_interface.hh:55
virtual void onActionTimeout(bool last_action=false)=0
Receive callback when the action timeout is ended.
virtual void onActivity(RoutineActivity activity)=0
Receive callback when the routine activity state is changed.
IRoutineManager interface.
Definition: routine_manager_interface.hh:76
virtual void interrupt()=0
Interrupt routine.
virtual bool isActionProgress(const std::string &dialog_id)=0
Check whether action is in progress currently.
virtual void setTextRequester(TextRequester requester)=0
Set TextRequester delegate for handling text type action.
virtual void setDataRequester(DataRequester requester)=0
Set DataRequester delegate for handling data type action.
virtual void presetActionTimeout()=0
Set default time (5 sec) when action timeout is not set.
virtual bool move(unsigned int index)=0
Move to the specific action and process.
virtual void resume()=0
Resume routine.
virtual void setPendingStop(const NuguDirective *ndir)=0
Set pending stop after checking whether Routine.Stop directive exists.
virtual bool hasRoutineDirective(const NuguDirective *ndir)=0
Check whether routine directive exist in NuguDirective.
virtual bool isRoutineProgress()=0
Check whether routine is in progress currently.
virtual void stop()=0
Stop routine.
virtual bool isConditionToCancel(const NuguDirective *ndir)=0
Check whether current condition is to cancel directive.
virtual bool start(const std::string &token, const NJson::Value &actions)=0
Start routine.
virtual bool isActionValid(const NJson::Value &action)=0
Check whether the action is valid.
virtual bool isMuteDelayed()=0
Check whether mute delay is processed.
virtual void addListener(IRoutineManagerListener *listener)=0
Add IRoutineManagerListener.
virtual unsigned int getCountableActionIndex()=0
Get index of current countable action.
virtual std::string getCurrentActionToken()=0
Get token of current active action.
virtual void finish()=0
Finish action.
virtual bool isRoutineAlive()=0
Check whether routine has remained action to execute.
virtual unsigned int getCurrentActionIndex()=0
Get index of current active action.
virtual bool isConditionToStop(const NuguDirective *ndir)=0
Check whether current condition is to stop routine.
virtual bool hasToSkipMedia(const std::string &dialog_id)=0
Check whether current condition should skip media play.
virtual bool isConditionToFinishAction(const NuguDirective *ndir)=0
Check whether current condition is possible to finish progressing action.
virtual void removeListener(IRoutineManagerListener *listener)=0
Remove IRoutineManagerListener.
virtual unsigned int getCountableActionSize()=0
Get size of countable actions.
struct _nugu_directive NuguDirective
Directive object.
Definition: nugu_directive.h:48
RoutineActivity
Routine Activity list.
Definition: routine_manager_interface.hh:42