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

#include <StateSynchronizerObserverInterface.h>

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

Public Types

enum  State { State::NOT_SYNCHRONIZED, State::SYNCHRONIZED }
 

Public Member Functions

virtual ~StateSynchronizerObserverInterface ()=default
 
virtual void onStateChanged (State newState)=0
 

Detailed Description

This interface provides a callback that signals state has been synchronized successfully. Since SynchronizeState event should be the first message sent to AVS upon connection, if a component is sending a message, then it needs to know the state of StateSynchronizer in order to start sending, and therefore contain an implementation of this interface. Moreover, said component or implementation should add themselves to StateSynchronizer to receive the callback.

Member Enumeration Documentation

◆ State

This enum provides the state of the StateSynchronizer.

Enumerator
NOT_SYNCHRONIZED 

The state in which StateSynchronizer has not send SynchronizeState event.

SYNCHRONIZED 

The state in which the state has been synchronized.

Constructor & Destructor Documentation

◆ ~StateSynchronizerObserverInterface()

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

Destructor.

Member Function Documentation

◆ onStateChanged()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::StateSynchronizerObserverInterface::onStateChanged ( State  newState)
pure virtual

Get the notification that the state has been synchronized.

Parameters
newStateThe state to which the StateSynchronizer has transitioned.
Note
The implementation of this function should return fast in order not to block the component that calls it.

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