AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface Class Reference

#include <ContextRequesterInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~ContextRequesterInterface ()=default
 
virtual void onContextAvailable (const std::string &jsonContext)
 
virtual void onContextAvailable (const endpoints::EndpointIdentifier &endpointId, const avs::AVSContext &endpointContext, ContextRequestToken requestToken)
 
virtual void onContextFailure (const ContextRequestError error)
 
virtual void onContextFailure (const ContextRequestError error, ContextRequestToken token)
 

Detailed Description

This specifies the interface to a contextRequester.

Constructor & Destructor Documentation

◆ ~ContextRequesterInterface()

virtual alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface::~ContextRequesterInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ onContextAvailable() [1/2]

void alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface::onContextAvailable ( const std::string &  jsonContext)
inlinevirtual

This is called by the ContextManager once the context is ready and available.

Deprecated:
This method is being deprecated since it cannot specify the source endpoint.
Note
The ContextRequester should perform minimum processing and return quickly. Otherwise it will block the processing of updating the of other ContextProviders.
Parameters
jsonContextContext information.Context provided is of the format {"context"[{...}, {...}]}

Reimplemented in alexaClientSDK::capabilityAgents::aip::AudioInputProcessor, alexaClientSDK::acsdkBluetooth::Bluetooth, alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaPlayer, alexaClientSDK::capabilityAgents::speechSynthesizer::SpeechSynthesizer, alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, alexaClientSDK::capabilityAgents::playbackController::PlaybackController, alexaClientSDK::diagnostics::DevicePropertyAggregator, and alexaClientSDK::synchronizeStateSender::PostConnectSynchronizeStateSender.

◆ onContextAvailable() [2/2]

void alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface::onContextAvailable ( const endpoints::EndpointIdentifier endpointId,
const avs::AVSContext endpointContext,
ContextRequestToken  requestToken 
)
inlinevirtual

This is called by the ContextManager once the context is ready and available.

Note
The ContextRequester should perform minimum processing and return quickly. Otherwise it will block the processing of updating the of other ContextProviders.
In future versions, this method will be made pure virtual.
Parameters
endpointIdThe ID used to identify the endpoint to which this context belong.
endpointContextThe state of all capabilities related to the given endpoint.
requestTokenToken used to identify a specific context request.

Reimplemented in alexaClientSDK::capabilityAgents::alexa::AlexaInterfaceMessageSender.

◆ onContextFailure() [1/2]

void alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface::onContextFailure ( const ContextRequestError  error)
inlinevirtual

The contextManager calls this if it is unable to process a getContext request successfully.

Deprecated:
This method is being deprecated since it cannot specify the optional token.
Note
The ContextRequester should perform minimum processing and return quickly. Otherwise it will block the processing of updating the of other ContextProviders.
Parameters
errorThe reason why the getContext request failed.

Reimplemented in alexaClientSDK::capabilityAgents::aip::AudioInputProcessor, alexaClientSDK::acsdkBluetooth::Bluetooth, alexaClientSDK::acsdkExternalMediaPlayer::ExternalMediaPlayer, alexaClientSDK::capabilityAgents::speechSynthesizer::SpeechSynthesizer, alexaClientSDK::aplCapabilityCommon::BaseAPLCapabilityAgent, alexaClientSDK::capabilityAgents::playbackController::PlaybackController, alexaClientSDK::diagnostics::DevicePropertyAggregator, and alexaClientSDK::synchronizeStateSender::PostConnectSynchronizeStateSender.

◆ onContextFailure() [2/2]

void alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface::onContextFailure ( const ContextRequestError  error,
ContextRequestToken  token 
)
inlinevirtual

The contextManager calls this if it is unable to process a getContext request successfully.

Note
The ContextRequester should perform minimum processing and return quickly. Otherwise it will block the processing of updating the of other ContextProviders.
In future versions, this method will be made pure virtual.
Parameters
errorThe reason why the getContext request failed.
requestTokenToken used to identify a specific context request.

Reimplemented in alexaClientSDK::capabilityAgents::alexa::AlexaInterfaceMessageSender.


The documentation for this class was generated from the following file:

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