AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
GUIClientInterface.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_GUI_GUICLIENTINTERFACE_H_
17 #define ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_GUI_GUICLIENTINTERFACE_H_
18 
19 #include <rapidjson/document.h>
20 
22 #ifdef ENABLE_COMMS
24 #endif
26 
28 
31 
32 #include "GUIServerInterface.h"
33 
34 namespace alexaClientSDK {
35 namespace sampleApplications {
36 namespace ipcServerSampleApp {
37 namespace gui {
38 
42 // TODO: Elaborate the requirements for an implementation of GUIClientInterface (ARC-905)
44 public:
46  using GUIToken = uint64_t;
47 
51  virtual ~GUIClientInterface() = default;
52 
57  virtual void setGUIManager(std::shared_ptr<gui::GUIServerInterface> guiManager) = 0;
58 
66  virtual bool acquireFocus(
67  std::string avsInterface,
68  std::string channelName,
69  avsCommon::avs::ContentType contentType,
70  std::shared_ptr<avsCommon::sdkInterfaces::ChannelObserverInterface> channelObserver) = 0;
71 
78  virtual bool releaseFocus(
79  std::string avsInterface,
80  std::string channelName,
81  std::shared_ptr<avsCommon::sdkInterfaces::ChannelObserverInterface> channelObserver) = 0;
82 
87 #ifdef ENABLE_COMMS
88  virtual void sendCallStateInfo(
90 #endif
91 
97 
104  virtual bool finalizeClientInitialization(bool errorState) = 0;
105 
110  virtual void handleInitializeAPLRenderers(rapidjson::Document& payload) = 0;
111 
116  virtual void handleDisplayMetrics(rapidjson::Document& payload) = 0;
117 
123  virtual void handleAplEvent(rapidjson::Document& payload) = 0;
124 
129  virtual void handleRenderComplete(rapidjson::Document& payload) = 0;
130 
136  virtual void handleLocalRenderDocument(rapidjson::Document& payload) = 0;
137 
143  virtual void handleLocalExecuteCommands(rapidjson::Document& payload) = 0;
144 
150  virtual void handleLocalClearDocument(rapidjson::Document& payload) = 0;
151 
157  virtual void handleOnFocusChangedReceivedConfirmation(GUIToken token) = 0;
158 
160  virtual void focusAcquireRequest(
161  const GUIToken token,
162  const std::string& avsInterface,
163  const std::string& channelName,
164  avsCommon::avs::ContentType contentType) = 0;
165 
167  virtual void focusReleaseRequest(
168  const GUIToken token,
169  const std::string& avsInterface,
170  const std::string& channelName) = 0;
171 
179  virtual void setLocales(const std::string& localeStr) = 0;
180 
182  virtual std::shared_ptr<ipc::IPCRouter> getIPCRouter() = 0;
183 };
184 
185 } // namespace gui
186 } // namespace ipcServerSampleApp
187 } // namespace sampleApplications
188 } // namespace alexaClientSDK
189 
190 #endif // ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_GUI_GUICLIENTINTERFACE_H_
virtual void handleInitializeAPLRenderers(rapidjson::Document &payload)=0
::std::string string
Definition: gtest-port.h:1097
virtual void sendMessage(messages::MessageInterface &message)=0
virtual void focusReleaseRequest(const GUIToken token, const std::string &avsInterface, const std::string &channelName)=0
Internal function to execute.
virtual bool acquireFocus(std::string avsInterface, std::string channelName, avsCommon::avs::ContentType contentType, std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterface > channelObserver)=0
virtual std::shared_ptr< ipc::IPCRouter > getIPCRouter()=0
Returns a reference to m_ipcRouter.
An struct containing call state information.
Definition: CallStateObserverInterface.h:45
virtual void focusAcquireRequest(const GUIToken token, const std::string &avsInterface, const std::string &channelName, avsCommon::avs::ContentType contentType)=0
Internal function to execute.
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
ContentType
Definition: ContentType.h:25
virtual void setGUIManager(std::shared_ptr< gui::GUIServerInterface > guiManager)=0
uint64_t GUIToken
Alias for GUI provided token.
Definition: GUIClientInterface.h:46
tuple message
Definition: gtest_output_test.py:331
virtual bool releaseFocus(std::string avsInterface, std::string channelName, std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterface > channelObserver)=0

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0