AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
APLDocumentObserverInterface.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 ACSDKALEXAPRESENTATIONINTERFACES_APLDOCUMENTOBSERVERINTERFACE_H_
17 #define ACSDKALEXAPRESENTATIONINTERFACES_APLDOCUMENTOBSERVERINTERFACE_H_
18 
19 #include <memory>
20 #include <string>
21 
23 
24 namespace alexaClientSDK {
25 namespace acsdkAlexaPresentationInterfaces {
26 
32 public:
36  virtual ~APLDocumentObserverInterface() = default;
37 
44  virtual void onAPLDocumentSessionAvailable(
45  const std::string& token,
46  std::unique_ptr<APLDocumentSessionInterface>&& session) = 0;
47 
52  virtual void onDocumentFinished(const std::string& token) = 0;
53 
60  virtual void onRenderDocumentComplete(const std::string& token, bool result, const std::string& error) {
61  // no-op for forward compatibility
62  }
63 
65  const std::string& token,
66  bool result,
67  const std::string& error,
68  const std::chrono::steady_clock::time_point& timestamp) {
69  onRenderDocumentComplete(token, result, error);
70  }
77  virtual void onCommandExecutionComplete(const std::string& token, bool result, const std::string& error) = 0;
78 
85  virtual void onDataSourceUpdateComplete(const std::string& token, bool result, const std::string& error) = 0;
86 
94  virtual void onSendEvent(
95  const std::string& token,
96  const std::string& arguments,
97  const std::string& components,
98  const std::string& source) = 0;
99 
108  virtual void onVisualContextAvailable(
109  const std::string& token,
110  const unsigned int requestToken,
111  const std::string& visualContext) = 0;
112 
119  virtual void onDataSourceFetch(
120  const std::string& token,
121  const std::string& dataSourceType,
122  const std::string& payload) = 0;
123 
129  virtual void onRuntimeError(const std::string& token, const std::string& payload) = 0;
130 };
131 
132 } // namespace acsdkAlexaPresentationInterfaces
133 } // namespace alexaClientSDK
134 
135 #endif // ACSDKALEXAPRESENTATIONINTERFACES_APLDOCUMENTOBSERVERINTERFACE_H_
virtual void onSendEvent(const std::string &token, const std::string &arguments, const std::string &components, const std::string &source)=0
virtual void onVisualContextAvailable(const std::string &token, const unsigned int requestToken, const std::string &visualContext)=0
virtual void onAPLDocumentSessionAvailable(const std::string &token, std::unique_ptr< APLDocumentSessionInterface > &&session)=0
virtual void onRenderDocumentComplete(const std::string &token, bool result, const std::string &error)
Definition: APLDocumentObserverInterface.h:60
::std::string string
Definition: gtest-port.h:1097
virtual void onRenderDocumentComplete(const std::string &token, bool result, const std::string &error, const std::chrono::steady_clock::time_point &timestamp)
Definition: APLDocumentObserverInterface.h:64
virtual void onCommandExecutionComplete(const std::string &token, bool result, const std::string &error)=0
virtual void onDataSourceUpdateComplete(const std::string &token, bool result, const std::string &error)=0
virtual void onRuntimeError(const std::string &token, const std::string &payload)=0
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
virtual void onDataSourceFetch(const std::string &token, const std::string &dataSourceType, const std::string &payload)=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