AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
LiveViewControllerInterface.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 #ifndef ALEXA_CLIENT_SDK_ALEXALIVEVIEWCONTROLLERINTERFACES_INCLUDE_ACSDK_ALEXALIVEVIEWCONTROLLERINTERFACES_LIVEVIEWCONTROLLERINTERFACE_H_
16 #define ALEXA_CLIENT_SDK_ALEXALIVEVIEWCONTROLLERINTERFACES_INCLUDE_ACSDK_ALEXALIVEVIEWCONTROLLERINTERFACES_LIVEVIEWCONTROLLERINTERFACE_H_
17 
18 #include <memory>
19 #include <string>
20 
24 
25 namespace alexaClientSDK {
26 namespace alexaLiveViewControllerInterfaces {
27 
35 public:
42 
45 
48 
51 
54  };
55 
59  struct Response {
63  enum class Type {
65  SUCCESS,
67  FAILED_BATTERY_TOO_LOW,
69  FAILED_MEDIA_SOURCE_NOT_FOUND,
71  FAILED_MEDIA_SOURCE_ASLEEP,
73  FAILED_MEDIA_SOURCE_TURNED_OFF,
75  FAILED_UNAUTHORIZED,
77  FAILED_INTERNAL_ERROR
78  };
79 
82 
86 
90  Response() : type(Type::SUCCESS) {
91  }
92 
99  Response(Type type, std::string errorMessage) : type{type}, errorMessage{std::move(errorMessage)} {
100  }
101  };
102 
106  virtual ~LiveViewControllerInterface() = default;
107 
118  virtual Response start(std::unique_ptr<StartLiveViewRequest> request) = 0;
119 
129  virtual Response stop() = 0;
130 
141  virtual Response setCameraState(CameraState cameraState) = 0;
142 
148  virtual Configuration getConfiguration() = 0;
149 
156  virtual bool addObserver(std::weak_ptr<LiveViewControllerObserverInterface> observer) = 0;
157 
163  virtual void removeObserver(std::weak_ptr<LiveViewControllerObserverInterface> observer) = 0;
164 };
165 
166 } // namespace alexaLiveViewControllerInterfaces
167 } // namespace alexaClientSDK
168 
169 #endif // ALEXA_CLIENT_SDK_ALEXALIVEVIEWCONTROLLERINTERFACES_INCLUDE_ACSDK_ALEXALIVEVIEWCONTROLLERINTERFACES_LIVEVIEWCONTROLLERINTERFACE_H_
Role role
Specifies the role of the device for the streaming session.
Definition: LiveViewControllerInterface.h:47
virtual void removeObserver(std::weak_ptr< LiveViewControllerObserverInterface > observer)=0
std::string sessionId
Live streaming session identifier.
Definition: LiveViewControllerInterface.h:41
virtual bool addObserver(std::weak_ptr< LiveViewControllerObserverInterface > observer)=0
::std::string string
Definition: gtest-port.h:1097
Role
Definition: LiveViewControllerTypes.h:318
Type type
Response error type.
Definition: LiveViewControllerInterface.h:81
Response(Type type, std::string errorMessage)
Definition: LiveViewControllerInterface.h:99
Participants participants
Camera source and a list of viewing devices in the requested streaming session.
Definition: LiveViewControllerInterface.h:50
Definition: LiveViewControllerTypes.h:513
ViewerExperience viewerExperience
Defines the display and audio properties of the streaming session.
Definition: LiveViewControllerInterface.h:53
Target target
Identifies the viewing device.
Definition: LiveViewControllerInterface.h:44
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
virtual Response start(std::unique_ptr< StartLiveViewRequest > request)=0
std::string errorMessage
Definition: LiveViewControllerInterface.h:85
CameraState
Definition: LiveViewControllerTypes.h:108
const T & move(const T &t)
Definition: gtest-port.h:1317
Definition: LiveViewControllerConfiguration.h:29

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