![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <AbstractAVSConnectionManager.h>
Public Types | |
using | ConnectionStatusObserverInterface = avsCommon::sdkInterfaces::ConnectionStatusObserverInterface |
Type alias for brevity. More... | |
![]() | |
using | ConnectionStatusObserverInterface = avsCommon::sdkInterfaces::ConnectionStatusObserverInterface |
Type alias for brevity. More... | |
Public Member Functions | |
AbstractAVSConnectionManager (std::unordered_set< std::shared_ptr< ConnectionStatusObserverInterface >> observers=std::unordered_set< std::shared_ptr< ConnectionStatusObserverInterface >>()) | |
virtual | ~AbstractAVSConnectionManager ()=default |
AVSConnectionManagerInterface method overrides. | |
void | addConnectionStatusObserver (std::shared_ptr< ConnectionStatusObserverInterface > observer) override |
void | removeConnectionStatusObserver (std::shared_ptr< ConnectionStatusObserverInterface > observer) override |
![]() | |
virtual | ~AVSConnectionManagerInterface ()=default |
virtual void | enable ()=0 |
virtual void | disable ()=0 |
virtual bool | isEnabled ()=0 |
virtual void | reconnect ()=0 |
virtual bool | isConnected () const =0 |
virtual void | onWakeConnectionRetry ()=0 |
virtual void | addMessageObserver (std::shared_ptr< avsCommon::sdkInterfaces::MessageObserverInterface > observer)=0 |
virtual void | removeMessageObserver (std::shared_ptr< avsCommon::sdkInterfaces::MessageObserverInterface > observer)=0 |
virtual void | addConnectionStatusObserver (std::shared_ptr< ConnectionStatusObserverInterface > observer)=0 |
virtual void | removeConnectionStatusObserver (std::shared_ptr< ConnectionStatusObserverInterface > observer)=0 |
![]() | |
virtual | ~AVSGatewayAssignerInterface ()=default |
Destructor. More... | |
virtual void | setAVSGateway (const std::string &avsGateway)=0 |
virtual std::string | getAVSGateway () const =0 |
Protected Member Functions | |
void | updateConnectionStatus (ConnectionStatusObserverInterface::Status status, const std::vector< avsCommon::sdkInterfaces::ConnectionStatusObserverInterface::EngineConnectionStatus > &engineConnectionStatuses) |
void | notifyObservers (bool avsConnectionStatusChanged) |
void | clearObservers () |
Protected Attributes | |
std::mutex | m_mutex |
Mutex to protect access to data members. More... | |
ConnectionStatusObserverInterface::Status | m_connectionStatus |
The current connection status. m_mutex must be acquired before access. More... | |
ConnectionStatusObserverInterface::Status | m_avsConnectionStatus |
std::vector< ConnectionStatusObserverInterface::EngineConnectionStatus > | m_engineConnectionStatuses |
The detailed connection statuses for each engine. More... | |
std::unordered_set< std::shared_ptr< ConnectionStatusObserverInterface > > | m_connectionStatusObservers |
Set of observers to notify when the connection status changes. m_mutex must be acquired before access. More... | |
This class provides a partial implementation of the AVSConnectionManagerInterface.
using alexaClientSDK::avsCommon::avs::AbstractAVSConnectionManager::ConnectionStatusObserverInterface = avsCommon::sdkInterfaces::ConnectionStatusObserverInterface |
Type alias for brevity.
alexaClientSDK::avsCommon::avs::AbstractAVSConnectionManager::AbstractAVSConnectionManager | ( | std::unordered_set< std::shared_ptr< ConnectionStatusObserverInterface >> | observers = std::unordered_set< std::shared_ptr< ConnectionStatusObserverInterface >>() | ) |
Constructor.
|
virtualdefault |
Destructor.
|
override |
|
protected |
Removes all observers registered for Connection status notifications.
|
protected |
Utility function to notify all observers of the current Connection Status of engines.
avsConnectionStatusChanged | value to indicate if default status changed or not |
|
override |
|
protected |
Utility function to update our local status variables.
status | The Connection Status. |
engineConnectionStatuses | The detailed connection status for each engine. |
|
protected |
The current Alexa Voice Services connection status. TODO STAR-562: once migrate to use new onConnectionStatusChange API, this member variable should be removed.
|
protected |
The current connection status. m_mutex
must be acquired before access.
|
protected |
Set of observers to notify when the connection status changes. m_mutex
must be acquired before access.
|
protected |
The detailed connection statuses for each engine.
|
protected |
Mutex to protect access to data members.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0