AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Public Member Functions | List of all members
alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface Class Referenceabstract

#include <AlexaPlaybackControllerInterface.h>

Inheritance diagram for alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface:
Inheritance graph
[legend]

Classes

struct  Response
 

Public Member Functions

virtual ~AlexaPlaybackControllerInterface ()=default
 
virtual Response play ()=0
 
virtual Response pause ()=0
 
virtual Response stop ()=0
 
virtual Response startOver ()=0
 
virtual Response previous ()=0
 
virtual Response next ()=0
 
virtual Response rewind ()=0
 
virtual Response fastForward ()=0
 
virtual acsdkAlexaPlaybackControllerInterfaces::PlaybackState getPlaybackState ()=0
 
virtual std::set< acsdkAlexaPlaybackControllerInterfaces::PlaybackOperationgetSupportedOperations ()=0
 
virtual bool addObserver (const std::weak_ptr< AlexaPlaybackControllerObserverInterface > &observer)=0
 
virtual void removeObserver (const std::weak_ptr< AlexaPlaybackControllerObserverInterface > &observer)=0
 

Detailed Description

The AlexaPlaybackControllerInterface carries out playback controller actions such as play, pause, stop, start over, previous, next, rewind, fast forward.

An implementation of the AlexaPlaybackControllerInterface lets the user control media content interactions. Sends operations to the device for controlling playback of audio or video content. This includes play, pause, fastforward, etc. This can be called by multiple callers; for example, the AlexaPlaybackController Capability Agent or the application's GUI.

This interface can report to subscribers implemented the AlexaPlaybackControllerObserverInterface when there is a playback state change.

Note
Implementations of this interface must be thread-safe.

Constructor & Destructor Documentation

◆ ~AlexaPlaybackControllerInterface()

virtual alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::~AlexaPlaybackControllerInterface ( )
virtualdefault

Virtual destructor to assure proper cleanup of derived types.

Member Function Documentation

◆ addObserver()

virtual bool alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::addObserver ( const std::weak_ptr< AlexaPlaybackControllerObserverInterface > &  observer)
pure virtual

Adds a AlexaPlaybackControllerObserverInterface observer.

Note
If AlexaPlaybackControllerInterface implementation has configured its instance's property as proactively reported, then it is required to notify observers of AlexaPlaybackControllerObserverInterface for any change in its property state. This includes notifying the value when the device starts, if it is different from the last reported value.
Parameters
observerThe pointer to the AlexaPlaybackControllerObserverInterface.
Returns
true if the object supports observer notification and observer was successfully added; otherwise, return false

◆ fastForward()

virtual Response alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::fastForward ( )
pure virtual

Execute fast forward operation for audtio or video content on the device

Returns
A AlexaPlaybackControllerResponse to indicate whether playback operation was successfully executed or encountered an error while executing.

Implemented in alexaClientSDK::sampleApplications::common::EndpointAlexaPlaybackControllerHandler.

◆ getPlaybackState()

virtual acsdkAlexaPlaybackControllerInterfaces::PlaybackState alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::getPlaybackState ( )
pure virtual

Get the current playback state of the device.

Returns
Return the current playback state for the audio or video content PlaybackState
Note
If AlexaPlaybackControllerInterface implementation has configured its instance's property as retrievable, this method should return the current launch target state. Unlike AlexaPlaybackControllerObserverInterface observer methods, this returns the current playback state at any given point when requested, with or without a change in playback state.

Implemented in alexaClientSDK::sampleApplications::common::EndpointAlexaPlaybackControllerHandler.

◆ getSupportedOperations()

virtual std::set<acsdkAlexaPlaybackControllerInterfaces::PlaybackOperation> alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::getSupportedOperations ( )
pure virtual

Returns all supported playback operations the device is expected to understand.

Returns
A PlaybackOperation set object that contains the supported playback operations. e.g. Play, Pause, Stop, StartOver, Previous, Next, Rewind, FastForward

Implemented in alexaClientSDK::sampleApplications::common::EndpointAlexaPlaybackControllerHandler.

◆ next()

virtual Response alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::next ( )
pure virtual

Execute next operation for audio or video content on the device

Returns
A AlexaPlaybackControllerResponse to indicate whether playback operation was successfully executed or encountered an error while executing.

Implemented in alexaClientSDK::sampleApplications::common::EndpointAlexaPlaybackControllerHandler.

◆ pause()

virtual Response alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::pause ( )
pure virtual

Execute pause operation for audio or video content on the device

Returns
A AlexaPlaybackControllerResponse to indicate whether playback operation was successfully executed or encountered an error while executing.

Implemented in alexaClientSDK::sampleApplications::common::EndpointAlexaPlaybackControllerHandler.

◆ play()

virtual Response alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::play ( )
pure virtual

Execute play operation for audio or video content on the device

Returns
A AlexaPlaybackControllerResponse to indicate whether playback operation was successfully executed or encountered an error while executing.

Implemented in alexaClientSDK::sampleApplications::common::EndpointAlexaPlaybackControllerHandler.

◆ previous()

virtual Response alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::previous ( )
pure virtual

Execute previous operation for audio or video content on the device

Returns
A AlexaPlaybackControllerResponse to indicate whether playback operation was successfully executed or encountered an error while executing.

Implemented in alexaClientSDK::sampleApplications::common::EndpointAlexaPlaybackControllerHandler.

◆ removeObserver()

virtual void alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::removeObserver ( const std::weak_ptr< AlexaPlaybackControllerObserverInterface > &  observer)
pure virtual

Removes an observer of AlexaPlaybackControllerObserverInterface.

Parameters
observerThe pointer to the AlexaPlaybackControllerObserverInterface.

◆ rewind()

virtual Response alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::rewind ( )
pure virtual

Execute rewind operation for audio or video content on the device

Returns
A AlexaPlaybackControllerResponse to indicate whether playback operation was successfully executed or encountered an error while executing.

Implemented in alexaClientSDK::sampleApplications::common::EndpointAlexaPlaybackControllerHandler.

◆ startOver()

virtual Response alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::startOver ( )
pure virtual

Execute start over operation for audio or video content on the device

Returns
A AlexaPlaybackControllerResponse to indicate whether playback operation was successfully executed or encountered an error while executing.

Implemented in alexaClientSDK::sampleApplications::common::EndpointAlexaPlaybackControllerHandler.

◆ stop()

virtual Response alexaClientSDK::acsdkAlexaPlaybackControllerInterfaces::AlexaPlaybackControllerInterface::stop ( )
pure virtual

Execute stop operation for audio or video content on the device

Returns
A AlexaPlaybackControllerResponse to indicate whether playback operation was successfully executed or encountered an error while executing.

Implemented in alexaClientSDK::sampleApplications::common::EndpointAlexaPlaybackControllerHandler.


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

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