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

#include <AVSGatewayManager.h>

Inheritance diagram for alexaClientSDK::avsGatewayManager::AVSGatewayManager:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::avsGatewayManager::AVSGatewayManager:
Collaboration graph
[legend]

Public Member Functions

void onGatewayVerified (const std::shared_ptr< avsCommon::sdkInterfaces::PostConnectOperationInterface > &verifyGatewaySender)
 
 ~AVSGatewayManager ()
 
AVSGatewayManagerInterface Functions
bool setAVSGatewayAssigner (std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayAssignerInterface > avsGatewayAssigner) override
 
std::string getGatewayURL () const override
 
bool setGatewayURL (const std::string &avsGatewayURL) override
 
void addObserver (std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayObserverInterface > observer) override
 
void removeObserver (std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayObserverInterface > observer) override
 
PostConnectOperationProviderInterface Functions
std::shared_ptr< avsCommon::sdkInterfaces::PostConnectOperationInterfacecreatePostConnectOperation () override
 
CustomerDataHandler Functions
void clearData () override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::AVSGatewayManagerInterface
virtual ~AVSGatewayManagerInterface ()=default
 
virtual bool setAVSGatewayAssigner (std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayAssignerInterface > avsGatewayAssigner)=0
 
virtual void addObserver (std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayObserverInterface > observer)=0
 
virtual void removeObserver (std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayObserverInterface > observer)=0
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::PostConnectOperationProviderInterface
virtual ~PostConnectOperationProviderInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::registrationManager::CustomerDataHandler
 CustomerDataHandler (const std::shared_ptr< registrationManager::CustomerDataManagerInterface > &dataManager)
 
virtual ~CustomerDataHandler ()
 
- Public Member Functions inherited from alexaClientSDK::registrationManager::CustomerDataHandlerInterface
virtual ~CustomerDataHandlerInterface ()=default
 

Static Public Member Functions

static std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayManagerInterfacecreateAVSGatewayManagerInterface (std::unique_ptr< storage::AVSGatewayManagerStorageInterface > avsGatewayManagerStorage, const std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > &authDelegate, const std::shared_ptr< registrationManager::CustomerDataManagerInterface > &customerDataManager, const std::shared_ptr< avsCommon::utils::configuration::ConfigurationNode > &configurationRoot, const std::shared_ptr< acsdkPostConnectOperationProviderRegistrarInterfaces::PostConnectOperationProviderRegistrarInterface > &providerRegistrar, std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder)
 
static std::shared_ptr< AVSGatewayManagercreate (std::shared_ptr< storage::AVSGatewayManagerStorageInterface > avsGatewayManagerStorage, std::shared_ptr< registrationManager::CustomerDataManagerInterface > customerDataManager, const avsCommon::utils::configuration::ConfigurationNode &configurationRoot, std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > authDelegate=nullptr, std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder=nullptr)
 

Detailed Description

A class to manage the AVS Gateway the device is currently connected to.

It also provides a method to execute the gateway verification sequence by creating the PostConnectVerifyGatewaySender. Before establishing connection with AVS, clients must send the VerifyGateway event. If the response to this event is a 204 the client is connected to the right endpoint. If the response is 200, the client must connect to the new endpoint sent in the SetGateway directive.

Note that the AVS gateway verification sequence should be performed only on fresh devices or after a factory reset.

Constructor & Destructor Documentation

◆ ~AVSGatewayManager()

alexaClientSDK::avsGatewayManager::AVSGatewayManager::~AVSGatewayManager ( )

Destructor.

Member Function Documentation

◆ addObserver()

void alexaClientSDK::avsGatewayManager::AVSGatewayManager::addObserver ( std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayObserverInterface observer)
override

◆ clearData()

void alexaClientSDK::avsGatewayManager::AVSGatewayManager::clearData ( )
overridevirtual

Reset any internal state that may be associated with a particular user.

Warning
Object must succeed in deleting any customer data.
This method is called while CustomerDataManager is in a locked state. Do not call or wait for any CustomerDataManager operation.

Implements alexaClientSDK::registrationManager::CustomerDataHandlerInterface.

◆ create()

static std::shared_ptr<AVSGatewayManager> alexaClientSDK::avsGatewayManager::AVSGatewayManager::create ( std::shared_ptr< storage::AVSGatewayManagerStorageInterface avsGatewayManagerStorage,
std::shared_ptr< registrationManager::CustomerDataManagerInterface customerDataManager,
const avsCommon::utils::configuration::ConfigurationNode configurationRoot,
std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface authDelegate = nullptr,
std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface metricRecorder = nullptr 
)
static

Creates an instance of the AVSGatewayManager.

Deprecated:
Parameters
avsGatewayManagerStorageThe AVSGatewayManagerInterface to store avs gateway information.
customerDataManagerThe CustomerDataManager object that will track the CustomerDataHandler.
configurationRootThe ConfigurationNode to get AVS gateway information from the config file.
authDelegateThe AuthDelegateInterface to add AuthObservers to take action once Auth state changes
metricRecorderOptional MetricRecorderInterface object for sending metrics.
Returns
A new instance of the AVSGatewayManager.

◆ createAVSGatewayManagerInterface()

static std::shared_ptr<avsCommon::sdkInterfaces::AVSGatewayManagerInterface> alexaClientSDK::avsGatewayManager::AVSGatewayManager::createAVSGatewayManagerInterface ( std::unique_ptr< storage::AVSGatewayManagerStorageInterface avsGatewayManagerStorage,
const std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > &  authDelegate,
const std::shared_ptr< registrationManager::CustomerDataManagerInterface > &  customerDataManager,
const std::shared_ptr< avsCommon::utils::configuration::ConfigurationNode > &  configurationRoot,
const std::shared_ptr< acsdkPostConnectOperationProviderRegistrarInterfaces::PostConnectOperationProviderRegistrarInterface > &  providerRegistrar,
std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface metricRecorder 
)
static

Creates an instance of the AVSGatewayManagerInterface.

Parameters
avsGatewayManagerStorageThe AVSGatewayManagerInterface to store avs gateway information.
authDelegateThe AuthDelegateInterface to add AuthObservers to take action once Auth state changes
customerDataManagerThe CustomerDataManager object that will track the CustomerDataHandler.
configurationRootThe ConfigurationNode to get AVS gateway information from the config file.
providerRegistrarObject with which to register the new instance as a post connect operation provider.
metricRecorderOptional MetricRecorderInterface object for sending metrics.
Returns
A new instance of the AVSGatewayManager.

◆ createPostConnectOperation()

std::shared_ptr<avsCommon::sdkInterfaces::PostConnectOperationInterface> alexaClientSDK::avsGatewayManager::AVSGatewayManager::createPostConnectOperation ( )
overridevirtual

Creates a post connect operation instance.

Returns
a new instance of the PostConnectOperationInterface.

Implements alexaClientSDK::avsCommon::sdkInterfaces::PostConnectOperationProviderInterface.

◆ getGatewayURL()

std::string alexaClientSDK::avsGatewayManager::AVSGatewayManager::getGatewayURL ( ) const
overridevirtual

Gets the AVS Gateway URL.

Returns
The string representing the AVS Gateway URL

Implements alexaClientSDK::avsCommon::sdkInterfaces::AVSGatewayManagerInterface.

◆ onGatewayVerified()

void alexaClientSDK::avsGatewayManager::AVSGatewayManager::onGatewayVerified ( const std::shared_ptr< avsCommon::sdkInterfaces::PostConnectOperationInterface > &  verifyGatewaySender)

Callback method that will be called from PostConnectVerifyGatewaySender to signal successful verification of AVS gateway

Parameters
verifyGatewaySenderThe pointer to the PostConnectVerifyGatewaySender.

◆ removeObserver()

void alexaClientSDK::avsGatewayManager::AVSGatewayManager::removeObserver ( std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayObserverInterface observer)
override

◆ setAVSGatewayAssigner()

bool alexaClientSDK::avsGatewayManager::AVSGatewayManager::setAVSGatewayAssigner ( std::shared_ptr< avsCommon::sdkInterfaces::AVSGatewayAssignerInterface avsGatewayAssigner)
override

◆ setGatewayURL()

bool alexaClientSDK::avsGatewayManager::AVSGatewayManager::setGatewayURL ( const std::string &  avsGatewayURL)
overridevirtual

Sets the AVS Gateway URL.

Parameters
avsGatewayURLThe string representing the AVS Gateway URL.
Returns
True if successful, else false.

Implements alexaClientSDK::avsCommon::sdkInterfaces::AVSGatewayManagerInterface.


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