![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <AVSContext.h>
Public Types | |
using | States = std::map< CapabilityTag, CapabilityState > |
Alias the map of states. More... | |
Public Member Functions | |
AVSContext ()=default | |
std::string | toJson () const |
States | getStates () const |
utils::Optional< CapabilityState > | getState (const CapabilityTag &identifier) const |
void | addState (const CapabilityTag &identifier, const CapabilityState &state) |
void | removeState (const CapabilityTag &identifier) |
The AVSContext
represents a map where the key is the capabilities message identifier, which represents a unique property in the device, and the value is their current state.
using alexaClientSDK::avsCommon::avs::AVSContext::States = std::map<CapabilityTag, CapabilityState> |
Alias the map of states.
|
default |
Constructor.
void alexaClientSDK::avsCommon::avs::AVSContext::addState | ( | const CapabilityTag & | identifier, |
const CapabilityState & | state | ||
) |
Add the state for an specific capability.
identifier | The target capability identifier. |
state | The state to be saved. |
utils::Optional<CapabilityState> alexaClientSDK::avsCommon::avs::AVSContext::getState | ( | const CapabilityTag & | identifier | ) | const |
Get state of an specific capability if available.
identifier | The target capability identifier. |
States alexaClientSDK::avsCommon::avs::AVSContext::getStates | ( | ) | const |
Get all states available in this context.
void alexaClientSDK::avsCommon::avs::AVSContext::removeState | ( | const CapabilityTag & | identifier | ) |
Remove the state of an specific capability.
identifier | The target capability identifier. |
std::string alexaClientSDK::avsCommon::avs::AVSContext::toJson | ( | ) | const |
Return a stringified json representation of AVSContext
value.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0