NUGU SDK Linux  1.7.6
NuguClientKit::IPlaySyncManager Class Referenceabstract

IPlaySyncManager interface. More...

#include <playsync_manager_interface.hh>

Public Types

using PlayStacks = std::map< std::string, PlaySyncContainer >
 
using PlaySyncContainer = std::map< std::string, std::pair< PlaySyncState, void * > >
 

Public Member Functions

virtual void addListener (const std::string &requester, IPlaySyncManagerListener *listener)=0
 Add IPlaySyncManagerListener. More...
 
virtual void adjustPlayStackHoldTime (unsigned int time)=0
 Adjust playstack hold time. More...
 
virtual void cancelSync (const std::string &ps_id, const std::string &requester)=0
 Cancel sync specific capability agent which was synced. More...
 
virtual void clear ()=0
 Clear all playstack info.
 
virtual void clearHolding ()=0
 Clear timer for releasing sync.
 
virtual void continueRelease ()=0
 Continue pending release if exist.
 
virtual std::vector< std::string > getAllPlayStackItems ()=0
 Get all items which are stored in playstack. More...
 
virtual bool hasActivity (const std::string &ps_id, PlayStackActivity activity)=0
 Check whether the specific playstack activity exist. More...
 
virtual bool hasNextPlayStack ()=0
 Check whether the next playstack to handle exists. More...
 
virtual bool isConditionToHandlePrevDialog (NuguDirective *prev_ndir, NuguDirective *cur_ndir)=0
 Check whether the previous dialog has to be handled or not. More...
 
virtual void postPoneRelease ()=0
 Postpone already started release if exist.
 
virtual void prepareSync (const std::string &ps_id, NuguDirective *ndir)=0
 Prepare sync capability agents which are included in directive. More...
 
virtual void registerCapabilityForSync (const std::string &capability_name)=0
 Register capability agent for sync (default:TTS, AudioPlayer, Display) More...
 
virtual void releaseSync (const std::string &ps_id, const std::string &requester)=0
 Release sync all capability agents. (Actually, it release sync after context holding time.) More...
 
virtual void releaseSyncImmediately (const std::string &ps_id, const std::string &requester)=0
 Release sync all capability agents immediately. More...
 
virtual void releaseSyncLater (const std::string &ps_id, const std::string &requester)=0
 Release sync all capability agents after long time elapsed. More...
 
virtual void releaseSyncUnconditionally (const std::string &ps_id="")=0
 Release sync all capability agents unconditionally. If it's not specify the play service id, it would remove all playstacks. More...
 
virtual void removeListener (const std::string &requester)=0
 Remove IPlayStackManagerListener. More...
 
virtual void replacePlayStack (const std::string &prev_ps_id, const std::string &new_ps_id, std::pair< std::string, void * > extra_data={})=0
 Replace current playstack to new one. (It only replace playstack not notifying related callbacks.) More...
 
virtual void resetHolding ()=0
 Reset timer for releasing sync.
 
virtual void restartHolding ()=0
 Restart timer for releasing sync.
 
virtual void setDefaultPlayStackHoldTime (unsigned int time)=0
 Set default playstack hold time. More...
 
virtual void startSync (const std::string &ps_id, const std::string &requester, void *extra_data=nullptr)=0
 Start sync specific capability agent which was prepared. More...
 
virtual void stopHolding ()=0
 Stop timer for releasing sync.
 

Detailed Description

Member Function Documentation

◆ registerCapabilityForSync()

virtual void NuguClientKit::IPlaySyncManager::registerCapabilityForSync ( const std::string &  capability_name)
pure virtual

Register capability agent for sync (default:TTS, AudioPlayer, Display)

Parameters
[in]capability_namecapability agent name

◆ addListener()

virtual void NuguClientKit::IPlaySyncManager::addListener ( const std::string &  requester,
IPlaySyncManagerListener listener 
)
pure virtual

Add IPlaySyncManagerListener.

Parameters
[in]requestercapability agent name
[in]listenerIPlaySyncManagerListener instance

◆ removeListener()

virtual void NuguClientKit::IPlaySyncManager::removeListener ( const std::string &  requester)
pure virtual

Remove IPlayStackManagerListener.

Parameters
[in]requestercapability agent name

◆ prepareSync()

virtual void NuguClientKit::IPlaySyncManager::prepareSync ( const std::string &  ps_id,
NuguDirective ndir 
)
pure virtual

Prepare sync capability agents which are included in directive.

Parameters
[in]ps_idplay service id
[in]ndirdirective

◆ startSync()

virtual void NuguClientKit::IPlaySyncManager::startSync ( const std::string &  ps_id,
const std::string &  requester,
void *  extra_data = nullptr 
)
pure virtual

Start sync specific capability agent which was prepared.

Parameters
[in]ps_idplay service id
[in]requestercapability agent name
[in]extra_dataan extra_data which is used after synced

◆ cancelSync()

virtual void NuguClientKit::IPlaySyncManager::cancelSync ( const std::string &  ps_id,
const std::string &  requester 
)
pure virtual

Cancel sync specific capability agent which was synced.

Parameters
[in]ps_idplay service id
[in]requestercapability agent name

◆ releaseSync()

virtual void NuguClientKit::IPlaySyncManager::releaseSync ( const std::string &  ps_id,
const std::string &  requester 
)
pure virtual

Release sync all capability agents. (Actually, it release sync after context holding time.)

Parameters
[in]ps_idplay service id
[in]requestercapability agent name

◆ releaseSyncLater()

virtual void NuguClientKit::IPlaySyncManager::releaseSyncLater ( const std::string &  ps_id,
const std::string &  requester 
)
pure virtual

Release sync all capability agents after long time elapsed.

Parameters
[in]ps_idplay service id
[in]requestercapability agent name

◆ releaseSyncImmediately()

virtual void NuguClientKit::IPlaySyncManager::releaseSyncImmediately ( const std::string &  ps_id,
const std::string &  requester 
)
pure virtual

Release sync all capability agents immediately.

Parameters
[in]ps_idplay service id
[in]requestercapability agent name

◆ releaseSyncUnconditionally()

virtual void NuguClientKit::IPlaySyncManager::releaseSyncUnconditionally ( const std::string &  ps_id = "")
pure virtual

Release sync all capability agents unconditionally. If it's not specify the play service id, it would remove all playstacks.

Parameters
[in]ps_idplay service id

◆ isConditionToHandlePrevDialog()

virtual bool NuguClientKit::IPlaySyncManager::isConditionToHandlePrevDialog ( NuguDirective prev_ndir,
NuguDirective cur_ndir 
)
pure virtual

Check whether the previous dialog has to be handled or not.

Parameters
[in]prev_ndirprevious directive
[in]cur_ndircurrent directive
Returns
true if has to be handled, otherwise false

◆ hasActivity()

virtual bool NuguClientKit::IPlaySyncManager::hasActivity ( const std::string &  ps_id,
PlayStackActivity  activity 
)
pure virtual

Check whether the specific playstack activity exist.

Parameters
[in]ps_idplay service id
[in]activityplaystack activity
Returns
true if has to be handled, otherwise false

◆ hasNextPlayStack()

virtual bool NuguClientKit::IPlaySyncManager::hasNextPlayStack ( )
pure virtual

Check whether the next playstack to handle exists.

Returns
true if the next playstack exists, otherwise false

◆ getAllPlayStackItems()

virtual std::vector<std::string> NuguClientKit::IPlaySyncManager::getAllPlayStackItems ( )
pure virtual

Get all items which are stored in playstack.

Returns
Playstack items (play service id list)

◆ adjustPlayStackHoldTime()

virtual void NuguClientKit::IPlaySyncManager::adjustPlayStackHoldTime ( unsigned int  time)
pure virtual

Adjust playstack hold time.

Parameters
[in]timeplaystack hold time (unit: second)

◆ setDefaultPlayStackHoldTime()

virtual void NuguClientKit::IPlaySyncManager::setDefaultPlayStackHoldTime ( unsigned int  time)
pure virtual

Set default playstack hold time.

Parameters
[in]timeplaystack hold time (unit: second)

◆ replacePlayStack()

virtual void NuguClientKit::IPlaySyncManager::replacePlayStack ( const std::string &  prev_ps_id,
const std::string &  new_ps_id,
std::pair< std::string, void * >  extra_data = {} 
)
pure virtual

Replace current playstack to new one. (It only replace playstack not notifying related callbacks.)

Parameters
[in]prev_ps_idcurrent exist play service id
[in]new_ps_idplay service id for replacing
[in]extra_dataadditional data composed by requester and data

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