AlexaClientSDK  1.22.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::sdkInterfaces::PlaybackRouterInterface Class Referenceabstract

#include <PlaybackRouterInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::PlaybackRouterInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~PlaybackRouterInterface ()=default
 
virtual void buttonPressed (avsCommon::avs::PlaybackButton button)=0
 
virtual void togglePressed (avsCommon::avs::PlaybackToggle toggle, bool action)=0
 
virtual void setHandler (std::shared_ptr< PlaybackHandlerInterface > handler, std::shared_ptr< LocalPlaybackHandlerInterface > localHandler=nullptr)=0
 
virtual void switchToDefaultHandler ()=0
 
virtual void useDefaultHandlerWith (std::shared_ptr< LocalPlaybackHandlerInterface > localHandler)
 
virtual bool localOperation (LocalPlaybackHandlerInterface::PlaybackOperation op)
 
virtual bool localSeekTo (std::chrono::milliseconds location, bool fromStart)
 

Detailed Description

The PlaybackRouterInterface used to get a playback button press and send it it to the current handler.

Constructor & Destructor Documentation

◆ ~PlaybackRouterInterface()

virtual alexaClientSDK::avsCommon::sdkInterfaces::PlaybackRouterInterface::~PlaybackRouterInterface ( )
virtualdefault

Destructor

Member Function Documentation

◆ buttonPressed()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::PlaybackRouterInterface::buttonPressed ( avsCommon::avs::PlaybackButton  button)
pure virtual

This method can be called by the client when a Button is pressed on a physical button or on the GUI. A ButtonCommandIssued event message will be sent to the observer. NOTE: Instances may attempt to handle button locally first.

Parameters
buttonThe PlaybackButton type being pressed

Implemented in alexaClientSDK::capabilityAgents::playbackController::PlaybackRouter.

◆ localOperation()

virtual bool alexaClientSDK::avsCommon::sdkInterfaces::PlaybackRouterInterface::localOperation ( LocalPlaybackHandlerInterface::PlaybackOperation  op)
inlinevirtual

Request the handler to perform a local playback operation. NOTE: If local operation is not possable, Instances may fall back on ButtonPressed

Parameters
opOperation to request
Returns
true if successful, false if the operation cannot be performed locally.

Reimplemented in alexaClientSDK::capabilityAgents::playbackController::PlaybackRouter.

◆ localSeekTo()

virtual bool alexaClientSDK::avsCommon::sdkInterfaces::PlaybackRouterInterface::localSeekTo ( std::chrono::milliseconds  location,
bool  fromStart 
)
inlinevirtual

Request the handler to perform a local seek operation.

Parameters
locationPosition to seek to
fromStarttrue to seek to absolute location, false to seek reletive to current location.
Returns
true if successful, false if the operation cannot be performed locally.

Reimplemented in alexaClientSDK::capabilityAgents::playbackController::PlaybackRouter.

◆ setHandler()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::PlaybackRouterInterface::setHandler ( std::shared_ptr< PlaybackHandlerInterface handler,
std::shared_ptr< LocalPlaybackHandlerInterface localHandler = nullptr 
)
pure virtual

This method sets the playback button press handler that any time a button is pressed this handler will be called.

Parameters
handler- The handler to call on future playback button presses.
localHandlerThe handler to use for local requests. nullptr to disable local requests

◆ switchToDefaultHandler()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::PlaybackRouterInterface::switchToDefaultHandler ( )
pure virtual

This method switches playback button pressess handling to the default handler.

Implemented in alexaClientSDK::capabilityAgents::playbackController::PlaybackRouter.

◆ togglePressed()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::PlaybackRouterInterface::togglePressed ( avsCommon::avs::PlaybackToggle  toggle,
bool  action 
)
pure virtual

This method can be called by the client when a Toggle is pressed on a physical button or on the GUI. A ToggleCommandIssued event message will be sent to the observer.

Parameters
toggleThe PlaybackToggle type being pressed
actionThe boolean action for the toggle state

Implemented in alexaClientSDK::capabilityAgents::playbackController::PlaybackRouter.

◆ useDefaultHandlerWith()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::PlaybackRouterInterface::useDefaultHandlerWith ( std::shared_ptr< LocalPlaybackHandlerInterface localHandler)
inlinevirtual

This method switches playback button pressess handling to the default handler, and enables the given local Handler.


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

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