AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::alexaInputController::test::MockHandler Class Reference
Inheritance diagram for alexaClientSDK::alexaInputController::test::MockHandler:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::alexaInputController::test::MockHandler:
Collaboration graph
[legend]

Public Member Functions

 MOCK_METHOD0 (getSupportedInputsMock, SupportedInputs())
 
 MOCK_METHOD1 (setInputMock, InputControllerInterface::Response(Input))
 
 MOCK_METHOD0 (getInputMock, Input())
 
 MOCK_METHOD1 (addObserverMock, bool(std::weak_ptr< InputControllerObserverInterface >))
 
 MOCK_METHOD1 (removeObserverMock, void(std::weak_ptr< InputControllerObserverInterface >))
 
SupportedInputs getSupportedInputs ()
 
InputControllerInterface::Response setInput (Input input)
 
Input getInput ()
 
bool addObserver (std::weak_ptr< InputControllerObserverInterface > observer)
 
void removeObserver (std::weak_ptr< InputControllerObserverInterface > observer)
 
- Public Member Functions inherited from alexaClientSDK::alexaInputControllerInterfaces::InputControllerInterface
virtual ~InputControllerInterface ()=default
 

Additional Inherited Members

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

Member Function Documentation

◆ addObserver()

bool alexaClientSDK::alexaInputController::test::MockHandler::addObserver ( std::weak_ptr< InputControllerObserverInterface observer)
inlinevirtual

Adds a InputControllerObserverInterface observer.

Note
If InputController implementation has configured its instance's property as proactively reported, then it is required to notify observers of 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.
Parameters
observerThe pointer to the InputControllerObserverInterface.
Returns
true if the object supports observer notification and observer was successfully added; otherwise, return false

Implements alexaClientSDK::alexaInputControllerInterfaces::InputControllerInterface.

◆ getInput()

Input alexaClientSDK::alexaInputController::test::MockHandler::getInput ( )
inlinevirtual

Get the current input.

Returns
the current input

Implements alexaClientSDK::alexaInputControllerInterfaces::InputControllerInterface.

◆ getSupportedInputs()

SupportedInputs alexaClientSDK::alexaInputController::test::MockHandler::getSupportedInputs ( )
inlinevirtual

◆ MOCK_METHOD0() [1/2]

alexaClientSDK::alexaInputController::test::MockHandler::MOCK_METHOD0 ( getSupportedInputsMock  ,
SupportedInputs()   
)

◆ MOCK_METHOD0() [2/2]

alexaClientSDK::alexaInputController::test::MockHandler::MOCK_METHOD0 ( getInputMock  ,
Input()   
)

◆ MOCK_METHOD1() [1/3]

alexaClientSDK::alexaInputController::test::MockHandler::MOCK_METHOD1 ( setInputMock  ,
InputControllerInterface::Response(Input  
)

◆ MOCK_METHOD1() [2/3]

alexaClientSDK::alexaInputController::test::MockHandler::MOCK_METHOD1 ( addObserverMock  ,
bool(std::weak_ptr< InputControllerObserverInterface >)   
)

◆ MOCK_METHOD1() [3/3]

alexaClientSDK::alexaInputController::test::MockHandler::MOCK_METHOD1 ( removeObserverMock  ,
void(std::weak_ptr< InputControllerObserverInterface >)   
)

◆ removeObserver()

void alexaClientSDK::alexaInputController::test::MockHandler::removeObserver ( std::weak_ptr< InputControllerObserverInterface observer)
inlinevirtual

Removes a observer of InputControllerObserverInterface.

Parameters
observerThe pointer to the InputControllerObserverInterface.

Implements alexaClientSDK::alexaInputControllerInterfaces::InputControllerInterface.

◆ setInput()

InputControllerInterface::Response alexaClientSDK::alexaInputController::test::MockHandler::setInput ( Input  input)
inlinevirtual

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