AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
AVSContext.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 ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_AVSCONTEXT_H_
16 #define ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_AVSCONTEXT_H_
17 
18 #include <map>
19 #include <ostream>
20 #include <string>
21 
25 
26 namespace alexaClientSDK {
27 namespace avsCommon {
28 namespace avs {
29 
36 class AVSContext {
37 public:
39  using States = std::map<CapabilityTag, CapabilityState>;
40 
44  AVSContext() = default;
45 
51  std::string toJson() const;
52 
58  States getStates() const;
59 
67 
77  void addState(const CapabilityTag& identifier, const CapabilityState& state);
78 
84  void removeState(const CapabilityTag& identifier);
85 
86 private:
88  States m_states;
89 };
90 
91 } // namespace avs
92 } // namespace avsCommon
93 } // namespace alexaClientSDK
94 
95 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_AVSCONTEXT_H_
std::map< CapabilityTag, CapabilityState > States
Alias the map of states.
Definition: AVSContext.h:39
std::string toJson() const
Definition: AVSContext.cpp:68
Definition: CapabilityTag.h:32
States getStates() const
Definition: AVSContext.cpp:56
void removeState(const CapabilityTag &identifier)
Definition: AVSContext.cpp:64
void addState(const CapabilityTag &identifier, const CapabilityState &state)
Definition: AVSContext.cpp:60
Definition: CapabilityState.h:31
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
utils::Optional< CapabilityState > getState(const CapabilityTag &identifier) const
Definition: AVSContext.cpp:51

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