NUGU SDK Linux  1.7.6
NuguCapability::IAudioPlayerHandler Class Referenceabstract

audioplayer handler interface More...

#include <audio_player_interface.hh>

+ Inheritance diagram for NuguCapability::IAudioPlayerHandler:
+ Collaboration diagram for NuguCapability::IAudioPlayerHandler:

Public Member Functions

virtual void addListener (IAudioPlayerListener *listener)=0
 Add the Listener object. More...
 
virtual std::string next ()=0
 Request the audio player to play the next content. More...
 
virtual std::string pause (bool direct_access=false)=0
 Request the audio player to pause the current content. More...
 
virtual std::string play ()=0
 Request the audio player to play the current content. More...
 
virtual std::string prev ()=0
 Request the audio player to play the previous content. More...
 
virtual void removeListener (IAudioPlayerListener *listener)=0
 Remove the Listener object. More...
 
virtual std::string requestFavoriteCommand (bool current_favorite)=0
 Send to request favorite command event with current favorite value. More...
 
virtual std::string requestRepeatCommand (RepeatType current_repeat)=0
 Send to request repeat command event with current repeat value. More...
 
virtual std::string requestShuffleCommand (bool current_shuffle)=0
 Send to request shuffle command event with current shuffle value. More...
 
virtual std::string resume (bool direct_access=false)=0
 Request the audio player to resume the current content. More...
 
virtual void seek (int msec)=0
 Request the audio player to move the current content section. More...
 
virtual bool setMute (bool mute)=0
 set media player's mute More...
 
virtual bool setVolume (int volume)=0
 set media player's volume More...
 
virtual std::string stop (bool direct_access=false)=0
 Request the audio player to stop the current content. 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...
 
- Public Member Functions inherited from NuguCapability::IDisplayHandler
virtual void controlTemplate (const std::string &id, TemplateControlType control_type)
 Control templates which are composed by history control. More...
 
virtual void displayCleared (const std::string &id)
 The user reports that the display is cleared. More...
 
virtual void displayRendered (const std::string &id, const DisplayContextInfo &context_info=DisplayContextInfo {})
 The user reports that the display was rendered. More...
 
virtual void elementSelected (const std::string &id, const std::string &item_token, const std::string &postback="")
 The user informs the selected item of the list and reports the token information of the item. More...
 
virtual void informControlResult (const std::string &id, ControlType type, ControlDirection direction, bool result)
 The user informs the control result. More...
 
virtual void refreshRenderingTimer (const std::string &id)
 Refresh display rendering hold timer. More...
 
virtual void removeDisplayListener (IDisplayListener *listener)
 Remove the IDisplayListener object.
 
virtual void setDisplayListener (IDisplayListener *listener)
 Set the IDisplayListener object. More...
 
virtual void stopRenderingTimer (const std::string &id)
 Stop display rendering hold timer. More...
 
virtual void triggerChild (const std::string &ps_id, const std::string &data)
 Send TriggerChild event for receiving child template. 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

audioplayer handler interface

See also
IAudioPlayerListener

Member Function Documentation

◆ play()

virtual std::string NuguCapability::IAudioPlayerHandler::play ( )
pure virtual

Request the audio player to play the current content.

Returns
dialog request id if a NUGU service request succeeds with user text, otherwise empty string

◆ stop()

virtual std::string NuguCapability::IAudioPlayerHandler::stop ( bool  direct_access = false)
pure virtual

Request the audio player to stop the current content.

Parameters
[in]direct_accesscontrol mediaplayer via sending event or directly access
Returns
dialog request id if a NUGU service request succeeds with user text, otherwise empty string (only used direct_access is false)

◆ next()

virtual std::string NuguCapability::IAudioPlayerHandler::next ( )
pure virtual

Request the audio player to play the next content.

Returns
dialog request id if a NUGU service request succeeds with user text, otherwise empty string

◆ prev()

virtual std::string NuguCapability::IAudioPlayerHandler::prev ( )
pure virtual

Request the audio player to play the previous content.

Returns
dialog request id if a NUGU service request succeeds with user text, otherwise empty string

◆ pause()

virtual std::string NuguCapability::IAudioPlayerHandler::pause ( bool  direct_access = false)
pure virtual

Request the audio player to pause the current content.

Parameters
[in]direct_accesscontrol mediaplayer via sending event or directly access
Returns
dialog request id if a NUGU service request succeeds with user text, otherwise empty string (only used direct_access is false)

◆ resume()

virtual std::string NuguCapability::IAudioPlayerHandler::resume ( bool  direct_access = false)
pure virtual

Request the audio player to resume the current content.

Parameters
[in]direct_accesscontrol mediaplayer via sending event or directly access
Returns
dialog request id if a NUGU service request succeeds with user text, otherwise empty string (only used direct_access is false)

◆ seek()

virtual void NuguCapability::IAudioPlayerHandler::seek ( int  msec)
pure virtual

Request the audio player to move the current content section.

Parameters
[in]mseccontent's position. It is moved from the current media position.

◆ requestFavoriteCommand()

virtual std::string NuguCapability::IAudioPlayerHandler::requestFavoriteCommand ( bool  current_favorite)
pure virtual

Send to request favorite command event with current favorite value.

Parameters
[in]current_favoritecurrent favorite value
Returns
dialog request id if a NUGU service request succeeds with user text, otherwise empty string

◆ requestRepeatCommand()

virtual std::string NuguCapability::IAudioPlayerHandler::requestRepeatCommand ( RepeatType  current_repeat)
pure virtual

Send to request repeat command event with current repeat value.

Parameters
[in]current_repeatcurrent repeat value
Returns
dialog request id if a NUGU service request succeeds with user text, otherwise empty string

◆ requestShuffleCommand()

virtual std::string NuguCapability::IAudioPlayerHandler::requestShuffleCommand ( bool  current_shuffle)
pure virtual

Send to request shuffle command event with current shuffle value.

Parameters
[in]current_shufflecurrent shuffle value
Returns
dialog request id if a NUGU service request succeeds with user text, otherwise empty string

◆ setVolume()

virtual bool NuguCapability::IAudioPlayerHandler::setVolume ( int  volume)
pure virtual

set media player's volume

Parameters
[in]volumevolume level
Returns
result of set volume

◆ setMute()

virtual bool NuguCapability::IAudioPlayerHandler::setMute ( bool  mute)
pure virtual

set media player's mute

Parameters
[in]mutevolume mute
Returns
result of set mute

◆ addListener()

virtual void NuguCapability::IAudioPlayerHandler::addListener ( IAudioPlayerListener listener)
pure virtual

Add the Listener object.

Parameters
[in]listenerlistener object

◆ removeListener()

virtual void NuguCapability::IAudioPlayerHandler::removeListener ( IAudioPlayerListener listener)
pure virtual

Remove the Listener object.

Parameters
[in]listenerlistener object

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