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

Public Member Functions

 MOCK_METHOD1 (changeMock, Response(Channel *channel))
 
 MOCK_METHOD0 (incrementChannelMock, Response())
 
 MOCK_METHOD0 (decrementChannelMock, Response())
 
 MOCK_METHOD0 (getCurrentChannelMock, std::unique_ptr< Channel >())
 
 MOCK_METHOD1 (addObserverMock, bool(std::weak_ptr< ChannelControllerObserverInterface > observer))
 
 MOCK_METHOD1 (removeObserverMock, void(std::weak_ptr< ChannelControllerObserverInterface > observer))
 
Response change (std::unique_ptr< Channel > channel)
 
Response incrementChannel ()
 
Response decrementChannel ()
 
std::unique_ptr< ChannelgetCurrentChannel ()
 
bool addObserver (std::weak_ptr< ChannelControllerObserverInterface > observer)
 
void removeObserver (std::weak_ptr< ChannelControllerObserverInterface > observer)
 
- Public Member Functions inherited from alexaClientSDK::alexaChannelControllerInterfaces::ChannelControllerInterface
virtual ~ChannelControllerInterface ()=default
 
virtual Response change (std::unique_ptr< alexaChannelControllerTypes::Channel > channel)=0
 

Member Function Documentation

◆ addObserver()

bool alexaClientSDK::alexaChannelController::test::MockAlexaChannelControllerInterface::addObserver ( std::weak_ptr< ChannelControllerObserverInterface observer)
inlinevirtual

Adds a ChannelControllerObserverInterface observer.

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

Implements alexaClientSDK::alexaChannelControllerInterfaces::ChannelControllerInterface.

◆ change()

Response alexaClientSDK::alexaChannelController::test::MockAlexaChannelControllerInterface::change ( std::unique_ptr< Channel channel)
inline

◆ decrementChannel()

Response alexaClientSDK::alexaChannelController::test::MockAlexaChannelControllerInterface::decrementChannel ( )
inlinevirtual

Jump to the previous channel on the the endpoint. Decrementing the first channel must wrap to the end of the list.

Returns
Whether the channel was successfully decremented, or if an error was encountered in the process. ChannelControllerInterface::Response.type should return SUCCESS if no errors were encountered. Otherwise, ChannelControllerInterface::Response.type should contain the corresponding error code along with a log message in ChannelControllerInterface::Response.errorMessage.

Implements alexaClientSDK::alexaChannelControllerInterfaces::ChannelControllerInterface.

◆ getCurrentChannel()

std::unique_ptr<Channel> alexaClientSDK::alexaChannelController::test::MockAlexaChannelControllerInterface::getCurrentChannel ( )
inlinevirtual

Get the current channel information of the endpoint.

Returns
the current Channel of the endpoint

Implements alexaClientSDK::alexaChannelControllerInterfaces::ChannelControllerInterface.

◆ incrementChannel()

Response alexaClientSDK::alexaChannelController::test::MockAlexaChannelControllerInterface::incrementChannel ( )
inlinevirtual

Jump to the next channel on the the endpoint. Incrementing the last channel must wrap to the beginning of the list.

Returns
Whether the channel was successfully incremented, or if an error was encountered in the process. ChannelControllerInterface::Response.type should return SUCCESS if no errors were encountered. Otherwise, ChannelControllerInterface::Response.type should contain the corresponding error code along with a log message in ChannelControllerInterface::Response.errorMessage.

Implements alexaClientSDK::alexaChannelControllerInterfaces::ChannelControllerInterface.

◆ MOCK_METHOD0() [1/3]

alexaClientSDK::alexaChannelController::test::MockAlexaChannelControllerInterface::MOCK_METHOD0 ( incrementChannelMock  ,
Response()   
)

◆ MOCK_METHOD0() [2/3]

alexaClientSDK::alexaChannelController::test::MockAlexaChannelControllerInterface::MOCK_METHOD0 ( decrementChannelMock  ,
Response()   
)

◆ MOCK_METHOD0() [3/3]

alexaClientSDK::alexaChannelController::test::MockAlexaChannelControllerInterface::MOCK_METHOD0 ( getCurrentChannelMock  ,
std::unique_ptr< Channel () 
)

◆ MOCK_METHOD1() [1/3]

alexaClientSDK::alexaChannelController::test::MockAlexaChannelControllerInterface::MOCK_METHOD1 ( changeMock  ,
Response(Channel *channel)   
)

◆ MOCK_METHOD1() [2/3]

alexaClientSDK::alexaChannelController::test::MockAlexaChannelControllerInterface::MOCK_METHOD1 ( addObserverMock  ,
bool(std::weak_ptr< ChannelControllerObserverInterface > observer)   
)

◆ MOCK_METHOD1() [3/3]

alexaClientSDK::alexaChannelController::test::MockAlexaChannelControllerInterface::MOCK_METHOD1 ( removeObserverMock  ,
void(std::weak_ptr< ChannelControllerObserverInterface > observer)   
)

◆ removeObserver()

void alexaClientSDK::alexaChannelController::test::MockAlexaChannelControllerInterface::removeObserver ( std::weak_ptr< ChannelControllerObserverInterface observer)
inlinevirtual

Removes a observer of ChannelControllerObserverInterface.

Parameters
observerThe pointer to the ChannelControllerObserverInterface.

Implements alexaClientSDK::alexaChannelControllerInterfaces::ChannelControllerInterface.


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