|
NUGU SDK Linux
1.7.6
|
capability interface More...
#include <capability_interface.hh>
Inheritance diagram for NuguClientKit::ICapabilityInterface:Public Types | |
| using | EventResultCallback = std::function< void(const std::string &, const std::string &, const std::string &, int, int)> |
| Event result callback for error handling. More... | |
| enum class | SuspendPolicy { STOP , PAUSE } |
| Capability suspend policy. More... | |
Public Member Functions | |
| virtual void | addEventResultCallback (const std::string &ename, EventResultCallback callback)=0 |
| Add event result callback for error handling. More... | |
| virtual void | cancelDirective (NuguDirective *ndir)=0 |
| Receive a directive cancellation from the Directive sequencer. More... | |
| virtual void | deInitialize ()=0 |
| Deinitialize the current object. | |
| virtual std::string | getName ()=0 |
| Get the capability name of the current object. More... | |
| virtual bool | getProperties (const std::string &property, std::list< std::string > &values)=0 |
| It is possible to share own property values among objects. More... | |
| virtual bool | getProperty (const std::string &property, std::string &value)=0 |
| It is possible to share own property value among objects. More... | |
| virtual std::string | getVersion ()=0 |
| Get the capability version of the current object. More... | |
| virtual void | initialize ()=0 |
| Initialize the current object. | |
| virtual void | notifyEventResponse (const std::string &msg_id, const std::string &data, bool success)=0 |
| Notify event response info. More... | |
| virtual void | notifyEventResult (const std::string &event_desc)=0 |
| Notify event result. More... | |
| virtual void | preprocessDirective (NuguDirective *ndir)=0 |
| Receive a directive preprocessing request from Directive sequencer. More... | |
| virtual void | processDirective (NuguDirective *ndir)=0 |
| Receive a directive processing request from Directive sequencer. More... | |
| virtual bool | receiveCommand (const std::string &from, const std::string &command, const std::string ¶m)=0 |
| Process command from other objects. More... | |
| virtual void | receiveCommandAll (const std::string &command, const std::string ¶m)=0 |
| Process command received from capability manager. More... | |
| virtual void | removeEventResultCallback (const std::string &ename)=0 |
| Remove event result callback. More... | |
| virtual void | restore ()=0 |
| Restore previous suspended action. | |
| virtual void | setCancelPolicy (bool cancel_previous_dialog, DirectiveCancelPolicy &&cancel_policy={ true })=0 |
| Set directive cancel policy. More... | |
| virtual void | setCapabilityListener (ICapabilityListener *clistener)=0 |
| Set the listener object. More... | |
| virtual void | setNuguCoreContainer (INuguCoreContainer *core_container)=0 |
| Set INuguCoreContainer for using functions in NuguCore. More... | |
| virtual void | setSuspendPolicy (SuspendPolicy policy=SuspendPolicy::STOP)=0 |
| Set capability suspend policy. More... | |
| virtual void | suspend ()=0 |
| Suspend current action. | |
| virtual void | updateCompactContext (NJson::Value &ctx)=0 |
| Update the compact context information of the capability agent. More... | |
| virtual void | updateInfoForContext (NJson::Value &ctx)=0 |
| Update the current context information of the capability agent. More... | |
capability interface
| using NuguClientKit::ICapabilityInterface::EventResultCallback = std::function<void(const std::string&, const std::string&, const std::string&, int, int)> |
Event result callback for error handling.
| [in] | ename | event name |
| [in] | msg_id | event message id |
| [in] | dialog_id | event request dialog id |
| [in] | success | event result |
| [in] | code | event result code (similar to http status code) |
Capability suspend policy.
| Enumerator | |
|---|---|
| STOP | Stop current action unconditionally |
| PAUSE | Pause current action. It could resume later |
|
pure virtual |
Set INuguCoreContainer for using functions in NuguCore.
| [in] | core_container | NuguCoreContainer instance |
Implemented in NuguClientKit::Capability.
|
pure virtual |
Set capability suspend policy.
| [in] | policy | suspend policy |
Implemented in NuguClientKit::Capability.
|
pure virtual |
Add event result callback for error handling.
| [in] | ename | event name |
| [in] | callback | event result callback |
Implemented in NuguClientKit::Capability.
|
pure virtual |
Remove event result callback.
| [in] | ename | event name |
Implemented in NuguClientKit::Capability.
|
pure virtual |
Notify event result.
| [in] | event_desc | event result description (format: 'cname.ename.msgid.dialogid.success.code') |
Implemented in NuguClientKit::Capability.
|
pure virtual |
Notify event response info.
| [in] | msg_id | message id which is sent with event |
| [in] | data | raw data which is received from server about event (json format) |
| [in] | success | whether receive event response |
Implemented in NuguClientKit::Capability.
|
pure virtual |
Get the capability name of the current object.
Implemented in NuguClientKit::Capability.
|
pure virtual |
Get the capability version of the current object.
Implemented in NuguClientKit::Capability.
|
pure virtual |
Receive a directive preprocessing request from Directive sequencer.
| [in] | ndir | directive |
Implemented in NuguClientKit::Capability.
|
pure virtual |
Receive a directive cancellation from the Directive sequencer.
| [in] | ndir | directive |
Implemented in NuguClientKit::Capability.
|
pure virtual |
Receive a directive processing request from Directive sequencer.
| [in] | ndir | directive |
Implemented in NuguClientKit::Capability.
|
pure virtual |
Update the current context information of the capability agent.
| [in] | ctx | capability agent's context |
|
pure virtual |
Update the compact context information of the capability agent.
| [in] | ctx | capability agent's context |
Implemented in NuguClientKit::Capability.
|
pure virtual |
Process command from other objects.
| [in] | from | capability who send the command |
| [in] | command | command |
| [in] | param | command parameter |
| true | The command is valid |
| false | The command is invalid |
Implemented in NuguClientKit::Capability.
|
pure virtual |
Process command received from capability manager.
| [in] | command | command |
| [in] | param | command parameter |
Implemented in NuguClientKit::Capability.
|
pure virtual |
It is possible to share own property value among objects.
| [in] | property | capability property |
| [in] | value | capability property value |
| true | The property is valid |
| false | The property is invalid |
Implemented in NuguClientKit::Capability.
|
pure virtual |
It is possible to share own property values among objects.
| [in] | property | capability property |
| [in] | values | capability property values |
| true | The property is valid |
| false | The property is invalid |
Implemented in NuguClientKit::Capability.
|
pure virtual |
|
pure virtual |
Set directive cancel policy.
| [in] | cancel_previous_dialog | whether canceling previous dialog or not |
| [in] | cancel_policy | policy object |
Implemented in NuguClientKit::Capability.