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

#include <InputControllerHandlerInterface.h>

Inheritance diagram for alexaClientSDK::acsdkInputControllerInterfaces::InputControllerHandlerInterface:
Inheritance graph
[legend]

Classes

struct  InputConfigurations
 The configuration of the inputs on the device. More...
 

Public Types

using InputFriendlyNameType = std::unordered_map< std::string, std::unordered_set< std::string > >
 

Public Member Functions

virtual ~InputControllerHandlerInterface ()=default
 
virtual InputConfigurations getConfiguration ()=0
 
virtual bool onInputChange (const std::string &input)=0
 

Detailed Description

An interface to handle input changes from InputController.

Member Typedef Documentation

◆ InputFriendlyNameType

using alexaClientSDK::acsdkInputControllerInterfaces::InputControllerHandlerInterface::InputFriendlyNameType = std::unordered_map<std::string, std::unordered_set<std::string> >

Alias to a type used for defining the inputs. The key of the map is the input, and the set is the friendlyNames associated with the input. For more information, please refer to the Alexa.InputController API.

See also
https://developer.amazon.com/en-US/docs/alexa/alexa-voice-service/inputcontroller.html

Constructor & Destructor Documentation

◆ ~InputControllerHandlerInterface()

virtual alexaClientSDK::acsdkInputControllerInterfaces::InputControllerHandlerInterface::~InputControllerHandlerInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getConfiguration()

virtual InputConfigurations alexaClientSDK::acsdkInputControllerInterfaces::InputControllerHandlerInterface::getConfiguration ( )
pure virtual

A function to get the input configuration of the device.

Returns
The InputConfigurations of the device.

Implemented in alexaClientSDK::acsdkInputController::test::MockHandler, and alexaClientSDK::sampleApp::InputControllerHandler.

◆ onInputChange()

virtual bool alexaClientSDK::acsdkInputControllerInterfaces::InputControllerHandlerInterface::onInputChange ( const std::string &  input)
pure virtual

A callback function to request the change of the input on the device. The InputController does not remember the previous input, so this callback will be called whenever AVS notifies a change in input. Also, during initialization, the application is responsible for remembering the previous input, as the InputController does not notify the application of the previous input with this callback.

Parameters
inputThe selected input on the product. The input is guaranteed to be one of the inputs as specified in the InputConfigurations from getConfiguration().
Returns
A bool indicate if the change in input is successful or not.

Implemented in alexaClientSDK::acsdkInputController::test::MockHandler, and alexaClientSDK::sampleApp::InputControllerHandler.


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

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