AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <InputControllerInterface.h>
Classes | |
struct | Response |
Public Types | |
using | SupportedInputs = std::vector< std::pair< Input, std::unordered_set< std::string > >> |
Public Member Functions | |
virtual | ~InputControllerInterface ()=default |
virtual SupportedInputs | getSupportedInputs ()=0 |
virtual Response | setInput (Input input)=0 |
virtual Input | getInput ()=0 |
virtual bool | addObserver (std::weak_ptr< InputControllerObserverInterface > observer)=0 |
virtual void | removeObserver (std::weak_ptr< InputControllerObserverInterface > observer)=0 |
An interface to handle input changes from InputController.
using alexaClientSDK::alexaInputControllerInterfaces::InputControllerInterface::SupportedInputs = std::vector<std::pair<Input, std::unordered_set<std::string> >> |
A set of pairs to specify the supported inputs of the device. The first element of a pair is the Input type, and the second element is the set of friendly names for that input.
|
virtualdefault |
Destructor.
|
pure virtual |
Adds a InputControllerObserverInterface
observer.
InputControllerObserverInterface
for any change in its property state. This includes notifying the value when the device starts, if it is different from the last reported value.observer | The pointer to the InputControllerObserverInterface . |
true
if the object supports observer notification and observer was successfully added; otherwise, return false
Implemented in alexaClientSDK::alexaInputController::test::MockHandler.
|
pure virtual |
Get the current input.
Implemented in alexaClientSDK::alexaInputController::test::MockHandler, and alexaClientSDK::sampleApplications::common::EndpointInputControllerHandler.
|
pure virtual |
|
pure virtual |
Removes a observer of InputControllerObserverInterface
.
observer | The pointer to the InputControllerObserverInterface . |
Implemented in alexaClientSDK::alexaInputController::test::MockHandler.
|
pure virtual |
Set the input.
input | The desired input of the endpoint, which is one of those that is available from the device. |
InputControllerInterface::Response.type
should return SUCCESS if no errors were encountered. Otherwise, InputControllerInterface::Response.type
should contain the corresponding error code along with a log message in InputControllerInterface::Response.errorMessage
. Implemented in alexaClientSDK::alexaInputController::test::MockHandler, and alexaClientSDK::sampleApplications::common::EndpointInputControllerHandler.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0