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::acsdkExternalMediaPlayer::AuthorizedSender Class Reference

#include <AuthorizedSender.h>

Inheritance diagram for alexaClientSDK::acsdkExternalMediaPlayer::AuthorizedSender:
Inheritance graph
Collaboration diagram for alexaClientSDK::acsdkExternalMediaPlayer::AuthorizedSender:
Collaboration graph

Public Member Functions

 ~AuthorizedSender () override
void updateAuthorizedPlayers (const std::unordered_set< std::string > &playerIds)
MessageSenderInterface Functions.
void sendMessage (std::shared_ptr< avsCommon::avs::MessageRequest > request) override
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::MessageSenderInterface
virtual ~MessageSenderInterface ()=default
 Destructor. More...
virtual void sendMessage (std::shared_ptr< avs::MessageRequest > request)=0

Static Public Member Functions

static std::shared_ptr< AuthorizedSendercreate (std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > messageSender)

Detailed Description

If an adapter/player is not authorized, it is not allowed to send events or be mentioned in the Context. This class parses the MessageRequest JSON and sends the message if the sender has an authorized playerId. This also means that this class will block events that do not have a playerId field in the payload. By default, no players are authorized.

Constructor & Destructor Documentation

◆ ~AuthorizedSender()

alexaClientSDK::acsdkExternalMediaPlayer::AuthorizedSender::~AuthorizedSender ( )

Member Function Documentation

◆ create()

static std::shared_ptr<AuthorizedSender> alexaClientSDK::acsdkExternalMediaPlayer::AuthorizedSender::create ( std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface messageSender)

Creates an instance of the AuthorizedSender.

messageSenderSends messages to the cloud.
A valid instance if creation was successful, else a nullptr.

◆ sendMessage()

void alexaClientSDK::acsdkExternalMediaPlayer::AuthorizedSender::sendMessage ( std::shared_ptr< avsCommon::avs::MessageRequest request)

◆ updateAuthorizedPlayers()

void alexaClientSDK::acsdkExternalMediaPlayer::AuthorizedSender::updateAuthorizedPlayers ( const std::unordered_set< std::string > &  playerIds)

Update the list of authorized players that are allowed to send messages.

playerIdsThe authorized players.

The documentation for this class was generated from the following file:

AlexaClientSDK 3.0.0 - Copyright 2016-2022, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0