NUGU SDK Linux  1.7.6
NuguCapability::ISpeakerHandler Class Referenceabstract

speaker handler interface More...

#include <speaker_interface.hh>

+ Inheritance diagram for NuguCapability::ISpeakerHandler:
+ Collaboration diagram for NuguCapability::ISpeakerHandler:

Public Member Functions

virtual std::string getSpeakerName (const SpeakerType &type)=0
 Get speaker's name. More...
 
virtual bool getSpeakerType (const std::string &name, SpeakerType &type)=0
 Get speaker's type according speaker's name. More...
 
virtual void informMuteChanged (SpeakerType type, bool mute)=0
 Inform mute changed by application to the SDK. More...
 
virtual void informVolumeChanged (SpeakerType type, int volume)=0
 Inform volume changed by application to the SDK. More...
 
virtual void sendEventMuteChanged (const std::string &ps_id, bool result)=0
 Send event the result of request SetMute to the SDK. More...
 
virtual void sendEventVolumeChanged (const std::string &ps_id, bool result)=0
 Send event the result of request SetVolume to the SDK. More...
 
virtual void setSpeakerInfo (const std::map< SpeakerType, SpeakerInfo > &info)=0
 Set speaker information in SDK to be controlled by application. More...
 
- Public Member Functions inherited from NuguClientKit::ICapabilityInterface
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 &param)=0
 Process command from other objects. More...
 
virtual void receiveCommandAll (const std::string &command, const std::string &param)=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...
 

Additional Inherited Members

- Public Types inherited from NuguClientKit::ICapabilityInterface
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...
 

Detailed Description

speaker handler interface

See also
ISpeakerListener

Member Function Documentation

◆ setSpeakerInfo()

virtual void NuguCapability::ISpeakerHandler::setSpeakerInfo ( const std::map< SpeakerType, SpeakerInfo > &  info)
pure virtual

Set speaker information in SDK to be controlled by application.

Parameters
[in]infospeaker's information map

◆ informVolumeChanged()

virtual void NuguCapability::ISpeakerHandler::informVolumeChanged ( SpeakerType  type,
int  volume 
)
pure virtual

Inform volume changed by application to the SDK.

Parameters
[in]typespeaker type
[in]volumevolume level

◆ informMuteChanged()

virtual void NuguCapability::ISpeakerHandler::informMuteChanged ( SpeakerType  type,
bool  mute 
)
pure virtual

Inform mute changed by application to the SDK.

Parameters
[in]typespeaker type
[in]mutevolume mute

◆ sendEventVolumeChanged()

virtual void NuguCapability::ISpeakerHandler::sendEventVolumeChanged ( const std::string &  ps_id,
bool  result 
)
pure virtual

Send event the result of request SetVolume to the SDK.

Parameters
[in]ps_idplay service id
[in]resultresult of SetVolume

◆ sendEventMuteChanged()

virtual void NuguCapability::ISpeakerHandler::sendEventMuteChanged ( const std::string &  ps_id,
bool  result 
)
pure virtual

Send event the result of request SetMute to the SDK.

Parameters
[in]ps_idplay service id
[in]resultresult of SetMute

◆ getSpeakerName()

virtual std::string NuguCapability::ISpeakerHandler::getSpeakerName ( const SpeakerType type)
pure virtual

Get speaker's name.

Parameters
[in]typespeaker type
Returns
result speaker's name

◆ getSpeakerType()

virtual bool NuguCapability::ISpeakerHandler::getSpeakerType ( const std::string &  name,
SpeakerType type 
)
pure virtual

Get speaker's type according speaker's name.

Parameters
[in]namespeaker name
[out]typespeaker type
Returns
return true if the speaker type is found, otherwise false

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