![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <AlertsCapabilityAgent.h>
This class implements an Alerts capability agent.
|
override |
|
overridevirtual |
Cancel an ongoing preHandleDirective()
or handleDirective()
operation for the AVSDirective
in . Once this has been called the CapabilityAgent
should not expect to receive further calls regarding this directive.
AVSDirectives
.info | The DirectiveInfo instance for the AVSDirective to process. |
Implements alexaClientSDK::avsCommon::avs::CapabilityAgent.
|
overridevirtual |
Clear all scheduled alerts.
Implements alexaClientSDK::registrationManager::CustomerDataHandlerInterface.
|
static |
Create function.
messageSender | An interface to which this object will send Events to AVS. |
connectionManager | An AVSConnectionManagerInterface instance to listen for connection status updates. |
certifiedMessageSender | An interface to which this object will send guaranteed Events to AVS. |
focusManager | An interface with which this object will request and release Alert channel focus. |
speakerManager | An interface to control volume of the Alerts. |
contextManager | An interface to which this object will send context updates as alert states change. |
exceptionEncounteredSender | An interface which allows ExceptionEncountered Events to be sent to AVS. |
alertStorage | An interface to store, load, modify and delete Alerts. |
alertsAudioFactory | A provider of audio streams specific to Alerts. |
alertRenderer | An alert renderer, which Alerts will use to generate user-perceivable effects when active. |
dataManager | A dataManager object that will track the CustomerDataHandler. |
alarmVolumeRampSetting | The alarm volume ramp setting. |
settingsManager | A settingsManager object that manages alarm volume ramp setting. |
metricRecorder | The metric recorder. |
startAlertSchedulingOnInitialization | Whether to start scheduling alerts after client initialization. If this is set to false, no alert scheduling will occur until onSystemClockSynchronized is called. |
systemClockMonitor | This class notifies its observers of system clock synchronization. |
Factory method that creates a new AlertsCapabilityAgentInterface
.
alertRenderer | An alert renderer, which Alerts will use to generate user-perceivable effects when active. |
shutdownNotifier | An object to notify this CA when to shut down. |
connectionManager | An AVSConnectionManagerInterface instance to listen for connection status updates. |
contextManager | An interface to which this object will send context updates as alert states change. |
exceptionEncounteredSender | An interface which allows ExceptionEncountered Events to be sent to AVS. |
audioFocusManager | An interface with which this object will request and release Alert channel focus. |
messageSender | An interface to which this object will send Events to AVS. |
speakerManager | An interface to control volume of the Alerts. |
alertsAudioFactory | Factory that can provide a unique audio stream for alerts. |
endpointCapabilitiesRegistrar | The object with which to register this AudioPlayer's capabilities for the default endpoint. |
metricRecorder | The metric recorder. |
systemClockMonitor | This class notifies its observers of system clock synchronization. |
certifiedMessageSender | An interface to which this object will send guaranteed Events to AVS. |
dataManager | A dataManager object that will track the CustomerDataHandler. |
settingsManager | A settingsManager object that manages alarm volume ramp setting. |
alertStorage | An interface to store, load, modify and delete Alerts. |
startAlertSchedulingOnInitialization | Whether to start scheduling alerts after client initialization. If this is set to false, no alert scheduling will occur until onSystemClockSynchronized is called. |
|
static |
Return the alarm volume ramp event metadata.
int alexaClientSDK::acsdkAlerts::AlertsCapabilityAgent::getAlertVolume | ( | ) |
Returns the alert volume.
|
overridevirtual |
Returns the configurations of the capability interfaces being implemented.
Implements alexaClientSDK::avsCommon::sdkInterfaces::CapabilityConfigurationInterface.
|
overridevirtual |
Returns the configuration of the directive handler.
The configuration consists of multiple directive routing rules and their respective blocking policy. The directives will be matched from the most specific rule (with all fields defined) to the least specific rule (which only matches the directive endpointId).
avs::DirectiveHandlerConfiguration
of the handler. Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.
|
overridevirtual |
Handle the action specified by the AVSDirective
in info
. The handling of subsequent directives with the same DialogRequestId
may be blocked until the DirectiveHandler
calls the setSucceeded()
method of the DirectiveHandlingResult
present in info
. If handling of this directive fails setFailed()
should be called to indicate a failure.
AVSDirectives
.info | The DirectiveInfo instance for the AVSDirective to process. |
Implements alexaClientSDK::avsCommon::avs::CapabilityAgent.
|
overridevirtual |
Handle the action specified AVSDirective
. Once this has been called the DirectiveHandler
should not expect to receive further calls regarding this directive.
AVSDirectives
. ExceptionEncountered
message should be sent to AVS.directive | The directive to handle. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.
|
overridevirtual |
A callback function to notify an object that an alert has updated its state.
alertInfo | The information of the updated alert. |
Implements alexaClientSDK::acsdkAlertsInterfaces::AlertObserverInterface.
|
overridevirtual |
Called when the AVS connection state changes.
status | The current connection status. |
reason | The reason the status change occurred. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::ConnectionStatusObserverInterface.
|
overridevirtual |
Notification that this handler has been de-registered and will not receive any more calls.
Reimplemented from alexaClientSDK::avsCommon::avs::CapabilityAgent.
|
overridevirtual |
Used to notify the observer of the Channel of focus changes. Once called, the client should make a user observable change only and return immediately. Any additional work that needs to be done should be done on a separate thread or after returning. "User observable change" here refers to events that the end user of the product can visibly see or hear. For example, Alexa speech or music playing would be examples of user observable changes. Other work, such as database storing, logging, or communicating via network should be done on a different thread. Not doing so could result in delays for other clients trying to access the Channel.
newFocus | The new Focus of the channel. |
behavior | The mixingBehavior for the ChannelObserver to take as per the interrupt model |
Reimplemented from alexaClientSDK::avsCommon::avs::CapabilityAgent.
|
overridevirtual |
Used to notify the observer of focus changes. This function should return quickly.
channelName | The name of the channel which changed FocusState . |
newFocus | The new FocusState of channelName . |
Implements alexaClientSDK::avsCommon::sdkInterfaces::FocusManagerObserverInterface.
|
overridevirtual |
This function provides a way for application code to request this object stop any active alert as the result of a user action, such as pressing a physical 'stop' button on the device.
Implements alexaClientSDK::acsdkAlertsInterfaces::AlertsCapabilityAgentInterface.
|
overridevirtual |
A callback for when the SpeakerInterface::SpeakerSettings
successfully changes.
source. | This indicates the origin of the call. |
type. | This indicates the type of ChannelVolumeInterface that was modified. |
settings. | This indicates the current settings after the change. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerObserverInterface.
|
overridevirtual |
Take necessary actions as a result of an system clock change.
Implements alexaClientSDK::acsdkSystemClockMonitorInterfaces::SystemClockMonitorObserverInterface.
|
overridevirtual |
Notification that a directive has arrived. This notification gives the DirectiveHandler a chance to prepare for handling of an AVSDirective
. If an error occurs during the pre-Handling phase and that error should cancel the handling of subsequent AVSDirectives
with the same DialogRequestId
, the DirectiveHandler
should call the setFailed
method on the result
instance passed in to this call.
AVSDirectives
.info | The DirectiveInfo instance for the AVSDirective to process. |
Implements alexaClientSDK::avsCommon::avs::CapabilityAgent.
|
overridevirtual |
A function that allows an application to clear all alerts from storage. This may be useful for a scenario where a user logs out of a device, and another user will log in. As the first user logs out, their pending alerts should not go off.
Implements alexaClientSDK::acsdkAlertsInterfaces::AlertsCapabilityAgentInterface.
|
override |
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0