AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
APLEventPayload.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 #ifndef ACSDK_APLCAPABILITYCOMMONINTERFACES_APLEVENTPAYLOAD_H_
16 #define ACSDK_APLCAPABILITYCOMMONINTERFACES_APLEVENTPAYLOAD_H_
17 
18 #include <string>
19 
20 #include "PresentationToken.h"
21 
22 namespace alexaClientSDK {
23 namespace aplCapabilityCommonInterfaces {
24 namespace aplEventPayload {
25 
31 struct UserEvent {
40 
44 #if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ < 6)
45 
57  UserEvent(PresentationToken token, std::string arguments, std::string source, std::string components) :
58  token{token},
59  arguments{arguments},
60  source{source},
61  components{components} {
62  }
72  UserEvent(const UserEvent& params) :
73  token{params.token},
74  arguments{params.arguments},
75  source{params.source},
76  components{params.components} {
77  }
78 #endif
79 };
80 
93 
97 #if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ < 6)
98 
110  DataSourceFetch(PresentationToken token, std::string dataSourceType, std::string fetchPayload) :
111  token{token},
112  dataSourceType{dataSourceType},
113  fetchPayload{fetchPayload} {
114  }
124  DataSourceFetch(const DataSourceFetch& params) :
125  token{params.token},
126  dataSourceType{params.dataSourceType},
127  fetchPayload{params.fetchPayload} {
128  }
129 #endif
130 };
131 
137 struct RuntimeError {
142 
146 #if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ < 6)
147 
157  RuntimeError(PresentationToken token, std::string errors) : token{token}, errors{errors} {
158  }
168  RuntimeError(const RuntimeError& params) : token{params.token}, errors{params.errors} {
169  }
170 #endif
171 };
172 
181  // the version of the UI component on the device
187 
191 #if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ < 6)
192 
205  PresentationToken token,
206  std::string version,
207  std::string visualContext,
208  std::string datasourceContext) :
209  token{token},
210  version{version},
211  visualContext{visualContext},
212  datasourceContext{datasourceContext} {
213  }
223  VisualContext(const VisualContext& params) :
224  token{params.token},
225  version{params.version},
226  visualContext{params.visualContext},
227  datasourceContext{params.datasourceContext} {
228  }
229 #endif
230 };
231 
232 } // namespace aplEventPayload
233 } // namespace aplCapabilityCommonInterfaces
234 } // namespace alexaClientSDK
235 
236 #endif // ACSDK_APLCAPABILITYCOMMONINTERFACES_APLEVENTPAYLOAD_H_
std::string components
The values of the components for all component IDs.
Definition: APLEventPayload.h:39
::std::string string
Definition: gtest-port.h:1097
std::string dataSourceType
Type of datasource that requests a fetch.
Definition: APLEventPayload.h:90
PresentationToken token
The presentation token for the document requesting the event.
Definition: APLEventPayload.h:88
std::string arguments
Array of argument data to pass to Alexa.
Definition: APLEventPayload.h:35
std::string datasourceContext
serialized datasource context obtained from APL Core
Definition: APLEventPayload.h:186
std::string PresentationToken
Alias for the token used by APL directives.
Definition: PresentationToken.h:22
std::string errors
error payload when APL processing encounters an error
Definition: APLEventPayload.h:141
PresentationToken token
The presentation token for the document requesting the event.
Definition: APLEventPayload.h:33
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
PresentationToken token
The presentation token for the document requesting visual context.
Definition: APLEventPayload.h:180
std::string fetchPayload
implementation specific (SendIndexListData, UpdateIndexListData, SendTokenListData) fetch request fro...
Definition: APLEventPayload.h:92
std::string source
meta-information about the event trigger
Definition: APLEventPayload.h:37
std::string visualContext
serialized visual context obtained from APL Core
Definition: APLEventPayload.h:184
PresentationToken token
The presentation token for the document requesting the event.
Definition: APLEventPayload.h:139

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