16 #ifndef ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_GUI_GUIMANAGER_H_ 17 #define ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_GUI_GUIMANAGER_H_ 72 #include <SSSDKCommon/NullMicrophone.h> 76 namespace sampleApplications {
77 namespace ipcServerSampleApp {
100 ,
public std::enable_shared_from_this<GUIManager> {
113 static std::shared_ptr<GUIManager>
create(
114 std::shared_ptr<gui::GUIClientInterface> guiClient,
115 std::shared_ptr<gui::GUIActivityEventNotifierInterface> activityEventNotifier,
116 std::shared_ptr<applicationUtilities::resources::audio::MicrophoneInterface> micWrapper,
117 std::shared_ptr<common::InteractionManager> interactionManager,
118 std::shared_ptr<common::EndpointAlexaLauncherHandler> launcherHandler);
148 std::shared_ptr<avsCommon::sdkInterfaces::ChannelObserverInterface> channelObserver)
override;
153 std::shared_ptr<avsCommon::sdkInterfaces::ChannelObserverInterface> channelObserver)
override;
160 std::vector<visualCharacteristicsInterfaces::WindowTemplate>
getWindowTemplates()
override;
162 std::vector<visualCharacteristicsInterfaces::InteractionMode>
getInteractionModes()
override;
167 const std::vector<presentationOrchestratorInterfaces::PresentationOrchestratorWindowInstance>& instances,
169 const std::string& audioPlaybackUIWindowId)
override;
182 const std::vector<visualCharacteristicsInterfaces::InteractionMode>& interactionModes,
186 const std::vector<visualCharacteristicsInterfaces::WindowTemplate>& windowTemplates,
283 void onCallStateInfoChange(
293 void setClient(std::shared_ptr<sdkClient::SDKClientRegistry> clientRegistry);
345 std::shared_ptr<TemplateRuntimePresentationAdapterBridge> templateRuntimePresentationAdapterBridge);
363 std::shared_ptr<gui::GUIClientInterface> guiClient,
364 std::shared_ptr<gui::GUIActivityEventNotifierInterface> activityEventNotifier,
365 std::shared_ptr<applicationUtilities::resources::audio::MicrophoneInterface> micWrapper,
366 std::shared_ptr<common::InteractionManager> interactionManager,
367 std::shared_ptr<common::EndpointAlexaLauncherHandler> launcherHandler);
371 void doShutdown()
override;
377 void executeBackNavigation();
382 void executeExitNavigation();
406 void setDefaultWindowId(
const std::string& windowId);
413 void setAudioPlaybackUIWindowId(
const std::string& windowId);
423 std::shared_ptr<gui::GUIClientInterface> m_guiClient;
428 std::shared_ptr<gui::GUIActivityEventNotifierInterface> m_activityEventNotifier;
433 std::shared_ptr<alexaClientSDK::defaultClient::DefaultClient> m_defaultClient;
436 bool m_isSpeakingOrListening;
440 std::shared_ptr<alexaSmartScreenSDK::sssdkCommon::NullMicrophone> m_micWrapper;
442 std::shared_ptr<applicationUtilities::resources::audio::MicrophoneInterface> m_micWrapper;
452 std::unordered_map<std::string, avsCommon::avs::FocusState> m_channelFocusStates;
455 bool m_clearAlertChannelOnForegrounded;
458 std::shared_ptr<settings::SettingCallbacks<settings::DeviceSettingsManager>> m_callbacks;
461 std::shared_ptr<settings::DeviceSettingsManager> m_settingsManager;
464 std::shared_ptr<ipc::DoNotDisturbHandler> m_doNotDisturbIPCHandler;
467 std::shared_ptr<ipc::InteractionManagerHandler> m_interactionManagerIPCHandler;
470 std::shared_ptr<ipc::LoggerHandler> m_loggerIPCHandler;
473 std::shared_ptr<ipc::SessionSetupHandler> m_sessionSetupIPCHandler;
476 std::shared_ptr<ipc::IPCVersionManager> m_ipcVersionManager;
479 std::shared_ptr<common::EndpointAlexaLauncherHandler> m_launcherHandler;
482 std::shared_ptr<ipc::WindowManagerHandler> m_windowManagerIPCHandler;
497 std::shared_ptr<TimezoneHelper> m_timezoneHelper;
500 std::shared_ptr<common::InteractionManager> m_interactionManager;
503 std::shared_ptr<presentationOrchestratorInterfaces::PresentationOrchestratorStateTrackerInterface>
504 m_presentationOrchestratorStateTracker;
507 std::shared_ptr<visualCharacteristicsInterfaces::VisualCharacteristicsInterface> m_visualCharacteristics;
510 std::shared_ptr<visualCharacteristicsInterfaces::VisualCharacteristicsSerializerInterface>
511 m_visualCharacteristicsSerializer;
514 std::shared_ptr<presentationOrchestratorInterfaces::PresentationOrchestratorInterface> m_presentationOrchestrator;
517 std::shared_ptr<aplCapabilityCommonInterfaces::APLCapabilityAgentInterface> m_alexaPresentationAPL;
520 std::shared_ptr<APLRuntimePresentationAdapter> m_aplRuntimePresentationAdapter;
523 std::shared_ptr<TemplateRuntimePresentationAdapterBridge> m_templateRuntimePresentationAdapterBridge;
534 #endif // ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_GUI_GUIMANAGER_H_ const std::string & name() const
void acceptCall() override
void navigationEvent(const std::string &message) override
void handlePlaybackPlay() override
MixingBehavior
Definition: MixingBehavior.h:25
void handlePlaybackSkipBackward() override
void handleMicrophoneToggle() override
void handleLocaleChange() override
Definition: GUIManager.h:83
void enableLocalVideo() override
static std::shared_ptr< GUIManager > create(std::shared_ptr< gui::GUIClientInterface > guiClient, std::shared_ptr< gui::GUIActivityEventNotifierInterface > activityEventNotifier, std::shared_ptr< applicationUtilities::resources::audio::MicrophoneInterface > micWrapper, std::shared_ptr< common::InteractionManager > interactionManager, std::shared_ptr< common::EndpointAlexaLauncherHandler > launcherHandler)
void handlePlaybackPrevious() override
Definition: LoggerHandlerInterface.h:35
An interface providing APIs to be used by GUIClient.
Definition: GUIServerInterface.h:40
An interface that clients can extend to register to observe focus changes.
Definition: FocusManagerObserverInterface.h:26
Definition: GUILogBridge.h:66
::std::string string
Definition: gtest-port.h:1097
Definition: VisualCharacteristicsInterface.h:262
void setTemplateRuntimePresentationAdapterBridge(std::shared_ptr< TemplateRuntimePresentationAdapterBridge > templateRuntimePresentationAdapterBridge)
Single-thread executor implementation.
Definition: Executor.h:45
void handleGUIActivityEvent(avsCommon::sdkInterfaces::GUIActivityEvent event, const std::string &source="") override
Type
Definition: ChannelVolumeInterface.h:37
The context of the AudioPlayer when the observer is notified of the PlayerActivity state change...
Definition: AudioPlayerObserverInterface.h:39
void forceExit() override
Definition: RequiresShutdown.h:32
bool addWindowInstance(const presentationOrchestratorInterfaces::PresentationOrchestratorWindowInstance &instance) override
void handlePlaybackSkipForward() override
Definition: SessionSetupHandlerInterface.h:41
FocusState
Definition: FocusState.h:29
Definition: CallStateObserverInterface.h:28
Definition: AudioPlayerObserverInterface.h:31
void namespaceVersionsReport(const std::string &message) override
DialogUXState
The different dialog specific AVS UX states.
Definition: DialogUXStateObserverInterface.h:32
std::vector< visualCharacteristicsInterfaces::WindowTemplate > getWindowTemplates() override
Definition: DoNotDisturbHandlerInterface.h:32
visualCharacteristicsInterfaces::DisplayCharacteristics getDisplayCharacteristics() override
void windowInstancesAdded(const std::string &message) override
void guiActivityEvent(const std::string &message) override
void recognizeSpeechRequest(const std::string &message) override
std::chrono::milliseconds getDeviceTimezoneOffset() override
void logEvent(const std::string &message) override
CallState
An enumeration representing the state of a call.
Definition: CallStateObserverInterface.h:31
void handleOnMessagingServerConnectionOpened() override
void handlePlaybackNext() override
bool serializeDisplayCharacteristics(const visualCharacteristicsInterfaces::DisplayCharacteristics &display, std::string &serializedJson) override
bool Value(const T &value, M matcher)
Definition: gmock-matchers.h:4347
void disableLocalVideo() override
Initiator
Definition: Initiator.h:28
An struct containing call state information.
Definition: CallStateObserverInterface.h:45
bool serializeWindowTemplate(const std::vector< visualCharacteristicsInterfaces::WindowTemplate > &windowTemplates, std::string &serializedJson) override
bool parseWindowInstance(const rapidjson::Value &payload, presentationOrchestratorInterfaces::PresentationOrchestratorWindowInstance &windowInstance)
void updateWindowInstance(const presentationOrchestratorInterfaces::PresentationOrchestratorWindowInstance &instance) override
void onStateChanged(const std::string &windowId, const presentationOrchestratorInterfaces::PresentationMetadata &metadata) override
DTMFTone
An enum used to define the characters that dtmf tone can be.
Definition: CallManagerInterface.h:59
void windowInstancesReport(const std::string &message) override
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
void setAPLRuntimePresentationAdapter(std::shared_ptr< APLRuntimePresentationAdapter > aplRuntimePresentationAdapter)
}
Definition: ChannelObserverInterface.h:29
bool removeWindowInstance(const std::string &windowInstanceId) override
GUIActivityEvent
Enumeration of activity events used to indicate the state of a GUI.
Definition: GUIActivityEvent.h:27
void handlePlaybackPause() override
ContentType
Definition: ContentType.h:25
int32_t FirmwareVersion
Type to use to communicate a firmware version.
Definition: SoftwareInfoSenderObserverInterface.h:29
void visualCharacteristicsRequest(const std::string &message) override
std::vector< visualCharacteristicsInterfaces::InteractionMode > getInteractionModes() override
type
Definition: upload.py:443
void setWindowInstances(const std::vector< presentationOrchestratorInterfaces::PresentationOrchestratorWindowInstance > &instances, const std::string &defaultWindowInstanceId, const std::string &audioPlaybackUIWindowId) override
void onDialogUXStateChanged(DialogUXState newState) override
void windowInstancesRemoved(const std::string &message) override
void handleRecognizeSpeechRequest(capabilityAgents::aip::Initiator initiator, bool start) override
void handlePlaybackToggle(const std::string &name, bool checked) override
bool handleFocusReleaseRequest(std::string avsInterface, std::string channelName, std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterface > channelObserver) override
void windowInstancesUpdated(const std::string &message) override
void setClient(std::shared_ptr< sdkClient::SDKClientRegistry > clientRegistry)
bool handleFocusAcquireRequest(std::string avsInterface, std::string channelName, avsCommon::avs::ContentType contentType, std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterface > channelObserver) override
bool setDefaultWindowInstance(const std::string &windowInstanceId) override
void initClient() override
State
Definition: State.h:35
void setIpcVersionManager(std::shared_ptr< ipc::IPCVersionManager > ipcVersionManager)
bool serializeInteractionMode(const std::vector< visualCharacteristicsInterfaces::InteractionMode > &interactionModes, std::string &serializedJson) override
void doNotDisturbStateRequest(const std::string &message) override
Definition: InteractionManagerHandlerInterface.h:38
void onFocusChanged(const std::string &channelName, avsCommon::avs::FocusState newFocus) override
void clientInitialized(const std::string &message) override
bool configureSettingsNotifications()
PlayerActivity
Identifies the player state.
Definition: PlayerActivity.h:27
void clientConfigRequest(const std::string &message) override
void handleDocumentTerminated(const std::string &token, bool failed) override
tuple message
Definition: gtest_output_test.py:331
void doNotDisturbStateChanged(const std::string &message) override
void onUserEvent() override
void handlePlaybackSeekTo(int offset) override
Definition: PresentationOrchestratorTypes.h:45
void forceClearDialogChannelFocus()
void onPlayerActivityChanged(avsCommon::avs::PlayerActivity state, const Context &context) override
NavigationEvent
Enumeration of navigation events that could be sent from GUI App to SampleApp.
Definition: NavigationEvent.h:25
Definition: PresentationOrchestratorStateObserverInterface.h:28
Definition: WindowManagerHandlerInterface.h:71
void handleNavigationEvent(NavigationEvent event) override
void defaultWindowInstanceChanged(const std::string &message) override
A dialog specific UX state observer.
Definition: DialogUXStateObserverInterface.h:29