| 
|   | ~ContextManager () override | 
|   | Destructor.  More...
  | 
|   | 
 | 
| void  | setStateProvider (const avsCommon::avs::CapabilityTag &stateProviderName, std::shared_ptr< avsCommon::sdkInterfaces::StateProviderInterface > stateProvider) override | 
|   | 
| void  | addStateProvider (const avsCommon::avs::CapabilityTag &capabilityIdentifier, std::shared_ptr< avsCommon::sdkInterfaces::StateProviderInterface > stateProvider) override | 
|   | 
| void  | removeStateProvider (const avsCommon::avs::CapabilityTag &capabilityIdentifier) override | 
|   | 
| avsCommon::sdkInterfaces::SetStateResult  | setState (const avsCommon::avs::CapabilityTag &stateProviderName, const std::string &jsonState, const avsCommon::avs::StateRefreshPolicy &refreshPolicy, const avsCommon::sdkInterfaces::ContextRequestToken stateRequestToken=0) override | 
|   | 
| avsCommon::sdkInterfaces::ContextRequestToken  | getContext (std::shared_ptr< avsCommon::sdkInterfaces::ContextRequesterInterface > contextRequester, const std::string &endpointId, const std::chrono::milliseconds &timeout) override | 
|   | 
| avsCommon::sdkInterfaces::ContextRequestToken  | getContextWithoutReportableStateProperties (std::shared_ptr< avsCommon::sdkInterfaces::ContextRequesterInterface > contextRequester, const std::string &endpointId, const std::chrono::milliseconds &timeout) override | 
|   | 
| void  | reportStateChange (const avsCommon::avs::CapabilityTag &capabilityIdentifier, const avsCommon::avs::CapabilityState &capabilityState, avsCommon::sdkInterfaces::AlexaStateChangeCauseType cause) override | 
|   | 
| void  | provideStateResponse (const avsCommon::avs::CapabilityTag &capabilityIdentifier, const avsCommon::avs::CapabilityState &capabilityState, avsCommon::sdkInterfaces::ContextRequestToken stateRequestToken) override | 
|   | 
| void  | provideStateUnavailableResponse (const avsCommon::avs::CapabilityTag &capabilityIdentifier, avsCommon::sdkInterfaces::ContextRequestToken stateRequestToken, bool isEndpointUnreachable) override | 
|   | 
| void  | addContextManagerObserver (std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerObserverInterface > observer) override | 
|   | 
| void  | removeContextManagerObserver (const std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerObserverInterface > &observer) override | 
|   | 
| virtual  | ~ContextManagerInterface ()=default | 
|   | 
| virtual void  | setStateProvider (const avs::CapabilityTag &capabilityIdentifier, std::shared_ptr< StateProviderInterface > stateProvider)=0 | 
|   | 
| virtual void  | addStateProvider (const avsCommon::avs::CapabilityTag &capabilityIdentifier, std::shared_ptr< avsCommon::sdkInterfaces::StateProviderInterface > stateProvider)=0 | 
|   | 
| virtual ContextRequestToken  | getContext (std::shared_ptr< ContextRequesterInterface > contextRequester, const std::string &endpointId="", const std::chrono::milliseconds &timeout=std::chrono::seconds(2))=0 | 
|   | 
| virtual ContextRequestToken  | getContextWithoutReportableStateProperties (std::shared_ptr< ContextRequesterInterface > contextRequester, const std::string &endpointId="", const std::chrono::milliseconds &timeout=std::chrono::seconds(2))=0 | 
|   | 
| virtual void  | addContextManagerObserver (std::shared_ptr< ContextManagerObserverInterface > observer)=0 | 
|   | 
| virtual void  | removeContextManagerObserver (const std::shared_ptr< ContextManagerObserverInterface > &observer)=0 | 
|   | 
Class manages the requests for getting context from ContextRequesters and updating the state from StateProviders. 
 
Sets the state information. The refresh policy indicates to the ContextManager whether on a getContext request the state needs to be updated. If the refreshPolicy is ALWAYS, then the StateProviderInterface needs to be registered with the ContextManager, else setState returns an error.
For the states for which the refresh policy is ALWAYS, the ContextManager requests for provideStates from the StateProviderInterfaces. When a provideState request is sent to a StateProviderInterface, the ContextManager will provide a stateRequestToken. The same token needs to be sent on a setState in response to the provideState. If the token sent in the setState request does not match the token in the ContextManager, setState will return an error.
- Deprecated:
 - Use the provideStateResponse for responding to 
provideState request and reportStateChange to proactively report to the ContextManager that the state has changed. 
- Note
 - Token needs to be set only if the 
setState is in response to a provideState request. Setting the token to 0 is equivalent to no token. 
The jsonState is the json value that is associated with the key "payload".
- Parameters
 - 
  
    | capabilityIdentifier | The capability message identifier of the StateProviderInterface whose state is being updated.  | 
    | jsonState | The state of the StateProviderInterface. The StateProviderInterface with a refreshPolicy of SOMETIMES can pass in an empty string to indicate no contexts needs to be sent by the provider.  | 
    | refreshPolicy | The refresh policy for the state.  | 
    | stateRequestToken | The token that was provided in a provideState request. Defaults to 0. | 
  
   
- Returns
 - The status of the setState operation. 
 
Implements alexaClientSDK::avsCommon::sdkInterfaces::ContextManagerInterface.