AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface Class Referenceabstract

#include <AlertObserverInterface.h>

Inheritance diagram for alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface:
Inheritance graph
[legend]

Classes

struct  AlertInfo
 
struct  OriginalTime
 

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
}
 
enum  Type { Type::ALARM, Type::TIMER, Type::REMINDER }
 

Public Member Functions

virtual ~AlertObserverInterface ()=default
 
virtual void onAlertStateChange (const AlertInfo &alertInfo)=0
 

Static Public Member Functions

template<class T >
static bool withinBounds (T value, T minVal, T maxVal)
 
static std::string stateToString (State state)
 
static std::string typeToString (Type type)
 
static std::string originalTimeToString (const OriginalTime &originalTime)
 

Static Public Attributes

static const int ORIGINAL_TIME_FIELD_MIN = 0
 The minimum value for the field in OriginalTime. More...
 
static const int ORIGINAL_TIME_HOUR_MAX = 23
 The maximum value for the hour field in OriginalTime. More...
 
static const int ORIGINAL_TIME_MINUTE_MAX = 59
 The maximum value for the minute field in OriginalTime. More...
 
static const int ORIGINAL_TIME_SECOND_MAX = 59
 The maximum value for the second field in OriginalTime. More...
 
static const int ORIGINAL_TIME_MILLISECOND_MAX = 999
 The maximum value for the millisecond field in OriginalTime. More...
 

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.

◆ Type

An enum class to represent the type of an alert.

Enumerator
ALARM 

The alarm type.

TIMER 

The timer type.

REMINDER 

The reminder type.

Constructor & Destructor Documentation

◆ ~AlertObserverInterface()

virtual alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface::~AlertObserverInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ onAlertStateChange()

virtual void alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface::onAlertStateChange ( const AlertInfo alertInfo)
pure virtual

◆ originalTimeToString()

std::string alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface::originalTimeToString ( const OriginalTime originalTime)
inlinestatic

Convert a OriginalTime to a std::string.

Parameters
typeThe OriginalTime to convert.
Returns
The string representation of a OriginalTime.

◆ stateToString()

std::string alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface::stateToString ( State  state)
inlinestatic

Convert a State to a std::string.

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

◆ typeToString()

std::string alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface::typeToString ( Type  type)
inlinestatic

Convert a Type to a std::string.

Parameters
typeThe Type to convert.
Returns
The string representation of a Type.

◆ withinBounds()

template<class T >
static bool alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface::withinBounds ( value,
minVal,
maxVal 
)
inlinestatic

Check whether a value is within the bounds.

Parameters
valueThe value to check.
minValThe minimum value.
maxValThe maximum value.
trueif the value is within the bounds, false otherwise.

Member Data Documentation

◆ ORIGINAL_TIME_FIELD_MIN

const int alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface::ORIGINAL_TIME_FIELD_MIN = 0
static

The minimum value for the field in OriginalTime.

◆ ORIGINAL_TIME_HOUR_MAX

const int alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface::ORIGINAL_TIME_HOUR_MAX = 23
static

The maximum value for the hour field in OriginalTime.

◆ ORIGINAL_TIME_MILLISECOND_MAX

const int alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface::ORIGINAL_TIME_MILLISECOND_MAX = 999
static

The maximum value for the millisecond field in OriginalTime.

◆ ORIGINAL_TIME_MINUTE_MAX

const int alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface::ORIGINAL_TIME_MINUTE_MAX = 59
static

The maximum value for the minute field in OriginalTime.

◆ ORIGINAL_TIME_SECOND_MAX

const int alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface::ORIGINAL_TIME_SECOND_MAX = 59
static

The maximum value for the second field in OriginalTime.


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

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