AlexaClientSDK  1.19.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::capabilityAgents::alerts::AlertObserverInterface Class Referenceabstract

#include <AlertObserverInterface.h>

Inheritance diagram for alexaClientSDK::capabilityAgents::alerts::AlertObserverInterface:
Inheritance graph
[legend]

Public Types

enum  State {
  State::READY, State::STARTED, State::STOPPED, State::SNOOZED,
  State::COMPLETED, State::PAST_DUE, State::FOCUS_ENTERED_FOREGROUND, State::FOCUS_ENTERED_BACKGROUND,
  State::ERROR, State::DELETED, State::SCHEDULED_FOR_LATER
}
 

Public Member Functions

virtual ~AlertObserverInterface ()=default
 
virtual void onAlertStateChange (const std::string &alertToken, const std::string &alertType, State state, const std::string &reason="")=0
 

Static Public Member Functions

static std::string stateToString (State state)
 

Detailed Description

An interface for observing state changes on an Alert object.

Member Enumeration Documentation

◆ State

An enum class to represent the states an alert can be in.

Enumerator
READY 

The alert is ready to start, and is waiting for channel focus.

STARTED 

The alert has started.

STOPPED 

The alert has stopped due to user or system intervention.

SNOOZED 

The alert has snoozed.

COMPLETED 

The alert has completed on its own.

PAST_DUE 

The alert has been determined to be past-due, and will not be rendered.

FOCUS_ENTERED_FOREGROUND 

The alert has entered the foreground.

FOCUS_ENTERED_BACKGROUND 

The alert has entered the background.

ERROR 

The alert has encountered an error.

DELETED 

The alert has been deleted.

SCHEDULED_FOR_LATER 

The alert has been scheduled to trigger at a future time.

Constructor & Destructor Documentation

◆ ~AlertObserverInterface()

virtual alexaClientSDK::capabilityAgents::alerts::AlertObserverInterface::~AlertObserverInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ onAlertStateChange()

virtual void alexaClientSDK::capabilityAgents::alerts::AlertObserverInterface::onAlertStateChange ( const std::string &  alertToken,
const std::string &  alertType,
State  state,
const std::string &  reason = "" 
)
pure virtual

A callback function to notify an object that an alert has updated its state.

Parameters
alertTokenThe AVS token of the alert.
alertTypeThe type of the alert.
stateThe state of the alert.
reasonThe reason for the state change.

Implemented in alexaClientSDK::capabilityAgents::alerts::test::TestAlertObserver, alexaClientSDK::capabilityAgents::alerts::AlertsCapabilityAgent, alexaClientSDK::capabilityAgents::alerts::AlertScheduler, alexaClientSDK::diagnostics::DevicePropertyAggregator, and alexaClientSDK::integration::test::TestAlertObserver.

◆ stateToString()

std::string alexaClientSDK::capabilityAgents::alerts::AlertObserverInterface::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 1.19.0 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0