AlexaClientSDK  1.26.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::capabilityAgents::playbackController::PlaybackController Class Reference

#include <PlaybackController.h>

Inheritance diagram for alexaClientSDK::capabilityAgents::playbackController::PlaybackController:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::capabilityAgents::playbackController::PlaybackController:
Collaboration graph
[legend]

Public Member Functions

virtual ~PlaybackController ()=default
 
void messageSent (const PlaybackCommand &, avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status messageStatus)
 
ContextRequesterInterface Functions
void onContextAvailable (const std::string &jsonContext) override
 
void onContextFailure (const avsCommon::sdkInterfaces::ContextRequestError error) override
 
PlaybackControllerInterface Functions
void onButtonPressed (avsCommon::avs::PlaybackButton button) override
 
void onTogglePressed (avsCommon::avs::PlaybackToggle toggle, bool action) override
 
CapabilityConfigurationInterface Functions
std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > getCapabilityConfigurations () override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface
virtual ~ContextRequesterInterface ()=default
 
virtual void onContextAvailable (const endpoints::EndpointIdentifier &endpointId, const avs::AVSContext &endpointContext, ContextRequestToken requestToken)
 
virtual void onContextFailure (const ContextRequestError error, ContextRequestToken token)
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::PlaybackHandlerInterface
virtual ~PlaybackHandlerInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::CapabilityConfigurationInterface
virtual ~CapabilityConfigurationInterface ()=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::shared_ptr< PlaybackHandlerInterfacecreatePlaybackHandlerInterface (std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > messageSender, std::shared_ptr< acsdkShutdownManagerInterfaces::ShutdownNotifierInterface > shutdownNotifier, acsdkManufactory::Annotated< avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation, avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesRegistrarInterface > defaultEndpointCapabilitiesRegistrar)
 
static std::shared_ptr< PlaybackControllercreate (std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > messageSender)
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ ~PlaybackController()

virtual alexaClientSDK::capabilityAgents::playbackController::PlaybackController::~PlaybackController ( )
virtualdefault

Destructor.

Member Function Documentation

◆ create()

std::shared_ptr< PlaybackController > alexaClientSDK::capabilityAgents::playbackController::PlaybackController::create ( std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface contextManager,
std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface messageSender 
)
static

Create an instance of PlaybackController.

Parameters
contextManagerThe ContextManagerInterface used to generate system context for events.
messageSenderThe MessageSenderInterface that sends events to AVS.
Returns
nullptr if the inputs are not defined, else a new instance of PlaybackController.

◆ createPlaybackHandlerInterface()

std::shared_ptr< PlaybackHandlerInterface > alexaClientSDK::capabilityAgents::playbackController::PlaybackController::createPlaybackHandlerInterface ( std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface contextManager,
std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface messageSender,
std::shared_ptr< acsdkShutdownManagerInterfaces::ShutdownNotifierInterface shutdownNotifier,
acsdkManufactory::Annotated< avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation, avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesRegistrarInterface defaultEndpointCapabilitiesRegistrar 
)
static

Factory method to create an instance of PlaybackHandlerInterface.

Parameters
contextManagerThe ContextManagerInterface used to generate system context for events.
messageSenderThe MessageSenderInterface that sends events to AVS.
Returns
nullptr if the inputs are not defined, else a new instance of PlaybackController.

◆ getCapabilityConfigurations()

std::unordered_set< std::shared_ptr< CapabilityConfiguration > > alexaClientSDK::capabilityAgents::playbackController::PlaybackController::getCapabilityConfigurations ( )
overridevirtual

Returns the configurations of the capability interfaces being implemented.

Returns
A set of CapabilityConfigurations

Implements alexaClientSDK::avsCommon::sdkInterfaces::CapabilityConfigurationInterface.

◆ messageSent()

void alexaClientSDK::capabilityAgents::playbackController::PlaybackController::messageSent ( const PlaybackCommand command,
avsCommon::sdkInterfaces::MessageRequestObserverInterface::Status  messageStatus 
)

Manage completion of event being sent.

Parameters
PlaybackCommandThe or that was pressed to generate the message sent.
messageStatusThe status of submitted MessageRequest.

◆ onButtonPressed()

void alexaClientSDK::capabilityAgents::playbackController::PlaybackController::onButtonPressed ( avsCommon::avs::PlaybackButton  button)
overridevirtual

Used to notify the handler when a playback button is pressed.

Parameters
buttonThe button that has been pressed.

Implements alexaClientSDK::avsCommon::sdkInterfaces::PlaybackHandlerInterface.

◆ onContextAvailable()

void alexaClientSDK::capabilityAgents::playbackController::PlaybackController::onContextAvailable ( const std::string &  jsonContext)
overridevirtual

This is called by the ContextManager once the context is ready and available.

Deprecated:
This method is being deprecated since it cannot specify the source endpoint.
Note
The ContextRequester should perform minimum processing and return quickly. Otherwise it will block the processing of updating the of other ContextProviders.
Parameters
jsonContextContext information.Context provided is of the format {"context"[{...}, {...}]}

Reimplemented from alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface.

◆ onContextFailure()

void alexaClientSDK::capabilityAgents::playbackController::PlaybackController::onContextFailure ( const avsCommon::sdkInterfaces::ContextRequestError  error)
overridevirtual

The contextManager calls this if it is unable to process a getContext request successfully.

Deprecated:
This method is being deprecated since it cannot specify the optional token.
Note
The ContextRequester should perform minimum processing and return quickly. Otherwise it will block the processing of updating the of other ContextProviders.
Parameters
errorThe reason why the getContext request failed.

Reimplemented from alexaClientSDK::avsCommon::sdkInterfaces::ContextRequesterInterface.

◆ onTogglePressed()

void alexaClientSDK::capabilityAgents::playbackController::PlaybackController::onTogglePressed ( avsCommon::avs::PlaybackToggle  toggle,
bool  action 
)
overridevirtual

Used to notify the handler when a playback toggle is pressed.

Parameters
toggleThe toggle that has been pressed.
actionThe boolean action for the toggle state

Implements alexaClientSDK::avsCommon::sdkInterfaces::PlaybackHandlerInterface.


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

AlexaClientSDK 1.26.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0