AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
PresentationTypes.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_AVS_SHARED_PRESENTATIONORCHESTRATOR_PRESENTATIONORCHESTRATORINTERFACES_INCLUDE_ACSDK_PRESENTATIONORCHESTRATORINTERFACES_PRESENTATIONTYPES_H_
17 #define ALEXA_CLIENT_SDK_AVS_SHARED_PRESENTATIONORCHESTRATOR_PRESENTATIONORCHESTRATORINTERFACES_INCLUDE_ACSDK_PRESENTATIONORCHESTRATORINTERFACES_PRESENTATIONTYPES_H_
18 
19 #include <chrono>
20 #include <ostream>
21 #include <string>
22 
23 namespace alexaClientSDK {
24 namespace presentationOrchestratorInterfaces {
25 using PresentationRequestToken = uint64_t;
26 
30  TRANSIENT,
31 
34  SHORT,
35 
38  LONG,
39 
42  PERMANENT
43 };
44 
48 enum class PresentationState {
52  FOREGROUND,
53 
58 
62  BACKGROUND,
63 
67  NONE,
68 };
69 
77  switch (state) {
79  return "FOREGROUND";
81  return "FOREGROUND_UNFOCUSED";
83  return "BACKGROUND";
85  return "NONE";
86  }
87  return "Unknown State";
88 }
89 
97 inline std::ostream& operator<<(std::ostream& stream, const PresentationState& state) {
98  return stream << presentationStateToString(state);
99 }
100 
108  switch (lifespan) {
110  return "TRANSIENT";
112  return "SHORT";
114  return "LONG";
116  return "PERMANENT";
117  }
118  return "Unknown Lifespan";
119 }
120 
128 inline std::ostream& operator<<(std::ostream& stream, const PresentationLifespan& lifespan) {
129  return stream << presentationLifespanToString(lifespan);
130 }
131 
135  std::chrono::milliseconds timeout;
136 
139 
142 
146 };
147 
148 } // namespace presentationOrchestratorInterfaces
149 } // namespace alexaClientSDK
150 #endif // ALEXA_CLIENT_SDK_AVS_SHARED_PRESENTATIONORCHESTRATOR_PRESENTATIONORCHESTRATORINTERFACES_INCLUDE_ACSDK_PRESENTATIONORCHESTRATORINTERFACES_PRESENTATIONTYPES_H_
::std::string string
Definition: gtest-port.h:1097
std::string interfaceName
The AVS namespace associated with this presentation.
Definition: PresentationTypes.h:141
std::string presentationLifespanToString(PresentationLifespan lifespan)
Definition: PresentationTypes.h:107
PresentationState
Definition: PresentationTypes.h:48
std::ostream & operator<<(std::ostream &stream, const PresentationState &state)
Definition: PresentationTypes.h:97
std::chrono::milliseconds timeout
Definition: PresentationTypes.h:135
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::string presentationStateToString(PresentationState state)
Definition: PresentationTypes.h:76
uint64_t PresentationRequestToken
Definition: PresentationTypes.h:25
PresentationLifespan presentationLifespan
Specifies the lifespan type for this presentation.
Definition: PresentationTypes.h:138
PresentationLifespan
Definition: PresentationTypes.h:27
std::string metadata
Definition: PresentationTypes.h:145

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