17 #ifndef __NUGU_FOCUS_MANAGER_INTERFACE_H__
18 #define __NUGU_FOCUS_MANAGER_INTERFACE_H__
25 namespace NuguClientKit {
38 #define CALL_FOCUS_TYPE "Call"
39 #define CALL_FOCUS_REQUEST_PRIORITY 100
40 #define CALL_FOCUS_RELEASE_PRIORITY 100
42 #define ASR_USER_FOCUS_TYPE "ASRUser"
43 #define ASR_USER_FOCUS_REQUEST_PRIORITY 100
44 #define ASR_USER_FOCUS_RELEASE_PRIORITY 200
46 #define ASR_DM_FOCUS_TYPE "ASRDM"
47 #define ASR_DM_FOCUS_REQUEST_PRIORITY 400
48 #define ASR_DM_FOCUS_RELEASE_PRIORITY 300
50 #define INFO_FOCUS_TYPE "Info"
51 #define INFO_FOCUS_REQUEST_PRIORITY 200
52 #define INFO_FOCUS_RELEASE_PRIORITY 300
54 #define ALERTS_FOCUS_TYPE "Alerts"
55 #define ALERTS_FOCUS_REQUEST_PRIORITY 200
56 #define ALERTS_FOCUS_RELEASE_PRIORITY 300
58 #define ASR_BEEP_FOCUS_TYPE "ASRBeep"
59 #define ASR_BEEP_FOCUS_REQUEST_PRIORITY 500
60 #define ASR_BEEP_FOCUS_RELEASE_PRIORITY 400
62 #define MEDIA_FOCUS_TYPE "Media"
63 #define MEDIA_FOCUS_REQUEST_PRIORITY 300
64 #define MEDIA_FOCUS_RELEASE_PRIORITY 500
66 #define SOUND_FOCUS_TYPE "Sound"
67 #define SOUND_FOCUS_REQUEST_PRIORITY 500
68 #define SOUND_FOCUS_RELEASE_PRIORITY 500
70 #define DUMMY_FOCUS_TYPE "Dummy"
71 #define DUMMY_FOCUS_REQUEST_PRIORITY 600
72 #define DUMMY_FOCUS_RELEASE_PRIORITY 500
145 virtual bool releaseFocus(
const std::string& type,
const std::string& name) = 0;
166 virtual void setConfigurations(std::vector<FocusConfiguration>& request, std::vector<FocusConfiguration>& release) = 0;
IFocusManagerObserver.
Definition: focus_manager_interface.hh:110
IFocusManager.
Definition: focus_manager_interface.hh:128
IFocusResourceListener.
Definition: focus_manager_interface.hh:95
FocusState
FocusState.
Definition: focus_manager_interface.hh:77
virtual void removeObserver(IFocusManagerObserver *observer)=0
Remove the Observer object.
virtual void onFocusChanged(FocusState state)=0
Notify the resource of focus state change.
virtual bool unholdFocus(const std::string &type)=0
Unhold focus.
struct NuguClientKit::_FocusConfiguration FocusConfiguration
FocusConfiguration.
virtual void stopForegroundFocus()=0
Stop highest priority of focus that is foreground state.
virtual bool holdFocus(const std::string &type)=0
Hold focus. If requested to hold focus, the low priority focus is not preempted.
std::string type
Definition: focus_manager_interface.hh:87
virtual FocusState convertToFocusState(const std::string &state_text)=0
Convert state text to matched FocusState enum.
int priority
Definition: focus_manager_interface.hh:88
virtual void addObserver(IFocusManagerObserver *observer)=0
Add the Observer object.
virtual std::string getStateString(FocusState state)=0
Get state string.
virtual bool requestFocus(const std::string &type, const std::string &name, IFocusResourceListener *listener)=0
Request Focus.
virtual void stopAllFocus()=0
Stop all focus.
virtual void onFocusChanged(const FocusConfiguration &configuration, FocusState state, const std::string &name)=0
Support to monitor the change of focus state for all resources.
virtual void setConfigurations(std::vector< FocusConfiguration > &request, std::vector< FocusConfiguration > &release)=0
Set focus configurations.
virtual bool releaseFocus(const std::string &type, const std::string &name)=0
Release focus.
FocusConfiguration.
Definition: focus_manager_interface.hh:86