AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
APLViewhostObserverInterface.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_ALEXAPRESENTATION_APLVIEWHOSTOBSERVERINTERFACE_H_
17 #define ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_ALEXAPRESENTATION_APLVIEWHOSTOBSERVERINTERFACE_H_
18 
19 #include <memory>
20 #include <string>
21 
22 #include <APLClient/AplCommandExecutionEvent.h>
23 
24 namespace alexaClientSDK {
25 namespace sampleApplications {
26 namespace ipcServerSampleApp {
31 public:
35  virtual ~APLViewhostObserverInterface() = default;
36 
43  virtual void onCommandExecutionComplete(
44  const std::string& token,
45  APLClient::AplCommandExecutionEvent event,
46  const std::string& message) = 0;
47 
54  virtual void onRenderDocumentComplete(
55  const std::string& token,
56  bool result,
57  const std::string& error,
58  const std::chrono::steady_clock::time_point& timestamp) = 0;
59 
67  virtual void onSendEvent(
68  const std::string& token,
69  const std::string& arguments,
70  const std::string& components,
71  const std::string& source) = 0;
72 
82  const unsigned int requestToken,
83  const std::string& token,
84  const std::string& version,
85  const std::string& visualContext,
86  const std::string& datasourceContext) {
87  // no-op by default for backwards compatibility
88  }
89 
96  virtual void onDataSourceUpdateComplete(const std::string& token, bool result, const std::string& error) {
97  // no-op by default for backwards compatibility
98  }
99 
106  virtual void onDataSourceFetch(
107  const std::string& token,
108  const std::string& dataSourceType,
109  const std::string& payload) {
110  // no-op by default for backwards compatibility
111  }
112 
118  virtual void onRuntimeError(const std::string& token, const std::string& payload) {
119  // no-op by default for backwards compatibility
120  }
121 
126  virtual void onDocumentFinished(const std::string& token) {
127  // no-op by default for backwards compatibility
128  }
129 
135  virtual void onOpenURL(const std::string& token, const std::string& url) {
136  // no-op by default for compatibility
137  }
138 
143  virtual void onDocumentCleared(const std::string& token) {
144  // no-op by default for compatibility
145  }
146 
152  virtual void onSetDocumentIdleTimeout(const std::string& token, const std::chrono::milliseconds& timeout) = 0;
153 };
154 
155 using APLViewhostObserverInterfacePtr = std::shared_ptr<APLViewhostObserverInterface>;
156 } // namespace ipcServerSampleApp
157 } // namespace sampleApplications
158 } // namespace alexaClientSDK
159 
160 #endif // ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_ALEXAPRESENTATION_APLVIEWHOSTOBSERVERINTERFACE_H_
virtual void onSendEvent(const std::string &token, const std::string &arguments, const std::string &components, const std::string &source)=0
std::shared_ptr< APLViewhostObserverInterface > APLViewhostObserverInterfacePtr
Definition: APLViewhostObserverInterface.h:155
::std::string string
Definition: gtest-port.h:1097
virtual void onDataSourceUpdateComplete(const std::string &token, bool result, const std::string &error)
Definition: APLViewhostObserverInterface.h:96
virtual void onVisualContextAvailable(const unsigned int requestToken, const std::string &token, const std::string &version, const std::string &visualContext, const std::string &datasourceContext)
Definition: APLViewhostObserverInterface.h:81
virtual void onCommandExecutionComplete(const std::string &token, APLClient::AplCommandExecutionEvent event, const std::string &message)=0
virtual void onDataSourceFetch(const std::string &token, const std::string &dataSourceType, const std::string &payload)
Definition: APLViewhostObserverInterface.h:106
virtual void onRuntimeError(const std::string &token, const std::string &payload)
Definition: APLViewhostObserverInterface.h:118
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
virtual void onSetDocumentIdleTimeout(const std::string &token, const std::chrono::milliseconds &timeout)=0
virtual void onDocumentCleared(const std::string &token)
Definition: APLViewhostObserverInterface.h:143
virtual void onDocumentFinished(const std::string &token)
Definition: APLViewhostObserverInterface.h:126
virtual void onRenderDocumentComplete(const std::string &token, bool result, const std::string &error, const std::chrono::steady_clock::time_point &timestamp)=0
tuple message
Definition: gtest_output_test.py:331
virtual void onOpenURL(const std::string &token, const std::string &url)
Definition: APLViewhostObserverInterface.h:135

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