![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <StateProviderInterface.h>

Public Member Functions | |
| virtual | ~StateProviderInterface ()=default |
| virtual void | provideState (const avs::NamespaceAndName &stateProviderName, const ContextRequestToken stateRequestToken) |
| virtual void | provideState (const avs::CapabilityTag &stateProviderName, const ContextRequestToken stateRequestToken) |
| virtual bool | canStateBeRetrieved () |
| virtual bool | hasReportableStateProperties () |
| virtual bool | shouldQueryState () |
A StateProvider may be any client component whose state needs to be sent to the AVS. This specifies the interface to a StateProvider.
|
virtualdefault |
Destructor.
|
inlinevirtual |
Returns whether the provider can be queried for its state / properties. If not, the provider is omitted from the context altogether. ContextManager will not query or report its state.
Reimplemented in alexaClientSDK::capabilityAgents::modeController::ModeControllerCapabilityAgent, alexaClientSDK::capabilityAgents::rangeController::RangeControllerCapabilityAgent, alexaClientSDK::capabilityAgents::toggleController::ToggleControllerCapabilityAgent, and alexaClientSDK::capabilityAgents::powerController::PowerControllerCapabilityAgent.
|
inlinevirtual |
Returns whether the provider has Reportable State Properties.
Reimplemented in alexaClientSDK::capabilityAgents::modeController::ModeControllerCapabilityAgent, alexaClientSDK::capabilityAgents::rangeController::RangeControllerCapabilityAgent, alexaClientSDK::capabilityAgents::toggleController::ToggleControllerCapabilityAgent, and alexaClientSDK::capabilityAgents::powerController::PowerControllerCapabilityAgent.
|
inlinevirtual |
A request to a StateProvider to provide the state. The StateProvider should perform minimum processing and return quickly, otherwise it will block the processing of updating the states of other StateProviders. The ContextManager specifies a token which it uses to track the getContext request associated with this provideState request. The stateProviderInterface must use the same token when it updates its state via the setState call.
: The setState method MUST be called from a different thread from where the provideState method is being called from.
| stateProviderName | The name of the state provider. |
| stateRequestToken | The token to use in the setState call. |
NamespaceAndName is being deprecated. Use the CapabilityMessageIdentifier version instead. Reimplemented in alexaClientSDK::acsdkAudioPlayer::AudioPlayer, alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaPlayer, alexaClientSDK::capabilityAgents::speechSynthesizer::SpeechSynthesizer, alexaClientSDK::acsdkNotifications::NotificationsCapabilityAgent, alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, alexaClientSDK::afml::AudioActivityTracker, and alexaClientSDK::afml::VisualActivityTracker.
|
inlinevirtual |
A request to a StateProvider to provide the state. The StateProvider should perform minimum processing and return quickly, otherwise it will block the processing of updating the states of other StateProviders. The ContextManager specifies a token which it uses to track the getContext request associated with this provideState request. The stateProviderInterface must use the same token when it updates its state via the setState call.
: The setState method MUST be called from a different thread from where the provideState method is being called from.
| stateProviderIdentifier | The identifier of the state provider. |
| stateRequestToken | The token to use in the setState call. |
Reimplemented in alexaClientSDK::capabilityAgents::modeController::ModeControllerCapabilityAgent, alexaClientSDK::capabilityAgents::rangeController::RangeControllerCapabilityAgent, alexaClientSDK::capabilityAgents::toggleController::ToggleControllerCapabilityAgent, and alexaClientSDK::capabilityAgents::powerController::PowerControllerCapabilityAgent.
|
inlinevirtual |
Returns whether the provider should be queried for its state / properties. If this returns false the last cached state will be reported to the context requester.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0