AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
AlexaCaptionsNamespace.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_ALEXACAPTIONSNAMESPACE_H_
17 #define ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_IPC_NAMESPACES_ALEXACAPTIONSNAMESPACE_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_CAPTIONS[] = "AlexaCaptions";
31 
33 static const int IPC_MSG_VERSION_CAPTIONS(1);
34 
36 static const char IPC_MSG_NAME_RENDER_CAPTIONS[] = "renderCaptions";
37 
39 static const char IPC_MSG_NAME_SET_CAPTIONS_STATE[] = "setCaptionsState";
40 
42 static const char IPC_MSG_NAME_ENABLED_TAG[] = "enabled";
43 
48 public:
54  explicit RenderCaptionsMessage(const std::string& payload) :
55  Message(IPC_MSG_NAMESPACE_CAPTIONS, IPC_MSG_VERSION_CAPTIONS, IPC_MSG_NAME_RENDER_CAPTIONS) {
56  setParsedPayload(payload);
57  };
58 };
59 
64 public:
70  explicit SetCaptionsStateMessage(const bool enabled) :
71  Message(IPC_MSG_NAMESPACE_CAPTIONS, IPC_MSG_VERSION_CAPTIONS, IPC_MSG_NAME_SET_CAPTIONS_STATE) {
72  setEnabledInPayload(enabled);
73  addPayload();
74  };
75 };
76 
77 } // namespace IPCNamespaces
78 } // namespace ipc
79 } // namespace ipcServerSampleApp
80 } // namespace sampleApplications
81 } // namespace alexaClientSDK
82 #endif // ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_IPC_NAMESPACES_ALEXACAPTIONSNAMESPACE_H_
static const int IPC_MSG_VERSION_CAPTIONS(1)
The namespace version for Captions.
::std::string string
Definition: gtest-port.h:1097
Message & setParsedPayload(const std::string &payload)
Definition: Message.h:179
RenderCaptionsMessage(const std::string &payload)
Definition: AlexaCaptionsNamespace.h:54
static const char IPC_MSG_NAME_SET_CAPTIONS_STATE[]
The message name for setCaptionsState.
Definition: AlexaCaptionsNamespace.h:39
Message(const std::string &nameSpace, const int version, const std::string &name)
Definition: Message.h:64
Message & setEnabledInPayload(bool enabled)
Definition: Message.h:138
static const char IPC_MSG_NAME_ENABLED_TAG[]
The enabled json key in the message.
Definition: AlexaCaptionsNamespace.h:42
static const char IPC_MSG_NAME_RENDER_CAPTIONS[]
The message name for renderCaptions.
Definition: AlexaCaptionsNamespace.h:36
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
static const char IPC_MSG_NAMESPACE_CAPTIONS[]
The message namespace for Captions.
Definition: AlexaCaptionsNamespace.h:30

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