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

#include <EndpointInputControllerHandler.h>

Inheritance diagram for alexaClientSDK::sampleApplications::common::EndpointInputControllerHandler:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::sampleApplications::common::EndpointInputControllerHandler:
Collaboration graph
[legend]

Public Member Functions

InputControllerInterface methods
SupportedInputs getSupportedInputs () override
 
InputControllerInterface::Response setInput (alexaInputControllerInterfaces::Input input) override
 
alexaInputControllerInterfaces::Input getInput () override
 
bool addObserver (const std::weak_ptr< alexaInputControllerInterfaces::InputControllerObserverInterface > observer) override
 
void removeObserver (const std::weak_ptr< alexaInputControllerInterfaces::InputControllerObserverInterface > observer) override
 
- Public Member Functions inherited from alexaClientSDK::alexaInputControllerInterfaces::InputControllerInterface
virtual ~InputControllerInterface ()=default
 
virtual bool addObserver (std::weak_ptr< InputControllerObserverInterface > observer)=0
 
virtual void removeObserver (std::weak_ptr< InputControllerObserverInterface > observer)=0
 

Static Public Member Functions

static std::shared_ptr< EndpointInputControllerHandlercreate (const std::string &endpointName)
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::alexaInputControllerInterfaces::InputControllerInterface
using SupportedInputs = std::vector< std::pair< Input, std::unordered_set< std::string > >>
 

Detailed Description

Sample implementation of an InputControllerInterface.

Member Function Documentation

◆ addObserver()

bool alexaClientSDK::sampleApplications::common::EndpointInputControllerHandler::addObserver ( const std::weak_ptr< alexaInputControllerInterfaces::InputControllerObserverInterface observer)
override

◆ create()

static std::shared_ptr<EndpointInputControllerHandler> alexaClientSDK::sampleApplications::common::EndpointInputControllerHandler::create ( const std::string &  endpointName)
static

Create a InputControllerInterface object.

Parameters
endpointNameThe name of the endpoint
Returns
A pointer to a new InputControllerHandler object if it succeeds; otherwise, nullptr.

◆ getInput()

alexaInputControllerInterfaces::Input alexaClientSDK::sampleApplications::common::EndpointInputControllerHandler::getInput ( )
overridevirtual

Get the current input.

Returns
the current input

Implements alexaClientSDK::alexaInputControllerInterfaces::InputControllerInterface.

◆ getSupportedInputs()

SupportedInputs alexaClientSDK::sampleApplications::common::EndpointInputControllerHandler::getSupportedInputs ( )
overridevirtual

◆ removeObserver()

void alexaClientSDK::sampleApplications::common::EndpointInputControllerHandler::removeObserver ( const std::weak_ptr< alexaInputControllerInterfaces::InputControllerObserverInterface observer)
override

◆ setInput()

InputControllerInterface::Response alexaClientSDK::sampleApplications::common::EndpointInputControllerHandler::setInput ( alexaInputControllerInterfaces::Input  input)
overridevirtual

Set the input.

Parameters
inputThe desired input of the endpoint, which is one of those that is available from the device.
Returns
whether the input was successfully set, or if an error was encountered in the process. 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.

Implements alexaClientSDK::alexaInputControllerInterfaces::InputControllerInterface.


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