AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <DiscoveryEventSender.h>
Public Member Functions | |
~DiscoveryEventSender () | |
DiscoveryEventSenderInterface method overrides. | |
bool | sendDiscoveryEvents (const std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > &messageSender) override |
void | stop () override |
void | addDiscoveryStatusObserver (const std::shared_ptr< DiscoveryStatusObserverInterface > &observer) override |
void | removeDiscoveryStatusObserver (const std::shared_ptr< DiscoveryStatusObserverInterface > &observer) override |
AlexaEventProcessedObserverInterface method overrides. | |
void | onAlexaEventProcessedReceived (const std::string &eventCorrelationToken) override |
AuthObserverInterface method overrides. | |
void | onAuthStateChange (AuthObserverInterface::State newState, AuthObserverInterface::Error newError) override |
Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::AlexaEventProcessedObserverInterface | |
virtual | ~AlexaEventProcessedObserverInterface ()=default |
Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface | |
virtual | ~AuthObserverInterface ()=default |
virtual void | onAuthStateChange (State newState, Error error)=0 |
Static Public Member Functions | |
static std::shared_ptr< DiscoveryEventSender > | create (const std::unordered_map< std::string, std::string > &addOrUpdateReportEndpoints, const std::unordered_map< std::string, std::string > &deleteReportEndpoints, const std::shared_ptr< avsCommon::sdkInterfaces::AuthDelegateInterface > &authDelegate, bool waitForEventProcessed=true, const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &metricRecorder=nullptr, bool postConnect=false) |
Additional Inherited Members | |
Public Types inherited from alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface | |
enum | State { State::UNINITIALIZED, State::REFRESHED, State::EXPIRED, State::UNRECOVERABLE_ERROR, State::AUTHORIZING } |
The enum State describes the state of authorization. More... | |
enum | Error { Error::SUCCESS, Error::UNKNOWN_ERROR, Error::AUTHORIZATION_FAILED, Error::UNAUTHORIZED_CLIENT, Error::SERVER_ERROR, Error::INVALID_REQUEST, Error::INVALID_VALUE, Error::AUTHORIZATION_EXPIRED, Error::UNSUPPORTED_GRANT_TYPE, Error::INVALID_CODE_PAIR, Error::AUTHORIZATION_PENDING, Error::SLOW_DOWN, Error::INTERNAL_ERROR, Error::INVALID_CBL_CLIENT_ID } |
The enum Error encodes possible errors which may occur when changing state. More... | |
This class publishes Discovery.AddOrUpdateReport
and Discovery.DeleteReport
events.
alexaClientSDK::capabilitiesDelegate::DiscoveryEventSender::~DiscoveryEventSender | ( | ) |
Destructor.
|
overridevirtual |
Adds a DiscoveryStatusObserverInterface
observer.
Implements alexaClientSDK::capabilitiesDelegate::DiscoveryEventSenderInterface.
|
static |
Creates a new instance of the DiscoveryEventSender
.
addOrUpdateReportEndpoints | The map of endpoints for which the Discovery.AddOrUpdateReport event will be sent. |
deleteReportEndpoints | The map of endpoints for which the Discovery.DeleteReport event will be sent. |
authDelegate | The auth delegate instance to request the auth token from to be sent in the Discovery events. |
waitForEventProcessed | Indicate if sender should wait for the EventProcessed directive. Default is true. |
metricRecorder | Optional (may be nullptr) reference to metric recorder. |
postConnect | Indicate if sender is operating in post-connect operation context. Default is false. |
DiscoveryEventSender
.
|
overridevirtual |
This function is called whenever an Alexa.EventProcessed directive is received.
eventCorrelationToken | The EventCorrelationToken string. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::AlexaEventProcessedObserverInterface.
|
override |
|
overridevirtual |
Removes a DiscoveryStatusObserverInterface
observer.
Implements alexaClientSDK::capabilitiesDelegate::DiscoveryEventSenderInterface.
|
overridevirtual |
Sends Discovery.AddOrUpdateReport and Discovery.deleteReport events for the addOrUpdateEndpoints and deleteReportEndpoints with which this object was created.
messageSender | The MessageSenderInterface to send messages. |
Implements alexaClientSDK::capabilitiesDelegate::DiscoveryEventSenderInterface.
|
overridevirtual |
Method to stop execution and unblock any condition variables that are waiting.
Implements alexaClientSDK::capabilitiesDelegate::DiscoveryEventSenderInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0