AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Attributes | List of all members
alexaClientSDK::sampleApp::GuiRenderer Class Reference

#include <GuiRenderer.h>

Inheritance diagram for alexaClientSDK::sampleApp::GuiRenderer:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::sampleApp::GuiRenderer:
Collaboration graph
[legend]

Public Member Functions

 GuiRenderer ()
 
bool getGuiToggleState (const std::string &toggleName)
 returns the PlayerInfo toggle state More...
 
TemplateRuntimeObserverInterface Functions
void renderTemplateCard (const std::string &jsonPayload, avsCommon::avs::FocusState focusState) override
 
void clearTemplateCard () override
 
void renderPlayerInfoCard (const std::string &jsonPayload, TemplateRuntimeObserverInterface::AudioPlayerInfo info, avsCommon::avs::FocusState focusState) override
 
void clearPlayerInfoCard () override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::TemplateRuntimeObserverInterface
virtual ~TemplateRuntimeObserverInterface ()=default
 

Static Public Attributes

static const std::string TOGGLE_ACTION_SELECTED = "SELECTED"
 String to identify the AVS action SELECTED string. More...
 
static const std::string TOGGLE_ACTION_DESELECTED = "DESELECTED"
 String to identify the AVS action DESELECTED string. More...
 
static const std::string TOGGLE_NAME_SHUFFLE = "SHUFFLE"
 String to identify the AVS name SHUFFLE string. More...
 
static const std::string TOGGLE_NAME_LOOP = "LOOP"
 String to identify the AVS name LOOP string. More...
 
static const std::string TOGGLE_NAME_REPEAT = "REPEAT"
 String to identify the AVS name REPEAT string. More...
 
static const std::string TOGGLE_NAME_THUMBSUP = "THUMBS_UP"
 String to identify the AVS name THUMBS_UP string. More...
 
static const std::string TOGGLE_NAME_THUMBSDOWN = "THUMBS_DOWN"
 String to identify the AVS name THUMBS_DOWN string. More...
 

Detailed Description

A class that implements the TemplateRuntimeObserverInterface. Instead of rendering the display cards, this class will print out some useful information (e.g. JSON payload) when the renderTemplateCard or renderPlayerInfoCard callbacks are called.

It is also used to track the PlayerInfo controls, and provide the PlayerInfo toggle states.

Note
Due to the payload in RenderTemplate may contain sensitive information, the payload will only be printed if ACSDK_EMIT_SENSITIVE_LOGS is ON.

Constructor & Destructor Documentation

◆ GuiRenderer()

alexaClientSDK::sampleApp::GuiRenderer::GuiRenderer ( )

Constructor.

Member Function Documentation

◆ clearPlayerInfoCard()

void alexaClientSDK::sampleApp::GuiRenderer::clearPlayerInfoCard ( )
overridevirtual

Used to notify the observer when the client should clear the PlayerInfo display card. Once the card is cleared, the client should call templateCardCleared().

Implements alexaClientSDK::avsCommon::sdkInterfaces::TemplateRuntimeObserverInterface.

◆ clearTemplateCard()

void alexaClientSDK::sampleApp::GuiRenderer::clearTemplateCard ( )
overridevirtual

Used to notify the observer when the client should clear the Template display card. Once the card is cleared, the client should call templateCardCleared().

Implements alexaClientSDK::avsCommon::sdkInterfaces::TemplateRuntimeObserverInterface.

◆ getGuiToggleState()

bool alexaClientSDK::sampleApp::GuiRenderer::getGuiToggleState ( const std::string &  toggleName)

returns the PlayerInfo toggle state

◆ renderPlayerInfoCard()

void alexaClientSDK::sampleApp::GuiRenderer::renderPlayerInfoCard ( const std::string &  jsonPayload,
TemplateRuntimeObserverInterface::AudioPlayerInfo  audioPlayerInfo,
avsCommon::avs::FocusState  focusState 
)
overridevirtual

Used to notify the observer when a RenderPlayerInfo directive is received. Once called, the client should render the PlayerInfo display card based on the metadata provided in the payload in structured JSON format.

Parameters
jsonPayloadThe payload of the RenderPlayerInfo directive in structured JSON format.
audioPlayerInfoInformation on the AudioPlayer.
focusStateThe FocusState of the channel used by TemplateRuntime interface.

Implements alexaClientSDK::avsCommon::sdkInterfaces::TemplateRuntimeObserverInterface.

◆ renderTemplateCard()

void alexaClientSDK::sampleApp::GuiRenderer::renderTemplateCard ( const std::string &  jsonPayload,
avsCommon::avs::FocusState  focusState 
)
overridevirtual

Used to notify the observer when a RenderTemplate directive is received. Once called, the client should render the Template display card based on the metadata provided in the payload in structured JSON format.

Note
The payload may contain customer sensitive information and should be used with utmost care. Failure to do so may result in exposing or mishandling of customer data.
Parameters
jsonPayloadThe payload of the RenderTemplate directive in structured JSON format.
focusStateThe FocusState of the channel used by TemplateRuntime interface.

Implements alexaClientSDK::avsCommon::sdkInterfaces::TemplateRuntimeObserverInterface.

Member Data Documentation

◆ TOGGLE_ACTION_DESELECTED

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_ACTION_DESELECTED = "DESELECTED"
static

String to identify the AVS action DESELECTED string.

◆ TOGGLE_ACTION_SELECTED

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_ACTION_SELECTED = "SELECTED"
static

String to identify the AVS action SELECTED string.

◆ TOGGLE_NAME_LOOP

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_NAME_LOOP = "LOOP"
static

String to identify the AVS name LOOP string.

◆ TOGGLE_NAME_REPEAT

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_NAME_REPEAT = "REPEAT"
static

String to identify the AVS name REPEAT string.

◆ TOGGLE_NAME_SHUFFLE

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_NAME_SHUFFLE = "SHUFFLE"
static

String to identify the AVS name SHUFFLE string.

◆ TOGGLE_NAME_THUMBSDOWN

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_NAME_THUMBSDOWN = "THUMBS_DOWN"
static

String to identify the AVS name THUMBS_DOWN string.

◆ TOGGLE_NAME_THUMBSUP

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_NAME_THUMBSUP = "THUMBS_UP"
static

String to identify the AVS name THUMBS_UP string.


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

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