AlexaClientSDK  3.0.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 ()
 
avsCommon::utils::Optional< bool > getGuiToggleState (const std::string &toggleName)
 
TemplateRuntimeObserverInterface Functions
void renderTemplateCard (const std::string &jsonPayload) override
 
void renderPlayerInfoCard (const std::string &jsonPayload, TemplateRuntimeObserverInterface::AudioPlayerInfo info) override
 
- Public Member Functions inherited from alexaClientSDK::templateRuntimeInterfaces::TemplateRuntimeObserverInterface
virtual ~TemplateRuntimeObserverInterface ()=default
 
virtual void renderPlayerInfoCard (const std::string &jsonPayload, TemplateRuntimeObserverInterface::AudioPlayerInfo audioPlayerInfo)=0
 

Static Public Attributes

static const std::string TOGGLE_ACTION_SELECTED
 String to identify the AVS action SELECTED string. More...
 
static const std::string TOGGLE_ACTION_DESELECTED
 String to identify the AVS action DESELECTED string. More...
 
static const std::string TOGGLE_NAME_SHUFFLE
 String to identify the AVS name SHUFFLE string. More...
 
static const std::string TOGGLE_NAME_LOOP
 String to identify the AVS name LOOP string. More...
 
static const std::string TOGGLE_NAME_REPEAT
 String to identify the AVS name REPEAT string. More...
 
static const std::string TOGGLE_NAME_THUMBSUP
 String to identify the AVS name THUMBS_UP string. More...
 
static const std::string TOGGLE_NAME_THUMBSDOWN
 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

◆ getGuiToggleState()

avsCommon::utils::Optional<bool> alexaClientSDK::sampleApp::GuiRenderer::getGuiToggleState ( const std::string &  toggleName)

Returns the UI state of a toggle button

Parameters
toggleNameName of the toggle button
Returns
Optional boolean if the toggle button name is valid. True if button is set, false otherwise.

◆ renderPlayerInfoCard()

void alexaClientSDK::sampleApp::GuiRenderer::renderPlayerInfoCard ( const std::string &  jsonPayload,
TemplateRuntimeObserverInterface::AudioPlayerInfo  info 
)
override

◆ renderTemplateCard()

void alexaClientSDK::sampleApp::GuiRenderer::renderTemplateCard ( const std::string &  jsonPayload)
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.

Implements alexaClientSDK::templateRuntimeInterfaces::TemplateRuntimeObserverInterface.

Member Data Documentation

◆ TOGGLE_ACTION_DESELECTED

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_ACTION_DESELECTED
static

String to identify the AVS action DESELECTED string.

◆ TOGGLE_ACTION_SELECTED

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_ACTION_SELECTED
static

String to identify the AVS action SELECTED string.

◆ TOGGLE_NAME_LOOP

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_NAME_LOOP
static

String to identify the AVS name LOOP string.

◆ TOGGLE_NAME_REPEAT

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_NAME_REPEAT
static

String to identify the AVS name REPEAT string.

◆ TOGGLE_NAME_SHUFFLE

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_NAME_SHUFFLE
static

String to identify the AVS name SHUFFLE string.

◆ TOGGLE_NAME_THUMBSDOWN

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_NAME_THUMBSDOWN
static

String to identify the AVS name THUMBS_DOWN string.

◆ TOGGLE_NAME_THUMBSUP

const std::string alexaClientSDK::sampleApp::GuiRenderer::TOGGLE_NAME_THUMBSUP
static

String to identify the AVS name THUMBS_UP string.


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