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::AVSConnectionManagerInterface Class Referenceabstract

#include <AVSConnectionManagerInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::AVSConnectionManagerInterface:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::avsCommon::sdkInterfaces::AVSConnectionManagerInterface:
Collaboration graph
[legend]

Public Types

using ConnectionStatusObserverInterface = avsCommon::sdkInterfaces::ConnectionStatusObserverInterface
 Type alias for brevity. More...
 

Public Member Functions

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
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::MessageSenderInterface
virtual ~MessageSenderInterface ()=default
 Destructor. More...
 
virtual void sendMessage (std::shared_ptr< avs::MessageRequest > request)=0
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::AVSGatewayAssignerInterface
virtual ~AVSGatewayAssignerInterface ()=default
 Destructor. More...
 
virtual void setAVSGateway (const std::string &avsGateway)=0
 
virtual std::string getAVSGateway () const =0
 

Detailed Description

This class reflects a connection to AVS and how it may be observed.

Member Typedef Documentation

◆ ConnectionStatusObserverInterface

Type alias for brevity.

Constructor & Destructor Documentation

◆ ~AVSConnectionManagerInterface()

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

Destructor.

Member Function Documentation

◆ addConnectionStatusObserver()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::AVSConnectionManagerInterface::addConnectionStatusObserver ( std::shared_ptr< ConnectionStatusObserverInterface observer)
pure virtual

Adds an observer to be notified of connection status changes. The observer will be notified of the current connection status before this function returns.

Parameters
observerThe observer to add.

◆ addMessageObserver()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::AVSConnectionManagerInterface::addMessageObserver ( std::shared_ptr< avsCommon::sdkInterfaces::MessageObserverInterface observer)
pure virtual

Adds an observer to be notified of message receptions.

Parameters
observerThe observer object to add.

Implemented in alexaClientSDK::acl::AVSConnectionManager.

◆ disable()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::AVSConnectionManagerInterface::disable ( )
pure virtual

Disable the AVSConnectionManager object. If the object is currently connected to AVS, then calling this function will cause the connection to be closed. If the object is not connected, then calling this function will do nothing.

Implemented in alexaClientSDK::acl::AVSConnectionManager.

◆ enable()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::AVSConnectionManagerInterface::enable ( )
pure virtual

Enable the AVSConnectionManager object to make connections to AVS. Once enabled, the object will attempt to create a connection to AVS. If the object is already connected, this function will do nothing.

Implemented in alexaClientSDK::acl::AVSConnectionManager.

◆ isConnected()

virtual bool alexaClientSDK::avsCommon::sdkInterfaces::AVSConnectionManagerInterface::isConnected ( ) const
pure virtual

Returns whether the AVS connection is established. If the connection is pending, false will be returned.

Returns
Whether the AVS connection is established.

Implemented in alexaClientSDK::acl::AVSConnectionManager, and alexaClientSDK::capabilityAgents::system::test::MockConnection.

◆ isEnabled()

virtual bool alexaClientSDK::avsCommon::sdkInterfaces::AVSConnectionManagerInterface::isEnabled ( )
pure virtual

Returns if the object is enabled for making connections to AVS.

Returns
Whether this Connection object is enabled to make connections.

Implemented in alexaClientSDK::acl::AVSConnectionManager.

◆ onWakeConnectionRetry()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::AVSConnectionManagerInterface::onWakeConnectionRetry ( )
pure virtual

This method is a hint to retry connecting (if not connected).

Implemented in alexaClientSDK::acl::AVSConnectionManager.

◆ reconnect()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::AVSConnectionManagerInterface::reconnect ( )
pure virtual

This function causes the object, if enabled, to create new connection to AVS. If the object is already connected, then that connection will be closed and a new one created. If the object is not connected, but perhaps in the process of waiting for its next connection attempt, then its waiting policy will be reset and it will attempt to create a new connection immediately. If the object is disabled, then this function will do nothing.

Implemented in alexaClientSDK::acl::AVSConnectionManager.

◆ removeConnectionStatusObserver()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::AVSConnectionManagerInterface::removeConnectionStatusObserver ( std::shared_ptr< ConnectionStatusObserverInterface observer)
pure virtual

Removes an observer from being notified of connection status changes.

Parameters
observerThe observer to remove.

◆ removeMessageObserver()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::AVSConnectionManagerInterface::removeMessageObserver ( std::shared_ptr< avsCommon::sdkInterfaces::MessageObserverInterface observer)
pure virtual

Removes an observer from being notified of message receptions.

Parameters
observerThe observer object to remove.

Implemented in alexaClientSDK::acl::AVSConnectionManager.


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