AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
ChannelControllerInterface.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ACSDK_ALEXACHANNELCONTROLLERINTERFACES_CHANNELCONTROLLERINTERFACE_H_
17 #define ACSDK_ALEXACHANNELCONTROLLERINTERFACES_CHANNELCONTROLLERINTERFACE_H_
18 
19 #include <memory>
20 #include <string>
21 
23 #include "ChannelType.h"
24 
25 namespace alexaClientSDK {
26 namespace alexaChannelControllerInterfaces {
27 
35 public:
39  struct Response {
43  enum class Type {
45  SUCCESS,
59  };
60 
65 
73 
75  Type type;
76 
80  };
81 
85  virtual ~ChannelControllerInterface() = default;
86 
97  virtual Response change(std::unique_ptr<alexaChannelControllerTypes::Channel> channel) = 0;
98 
109  virtual Response decrementChannel() = 0;
110 
121  virtual Response incrementChannel() = 0;
122 
128  virtual std::unique_ptr<alexaChannelControllerTypes::Channel> getCurrentChannel() = 0;
129 
142  virtual bool addObserver(std::weak_ptr<ChannelControllerObserverInterface> observer) = 0;
143 
149  virtual void removeObserver(std::weak_ptr<ChannelControllerObserverInterface> observer) = 0;
150 };
151 
152 } // namespace alexaChannelControllerInterfaces
153 } // namespace alexaClientSDK
154 
155 #endif // ACSDK_ALEXACHANNELCONTROLLERINTERFACES_CHANNELCONTROLLERINTERFACE_H_
virtual Response change(std::unique_ptr< alexaChannelControllerTypes::Channel > channel)=0
Indicates that an error occurred that can&#39;t be described by one of the other error types...
virtual std::unique_ptr< alexaChannelControllerTypes::Channel > getCurrentChannel()=0
::std::string string
Definition: gtest-port.h:1097
The number of allowed failed attempts to perform a ChannelController action has been exceeded...
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::string errorMessage
Definition: ChannelControllerInterface.h:79
virtual bool addObserver(std::weak_ptr< ChannelControllerObserverInterface > observer)=0
Type type
Response type for ChannelController handler responses.
Definition: ChannelControllerInterface.h:72
virtual void removeObserver(std::weak_ptr< ChannelControllerObserverInterface > observer)=0
const T & move(const T &t)
Definition: gtest-port.h:1317

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0