AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Static Public Member Functions | List of all members
alexaClientSDK::sampleApp::InputControllerHandler Class Reference

#include <InputControllerHandler.h>

Inheritance diagram for alexaClientSDK::sampleApp::InputControllerHandler:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::sampleApp::InputControllerHandler:
Collaboration graph
[legend]

Public Member Functions

InputControllerHandlerInterface methods
virtual InputConfigurations getConfiguration () override
 
virtual bool onInputChange (const std::string &input) override
 
- Public Member Functions inherited from alexaClientSDK::acsdkInputControllerInterfaces::InputControllerHandlerInterface
virtual ~InputControllerHandlerInterface ()=default
 

Static Public Member Functions

static std::shared_ptr< InputControllerHandlercreate ()
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::acsdkInputControllerInterfaces::InputControllerHandlerInterface
using InputFriendlyNameType = std::unordered_map< std::string, std::unordered_set< std::string > >
 

Detailed Description

Sample implementation of an InputControllerHandlerInterface.

Member Function Documentation

◆ create()

std::shared_ptr< InputControllerHandler > alexaClientSDK::sampleApp::InputControllerHandler::create ( )
static

Create a InputControllerHandler object.

Returns
A pointer to a new InputControllerHandler object if it succeeds; otherwise, nullptr.

◆ getConfiguration()

acsdkInputControllerInterfaces::InputControllerHandlerInterface::InputConfigurations alexaClientSDK::sampleApp::InputControllerHandler::getConfiguration ( )
overridevirtual

A function to get the input configuration of the device.

Returns
The InputConfigurations of the device.

Implements alexaClientSDK::acsdkInputControllerInterfaces::InputControllerHandlerInterface.

◆ onInputChange()

bool alexaClientSDK::sampleApp::InputControllerHandler::onInputChange ( const std::string &  input)
overridevirtual

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.

Implements alexaClientSDK::acsdkInputControllerInterfaces::InputControllerHandlerInterface.


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

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