17 #ifndef __NUGU_CAPABILITY_INTERFACE_H__
18 #define __NUGU_CAPABILITY_INTERFACE_H__
22 #include <njson/njson.h>
30 namespace NuguClientKit {
100 using EventResultCallback = std::function<void(
const std::string&,
const std::string&,
const std::string&,
int,
int)>;
215 virtual bool receiveCommand(
const std::string& from,
const std::string& command,
const std::string& param) = 0;
232 virtual bool getProperty(
const std::string& property, std::string& value) = 0;
242 virtual bool getProperties(
const std::string& property, std::list<std::string>& values) = 0;
capability interface
Definition: capability_interface.hh:82
virtual void deInitialize()=0
Deinitialize the current object.
virtual void updateInfoForContext(NJson::Value &ctx)=0
Update the current context information of the capability agent.
SuspendPolicy
Capability suspend policy.
Definition: capability_interface.hh:87
virtual void notifyEventResult(const std::string &event_desc)=0
Notify event result.
virtual void preprocessDirective(NuguDirective *ndir)=0
Receive a directive preprocessing request from Directive sequencer.
virtual void processDirective(NuguDirective *ndir)=0
Receive a directive processing request from Directive sequencer.
virtual void setCancelPolicy(bool cancel_previous_dialog, DirectiveCancelPolicy &&cancel_policy={ true })=0
Set directive cancel policy.
virtual void initialize()=0
Initialize the current object.
virtual void updateCompactContext(NJson::Value &ctx)=0
Update the compact context information of the capability agent.
virtual std::string getVersion()=0
Get the capability version of the current object.
virtual bool getProperty(const std::string &property, std::string &value)=0
It is possible to share own property value among objects.
virtual void notifyEventResponse(const std::string &msg_id, const std::string &data, bool success)=0
Notify event response info.
std::function< void(const std::string &, const std::string &, const std::string &, int, int)> EventResultCallback
Event result callback for error handling.
Definition: capability_interface.hh:100
virtual bool getProperties(const std::string &property, std::list< std::string > &values)=0
It is possible to share own property values among objects.
virtual void cancelDirective(NuguDirective *ndir)=0
Receive a directive cancellation from the Directive sequencer.
virtual void removeEventResultCallback(const std::string &ename)=0
Remove event result callback.
virtual void setSuspendPolicy(SuspendPolicy policy=SuspendPolicy::STOP)=0
Set capability suspend policy.
virtual void receiveCommandAll(const std::string &command, const std::string ¶m)=0
Process command received from capability manager.
virtual void setCapabilityListener(ICapabilityListener *clistener)=0
Set the listener object.
virtual bool receiveCommand(const std::string &from, const std::string &command, const std::string ¶m)=0
Process command from other objects.
virtual void restore()=0
Restore previous suspended action.
virtual void suspend()=0
Suspend current action.
virtual void addEventResultCallback(const std::string &ename, EventResultCallback callback)=0
Add event result callback for error handling.
virtual std::string getName()=0
Get the capability name of the current object.
virtual void setNuguCoreContainer(INuguCoreContainer *core_container)=0
Set INuguCoreContainer for using functions in NuguCore.
capability listener interface
Definition: capability_interface.hh:60
virtual ICapabilityInterface * getCapabilityHandler()
Get capability interface object.
virtual void setCapabilityHandler(ICapabilityInterface *handler)
Set capability interface object.
NuguCoreContainer interface.
Definition: nugu_core_container_interface.hh:44
class NUGU_API ICapabilityInterface
capability interface
Definition: capability_interface.hh:54
struct NuguClientKit::_DirectiveCancelPolicy DirectiveCancelPolicy
Policy about canceling directives which are belong to the specific dialog id.
struct _nugu_directive NuguDirective
Directive object.
Definition: nugu_directive.h:48
Policy about canceling directives which are belong to the specific dialog id.
Definition: capability_interface.hh:46
bool cancel_all
Definition: capability_interface.hh:47
std::set< std::string > dir_groups
Definition: capability_interface.hh:48