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::EndpointAlexaChannelControllerHandler Class Reference

#include <EndpointAlexaChannelControllerHandler.h>

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

Public Member Functions

AlexaChannelControllerInterface methods
alexaChannelControllerInterfaces::ChannelControllerInterface::Response change (std::unique_ptr< alexaChannelControllerTypes::Channel > channel) override
 
alexaChannelControllerInterfaces::ChannelControllerInterface::Response incrementChannel () override
 
alexaChannelControllerInterfaces::ChannelControllerInterface::Response decrementChannel () override
 
std::unique_ptr< alexaChannelControllerTypes::ChannelgetCurrentChannel () override
 
bool addObserver (std::weak_ptr< alexaChannelControllerInterfaces::ChannelControllerObserverInterface > observer) override
 
void removeObserver (std::weak_ptr< alexaChannelControllerInterfaces::ChannelControllerObserverInterface > observer) override
 
- Public Member Functions inherited from alexaClientSDK::alexaChannelControllerInterfaces::ChannelControllerInterface
virtual ~ChannelControllerInterface ()=default
 
virtual bool addObserver (std::weak_ptr< ChannelControllerObserverInterface > observer)=0
 
virtual void removeObserver (std::weak_ptr< ChannelControllerObserverInterface > observer)=0
 

Static Public Member Functions

static std::shared_ptr< EndpointAlexaChannelControllerHandlercreate (std::string endpointName)
 

Detailed Description

Sample implementation of an AlexaChannelControllerInterface.

Member Function Documentation

◆ addObserver()

bool alexaClientSDK::sampleApplications::common::EndpointAlexaChannelControllerHandler::addObserver ( std::weak_ptr< alexaChannelControllerInterfaces::ChannelControllerObserverInterface observer)
override

◆ change()

alexaChannelControllerInterfaces::ChannelControllerInterface::Response alexaClientSDK::sampleApplications::common::EndpointAlexaChannelControllerHandler::change ( std::unique_ptr< alexaChannelControllerTypes::Channel channel)
overridevirtual

Changes the channel on the endpoint.

Parameters
channelThe channel related values such as number, callSign and affiliateCallSign, uri, as well as metadata for the channel like name and image.
Returns
Whether the channel was successfully changed, 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.

◆ create()

static std::shared_ptr<EndpointAlexaChannelControllerHandler> alexaClientSDK::sampleApplications::common::EndpointAlexaChannelControllerHandler::create ( std::string  endpointName)
static

Create a EndpointAlexaChannelControllerHandler object.

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

◆ decrementChannel()

alexaChannelControllerInterfaces::ChannelControllerInterface::Response alexaClientSDK::sampleApplications::common::EndpointAlexaChannelControllerHandler::decrementChannel ( )
overridevirtual

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<alexaChannelControllerTypes::Channel> alexaClientSDK::sampleApplications::common::EndpointAlexaChannelControllerHandler::getCurrentChannel ( )
overridevirtual

Get the current channel information of the endpoint.

Returns
the current Channel of the endpoint

Implements alexaClientSDK::alexaChannelControllerInterfaces::ChannelControllerInterface.

◆ incrementChannel()

alexaChannelControllerInterfaces::ChannelControllerInterface::Response alexaClientSDK::sampleApplications::common::EndpointAlexaChannelControllerHandler::incrementChannel ( )
overridevirtual

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.

◆ removeObserver()

void alexaClientSDK::sampleApplications::common::EndpointAlexaChannelControllerHandler::removeObserver ( std::weak_ptr< alexaChannelControllerInterfaces::ChannelControllerObserverInterface observer)
override

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