AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | Static Public Member Functions | List of all members
alexaClientSDK::acsdkAlerts::renderer::RendererObserverInterface Class Referenceabstract

#include <RendererObserverInterface.h>

Inheritance diagram for alexaClientSDK::acsdkAlerts::renderer::RendererObserverInterface:
Inheritance graph
[legend]

Public Types

enum  State {
  State::UNSET, State::STARTED, State::STOPPED, State::COMPLETED,
  State::ERROR
}
 

Public Member Functions

virtual ~RendererObserverInterface ()=default
 
virtual void onRendererStateChange (State state, const std::string &reason="")=0
 

Static Public Member Functions

static std::string stateToString (State state)
 

Detailed Description

An interface class which specifies an observer to an Alert renderer.

Member Enumeration Documentation

◆ State

The states which a Renderer may be in.

Enumerator
UNSET 

An uninitialized value.

STARTED 

The renderer has started rendering.

STOPPED 

The renderer has stopped rendering due to being stopped via a direct api call.

COMPLETED 

The renderer has completed rendering, if the renderer was initiated with a finite loop count.

ERROR 

The renderer has encountered an error.

Constructor & Destructor Documentation

◆ ~RendererObserverInterface()

virtual alexaClientSDK::acsdkAlerts::renderer::RendererObserverInterface::~RendererObserverInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ onRendererStateChange()

virtual void alexaClientSDK::acsdkAlerts::renderer::RendererObserverInterface::onRendererStateChange ( State  state,
const std::string &  reason = "" 
)
pure virtual

A callback function to communicate a change in render state.

Parameters
stateThe current state of the renderer.
reasonThe reason for the change of state, if required. This is typically set on an error.

Implemented in alexaClientSDK::acsdkAlerts::Alert, and alexaClientSDK::acsdkAlerts::renderer::test::MockRendererObserver.

◆ stateToString()

std::string alexaClientSDK::acsdkAlerts::renderer::RendererObserverInterface::stateToString ( State  state)
inlinestatic

Convert a State to a std::string.

Parameters
stateThe State to convert.
Returns
The string representation of state.

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