AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::sdkInterfaces::UserInactivityMonitorInterface Class Referenceabstract

#include <UserInactivityMonitorInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::UserInactivityMonitorInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~UserInactivityMonitorInterface ()=default
 Destructor. More...
 
virtual void onUserActive ()=0
 The function to be called when the user has become active. More...
 
virtual std::chrono::seconds timeSinceUserActivity ()=0
 
virtual void addObserver (std::shared_ptr< avsCommon::sdkInterfaces::UserInactivityMonitorObserverInterface > observer)=0
 
virtual void removeObserver (std::shared_ptr< avsCommon::sdkInterfaces::UserInactivityMonitorObserverInterface > observer)=0
 

Detailed Description

This interface is used to notify an implementation of the user activity. Any component that interacts with the user (e.g. AudioInputProcessor) should register an instance of this interface to signal when user interaction is detected (e.g. SpeechStarted).

This interface should also send the System.UserInactivityReport Event as defined here: https://developer.amazon.com/docs/alexa/alexa-voice-service/system.html#userinactivityreport and notify its observers when this occurs.

Constructor & Destructor Documentation

◆ ~UserInactivityMonitorInterface()

virtual alexaClientSDK::avsCommon::sdkInterfaces::UserInactivityMonitorInterface::~UserInactivityMonitorInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ addObserver()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::UserInactivityMonitorInterface::addObserver ( std::shared_ptr< avsCommon::sdkInterfaces::UserInactivityMonitorObserverInterface observer)
pure virtual

Adds an observer to be notified when the System.UserInactivityReport Event has been sent.

Parameters
observerThe observer to be notified when the System.UserInactivityReport Event has been sent.

◆ onUserActive()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::UserInactivityMonitorInterface::onUserActive ( )
pure virtual

The function to be called when the user has become active.

Implemented in alexaClientSDK::capabilityAgents::system::UserInactivityMonitor.

◆ removeObserver()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::UserInactivityMonitorInterface::removeObserver ( std::shared_ptr< avsCommon::sdkInterfaces::UserInactivityMonitorObserverInterface observer)
pure virtual

Removes an observer from the collection of observers which will be notified when the System.UserInactivityReport Event has been sent.

Parameters
observerThe observer that should no longer be notified when the System.UserInactivityReport Event has been sent.

◆ timeSinceUserActivity()

virtual std::chrono::seconds alexaClientSDK::avsCommon::sdkInterfaces::UserInactivityMonitorInterface::timeSinceUserActivity ( )
pure virtual

Calculates how many seconds have elapsed since a user last interacted with the device.

Returns
How many seconds have elapsed since a user last interacted with the device.

Implemented in alexaClientSDK::capabilityAgents::system::UserInactivityMonitor.


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