AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
alexaClientSDK::capabilityAgents::playbackController::PlaybackCommand Class Referenceabstract

#include <PlaybackCommand.h>

Inheritance diagram for alexaClientSDK::capabilityAgents::playbackController::PlaybackCommand:
Inheritance graph
[legend]

Public Member Functions

 PlaybackCommand (const std::string &name)
 
virtual ~PlaybackCommand ()=default
 
virtual std::string getEventName () const =0
 
virtual std::string getEventPayload () const =0
 

Static Public Member Functions

static const PlaybackCommandbuttonToCommand (avsCommon::avs::PlaybackButton button)
 
static const PlaybackCommandtoggleToCommand (avsCommon::avs::PlaybackToggle toggle, bool action)
 

Protected Attributes

const std::string m_name
 The distinct AVS name of a command. More...
 

Friends

std::ostream & operator<< (std::ostream &, const PlaybackCommand &command)
 

Detailed Description

This class represents a specific PlaybackController interface command.

Constructor & Destructor Documentation

◆ PlaybackCommand()

alexaClientSDK::capabilityAgents::playbackController::PlaybackCommand::PlaybackCommand ( const std::string &  name)

Constructor

Parameters
nameThe distinguishing command name. It is either the event name(v1.0), or the payload name(v1.1).

◆ ~PlaybackCommand()

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

Destructor.

Member Function Documentation

◆ buttonToCommand()

const PlaybackCommand & alexaClientSDK::capabilityAgents::playbackController::PlaybackCommand::buttonToCommand ( avsCommon::avs::PlaybackButton  button)
static

Convert a Button to a PlaybackCommand

Parameters
buttona Button
Returns
The matched PlaybackCommand

◆ getEventName()

virtual std::string alexaClientSDK::capabilityAgents::playbackController::PlaybackCommand::getEventName ( ) const
pure virtual

◆ getEventPayload()

virtual std::string alexaClientSDK::capabilityAgents::playbackController::PlaybackCommand::getEventPayload ( ) const
pure virtual

◆ toggleToCommand()

const PlaybackCommand & alexaClientSDK::capabilityAgents::playbackController::PlaybackCommand::toggleToCommand ( avsCommon::avs::PlaybackToggle  toggle,
bool  action 
)
static

Convert a Toggle to a PlaybackCommand

Parameters
togglea Toggle
Returns
The matched PlaybackCommand

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const PlaybackCommand command 
)
friend

Write a command value to an ostream as a string.

Parameters
streamThe stream to write the value to.
commandThe PlaybackCommand value to write to the ostream as a string.
Returns
The ostream that was passed in and written to.

Member Data Documentation

◆ m_name

const std::string alexaClientSDK::capabilityAgents::playbackController::PlaybackCommand::m_name
protected

The distinct AVS name of a command.


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