AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <EndpointRegistrationManager.h>
Public Member Functions | |
~EndpointRegistrationManager () | |
void | waitForPendingRegistrationsToEnqueue () |
@c EndpointRegistrationManagerInterface methods. | |
std::future< RegistrationResult > | registerEndpoint (std::shared_ptr< EndpointInterface > endpoint) override |
std::future< UpdateResult > | updateEndpoint (const EndpointIdentifier &endpointId, const std::shared_ptr< EndpointModificationData > &endpointModificationData) override |
std::future< DeregistrationResult > | deregisterEndpoint (const EndpointIdentifier &endpointId) override |
void | addObserver (std::shared_ptr< EndpointRegistrationObserverInterface > observer) override |
void | removeObserver (const std::shared_ptr< EndpointRegistrationObserverInterface > &observer) override |
Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointRegistrationManagerInterface | |
virtual | ~EndpointRegistrationManagerInterface ()=default |
Public Member Functions inherited from alexaClientSDK::avsCommon::utils::RequiresShutdown | |
RequiresShutdown (const std::string &name) | |
virtual | ~RequiresShutdown () |
Destructor. More... | |
const std::string & | name () const |
void | shutdown () |
bool | isShutdown () const |
Static Public Member Functions | |
static std::unique_ptr< EndpointRegistrationManager > | create (std::shared_ptr< avsCommon::sdkInterfaces::DirectiveSequencerInterface > directiveSequencer, std::shared_ptr< avsCommon::sdkInterfaces::CapabilitiesDelegateInterface > capabilitiesDelegate, const EndpointIdentifier &defaultEndpointId) |
Protected Member Functions | |
@c RequiresShutdown methods. | |
void | doShutdown () override |
Class responsible for managing endpoints that are registered with AVS and that can be controlled by this client.
using alexaClientSDK::endpoints::EndpointRegistrationManager::EndpointIdentifier = avsCommon::sdkInterfaces::endpoints::EndpointIdentifier |
using alexaClientSDK::endpoints::EndpointRegistrationManager::EndpointInterface = avsCommon::sdkInterfaces::endpoints::EndpointInterface |
using alexaClientSDK::endpoints::EndpointRegistrationManager::EndpointModificationData = avsCommon::sdkInterfaces::endpoints::EndpointModificationData |
using alexaClientSDK::endpoints::EndpointRegistrationManager::EndpointRegistrationObserverInterface = avsCommon::sdkInterfaces::endpoints::EndpointRegistrationObserverInterface |
alexaClientSDK::endpoints::EndpointRegistrationManager::~EndpointRegistrationManager | ( | ) |
Destructor.
|
overridevirtual |
Adds a registration manager observer to be notified when a registration has succeeded.
observer | The observer to add. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointRegistrationManagerInterface.
|
static |
Create an EndpointRegistrationManager
.
directiveSequencer | Object used to route directives sent to this device. |
capabilitiesDelegate | Object used to register an endpoint and its capabilities. |
defaultEndpointId | The EndpointIdentifier of the default endpoint. |
EndpointRegistrationManager
if it succeeds; otherwise, return nullptr
.
|
overridevirtual |
Deregisters an endpoint.
endpoint | The EndpointIdentifier of the endpoint to be deregistered. |
true
when the endpoint has been deregistered, or that is set to false
if the operation failed. EndpointRegistrationObserverInterface
to get notified whenever the operation succeeds or fails. Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointRegistrationManagerInterface.
|
overrideprotectedvirtual |
Prepares/enables this object to be deleted. This should be the last function called on this object prior to deleting (or resetting) its shared_ptr.
Implements alexaClientSDK::avsCommon::utils::RequiresShutdown.
|
overridevirtual |
Registers an endpoint.
endpoint | A pointer to the EndpointInterface to be registered. |
true
when the endpoint has been registered and enabled, or that is set to false
if the operation failed. EndpointRegistrationObserverInterface
to get notified whenever the operation succeeds or fails. Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointRegistrationManagerInterface.
|
overridevirtual |
Remove a previously registered observer.
observer | The observer to be removed. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointRegistrationManagerInterface.
|
overridevirtual |
Update an existing endpoint.
endpointId | The EndpointIdentifier of the endpoint to be updated. |
endpointModificationData | A pointer to the EndpointModificationData used to update the endpoint. |
true
when the endpoint has been updated, or that is set to false
if the operation failed. EndpointRegistrationObserverInterface
to get notified whenever the operation succeeds or fails. endpointModificationData
, the desync of capabilities between AVS and the device would happen. Applications should treat failure to update the default endpoint as a critical error. Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointRegistrationManagerInterface.
void alexaClientSDK::endpoints::EndpointRegistrationManager::waitForPendingRegistrationsToEnqueue | ( | ) |
Wait for all pending registrations and deregistrations to be enqueued for publishing.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0