AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
InputControllerInterface.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_ALEXAINPUTCONTROLLERINTERFACES_INPUTCONTROLLERINTERFACE_H_
17 #define ACSDK_ALEXAINPUTCONTROLLERINTERFACES_INPUTCONTROLLERINTERFACE_H_
18 
19 #include <string>
20 #include <unordered_set>
21 #include <vector>
22 
24 #include "InputType.h"
25 
26 namespace alexaClientSDK {
27 namespace alexaInputControllerInterfaces {
28 
35 public:
39  struct Response {
43  enum class Type {
45  SUCCESS,
54  };
55 
60 
68 
70  Type type;
71 
75  };
76 
80  virtual ~InputControllerInterface() = default;
81 
88  using SupportedInputs = std::vector<std::pair<Input, std::unordered_set<std::string>>>;
89 
90  /*
91  * Return the inputs supported.
92  *
93  * @return the set of inputs the device supports.
94  */
95  virtual SupportedInputs getSupportedInputs() = 0;
96 
106  virtual Response setInput(Input input) = 0;
107 
113  virtual Input getInput() = 0;
114 
126  virtual bool addObserver(std::weak_ptr<InputControllerObserverInterface> observer) = 0;
127 
133  virtual void removeObserver(std::weak_ptr<InputControllerObserverInterface> observer) = 0;
134 };
135 
136 } // namespace alexaInputControllerInterfaces
137 } // namespace alexaClientSDK
138 
139 #endif // ACSDK_ALEXAINPUTCONTROLLERINTERFACES_INPUTCONTROLLERINTERFACE_H_
std::vector< std::pair< Input, std::unordered_set< std::string > >> SupportedInputs
Definition: InputControllerInterface.h:88
virtual void removeObserver(std::weak_ptr< InputControllerObserverInterface > observer)=0
::std::string string
Definition: gtest-port.h:1097
Indicates that an error occurred that can&#39;t be described by one of the other error types...
virtual bool addObserver(std::weak_ptr< InputControllerObserverInterface > observer)=0
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
The directive contains a value that&#39;s not valid for the target endpoint. For example, an invalid input.
const T & move(const T &t)
Definition: gtest-port.h:1317
std::string errorMessage
Definition: InputControllerInterface.h:74
The number of allowed failed attempts to perform a InputController action has been exceeded...
Type type
Response type for InputController handler responses.
Definition: InputControllerInterface.h:67

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