AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
IPCAPLAgent.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_IPCAPLAGENT_H_
17 #define ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_ALEXAPRESENTATION_IPCAPLAGENT_H_
18 
19 #include <memory>
20 #include <string>
21 
25 
27 
28 namespace alexaClientSDK {
29 namespace sampleApplications {
30 namespace ipcServerSampleApp {
31 
36 public:
43  static std::shared_ptr<IPCAPLAgent> create(std::shared_ptr<gui::GUIClientInterface> guiClient);
44 
48  virtual ~IPCAPLAgent() = default;
49 
52  void setAPLMaxVersion(const std::string& APLMaxVersion);
53 
54  void onDocumentDismissed(const std::string& token);
55 
57  const std::string& token,
59 
60  void addObserver(std::shared_ptr<aplCapabilityCommonInterfaces::APLCapabilityAgentObserverInterface> observer);
61 
62  void removeObserver(std::shared_ptr<aplCapabilityCommonInterfaces::APLCapabilityAgentObserverInterface> observer);
63 
64  void clearExecuteCommands(const std::string& token = std::string(), bool markAsFailed = true) override;
65 
66  void sendUserEvent(
68 
71 
74 
78 
79  void processRenderDocumentResult(const std::string& token, const bool result, const std::string& error) override;
80 
82  const std::string& token,
84  const std::string& error) override;
85 
86  void recordRenderComplete(const std::chrono::steady_clock::time_point& timestamp) override;
87 
88  void proactiveStateReport() override;
90 
91 private:
92  explicit IPCAPLAgent(std::shared_ptr<gui::GUIClientInterface> guiClient);
93 
95  std::shared_ptr<gui::GUIClientInterface> m_guiClient;
96 };
97 
98 } // namespace ipcServerSampleApp
99 } // namespace sampleApplications
100 } // namespace alexaClientSDK
101 
102 #endif // ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_ALEXAPRESENTATION_IPCAPLAGENT_H_
void onActiveDocumentChanged(const std::string &token, const aplCapabilityCommonInterfaces::PresentationSession &session) override
void clearExecuteCommands(const std::string &token=std::string(), bool markAsFailed=true) override
void addObserver(std::shared_ptr< aplCapabilityCommonInterfaces::APLCapabilityAgentObserverInterface > observer)
void processExecuteCommandsResult(const std::string &token, alexaClientSDK::aplCapabilityCommonInterfaces::APLCommandExecutionEvent event, const std::string &error) override
::std::string string
Definition: gtest-port.h:1097
void removeObserver(std::shared_ptr< aplCapabilityCommonInterfaces::APLCapabilityAgentObserverInterface > observer)
unsigned int ContextRequestToken
Alias for the token used to identify a context request.
Definition: ContextRequestToken.h:23
void sendDataSourceFetchRequestEvent(const alexaClientSDK::aplCapabilityCommonInterfaces::aplEventPayload::DataSourceFetch &fetchPayload) override
static std::shared_ptr< IPCAPLAgent > create(std::shared_ptr< gui::GUIClientInterface > guiClient)
void processRenderDocumentResult(const std::string &token, const bool result, const std::string &error) override
void sendUserEvent(const alexaClientSDK::aplCapabilityCommonInterfaces::aplEventPayload::UserEvent &payload) override
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
void sendRuntimeErrorEvent(const alexaClientSDK::aplCapabilityCommonInterfaces::aplEventPayload::RuntimeError &payload) override
void onVisualContextAvailable(alexaClientSDK::avsCommon::sdkInterfaces::ContextRequestToken requestToken, const alexaClientSDK::aplCapabilityCommonInterfaces::aplEventPayload::VisualContext &visualContext) override
APLCommandExecutionEvent
Enumeration of APL Command Execution Events that can be reported to the APL capability agent...
Definition: APLCommandExecutionEvent.h:27
void recordRenderComplete(const std::chrono::steady_clock::time_point &timestamp) override

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