AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
APLClientNamespace.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_IPC_NAMESPACES_APLCLIENTNAMESPACE_H_
17 #define ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_IPC_NAMESPACES_APLCLIENTNAMESPACE_H_
18 
19 #include <string>
20 
22 
23 namespace alexaClientSDK {
24 namespace sampleApplications {
25 namespace ipcServerSampleApp {
26 namespace ipc {
27 namespace IPCNamespaces {
28 
30 static const char IPC_MSG_NAMESPACE_APL[] = "APLClient";
31 
33 static const int IPC_MSG_VERSION_APL(1);
34 
36 static const char IPC_MESSAGE_NAME_VIEWHOST_MESSAGE[] = "sendMessageToViewhost";
37 
39 static const char IPC_MESSAGE_NAME_CREATE_RENDERER[] = "createRenderer";
40 
45 public:
52  AplViewhostMessage(const std::string& windowId, const std::string& payload) :
53  Message(IPC_MSG_NAMESPACE_APL, IPC_MSG_VERSION_APL, IPC_MESSAGE_NAME_VIEWHOST_MESSAGE) {
54  setWindowIdInPayload(windowId);
56  addPayload();
57  }
58 };
59 
65 public:
72  AplCreateRendererMessage(const std::string& windowId, const std::string& token) :
73  Message(IPC_MSG_NAMESPACE_APL, IPC_MSG_VERSION_APL, IPC_MESSAGE_NAME_CREATE_RENDERER) {
74  setWindowIdInPayload(windowId);
75  setTokenInPayload(token);
76  addPayload();
77  }
78 };
79 
80 } // namespace IPCNamespaces
81 } // namespace ipc
82 } // namespace ipcServerSampleApp
83 } // namespace sampleApplications
84 } // namespace alexaClientSDK
85 #endif // ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_IPC_NAMESPACES_APLCLIENTNAMESPACE_H_
static const int IPC_MSG_VERSION_APL(1)
The namespace version for APL.
static const char IPC_MESSAGE_NAME_CREATE_RENDERER[]
The message name for createRenderer.
Definition: APLClientNamespace.h:39
::std::string string
Definition: gtest-port.h:1097
static const char IPC_MSG_NAMESPACE_APL[]
The message namespace for APLClient.
Definition: APLClientNamespace.h:30
Message(const std::string &nameSpace, const int version, const std::string &name)
Definition: Message.h:64
AplViewhostMessage(const std::string &windowId, const std::string &payload)
Definition: APLClientNamespace.h:52
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
AplCreateRendererMessage(const std::string &windowId, const std::string &token)
Definition: APLClientNamespace.h:72
Message & setParsedPayloadInPayload(const std::string &payload)
Definition: Message.h:189
static const char IPC_MESSAGE_NAME_VIEWHOST_MESSAGE[]
The message name for sendMessageToViewhost.
Definition: APLClientNamespace.h:36
Message & setTokenInPayload(const std::string &token)
Definition: Message.h:159
Message & setWindowIdInPayload(const std::string &windowId)
Definition: Message.h:199

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