AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
LiveViewControllerTypes.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_LIVEVIEWCONTROLLERTYPES_H_
16 #define ALEXA_CLIENT_SDK_ALEXALIVEVIEWCONTROLLERINTERFACES_INCLUDE_ACSDK_ALEXALIVEVIEWCONTROLLERINTERFACES_LIVEVIEWCONTROLLERTYPES_H_
17 
18 #include <chrono>
19 #include <set>
20 #include <string>
21 
24 
25 namespace alexaClientSDK {
26 namespace alexaLiveViewControllerInterfaces {
27 
32 enum class AudioState {
37  UNMUTED,
42  MUTED,
47  DISABLED,
49  UNKNOWN
50 };
51 
59  switch (audioState) {
60  case AudioState::MUTED:
61  return "MUTED";
63  return "UNMUTED";
65  return "DISABLED";
67  return "";
68  }
69  return "";
70 }
71 
79 inline bool audioStateToMicrophoneState(AudioState audioState) {
80  switch (audioState) {
82  return true;
83  case AudioState::MUTED:
86  return false;
87  }
88  return false;
89 }
90 
97 inline AudioState microphoneStateToAudioState(bool microphoneState) {
98  if (microphoneState) {
99  return AudioState::UNMUTED;
100  } else {
101  return AudioState::MUTED;
102  }
103 }
104 
108 enum class CameraState {
110  CONNECTING,
112  CONNECTED,
114  DISCONNECTED,
116  ERROR,
118  UNKNOWN
119 };
120 
124 enum class MotionCapability {
126  PHYSICAL_PAN,
132  UNKNOWN
133 };
134 
142  switch (motionCapability) {
144  return "PHYSICAL_PAN";
146  return "PHYSICAL_TILT";
148  return "PHYSICAL_ZOOM";
150  return "";
151  }
152  return "";
153 }
154 
161  ENABLED,
163  DISABLED,
165  UNKNOWN
166 };
167 
175  switch (concurrentTwoWayTalkState) {
177  return "ENABLED";
179  return "DISABLED";
181  return "";
182  }
183  return "";
184 }
185 
189 enum class DisplayMode {
191  FULL_SCREEN,
193  OVERLAY,
195  UNKNOWN
196 };
197 
205  switch (displayMode) {
207  return "FULL_SCREEN";
209  return "OVERLAY";
211  return "";
212  }
213  return "";
214 }
215 
219 enum class LiveViewTrigger {
221  USER_ACTION,
225  UNKNOWN
226 };
227 
235  switch (liveViewTrigger) {
237  return "AUTOMATED_EVENT";
239  return "USER_ACTION";
241  return "";
242  }
243  return "";
244 }
245 
249 enum class OverlayPosition {
251  TOP_RIGHT,
253  TOP_LEFT,
255  BOTTOM_RIGHT,
257  BOTTOM_LEFT,
259  UNKNOWN
260 };
261 
269  switch (overlayPosition) {
271  return "TOP_RIGHT";
273  return "TOP_LEFT";
275  return "BOTTOM_RIGHT";
277  return "BOTTOM_LEFT";
279  return "";
280  }
281  return "";
282 }
283 
287 enum class OverlayType {
291  NONE,
293  UNKNOWN
294 };
295 
303  switch (overlayType) {
305  return "PICTURE_IN_PICTURE";
306  case OverlayType::NONE:
307  return "NONE";
309  return "";
310  }
311  return "";
312 }
313 
318 enum class Role {
320  CAMERA,
325  VIEWER,
327  UNKNOWN
328 };
329 
337  switch (role) {
338  case Role::CAMERA:
339  return "CAMERA";
340  case Role::VIEWER:
341  return "VIEWER";
342  case Role::UNKNOWN:
343  return "";
344  }
345  return "";
346 }
347 
352 enum class Status {
358  UNAUTHORIZED,
365 };
366 
370 enum class TalkMode {
372  NO_SUPPORT,
382  TAP,
384  UNKNOWN
385 };
386 
394  switch (talkMode) {
396  return "PRESS_AND_HOLD";
397  case TalkMode::TAP:
398  return "TAP";
400  return "NO_SUPPORT";
401  case TalkMode::UNKNOWN:
402  return "";
403  }
404  return "";
405 }
406 
419 };
420 
424 struct Camera {
433 };
434 
449 };
450 
454 struct Viewer {
459  enum class ViewerState {
461  CONNECTED,
463  CONNECTING,
465  UNKNOWN
466  };
467 
479 
487  bool operator<(const Viewer& anotherViewer) const {
488  return (name < anotherViewer.name);
489  }
490 };
491 
499  switch (viewerState) {
501  return "CONNECTED";
503  return "CONNECTING";
505  return "";
506  }
507  return "";
508 }
509 
513 struct Target {
515  enum class TargetType {
517  ALEXA_ENDPOINT,
519  UNKNOWN
520  };
521 
526 };
527 
535  switch (targetType) {
537  return "ALEXA_ENDPOINT";
539  return "";
540  }
541  return "";
542 }
543 
547 struct Participants {
549  std::set<Viewer> viewers;
552 };
553 
569  std::chrono::milliseconds idleTimeoutInMilliseconds;
570 };
571 
572 } // namespace alexaLiveViewControllerInterfaces
573 } // namespace alexaClientSDK
574 
575 #endif // ALEXA_CLIENT_SDK_ALEXALIVEVIEWCONTROLLERINTERFACES_INCLUDE_ACSDK_ALEXALIVEVIEWCONTROLLERINTERFACES_LIVEVIEWCONTROLLERTYPES_H_
Camera has encountered an error which means it needs to reestablish the RTCSC session.
std::set< Viewer > viewers
List of the viewing devices. At least one viewing device must be specified.
Definition: LiveViewControllerTypes.h:549
Directs the viewing device to display the overlay on the top left of the screen.
TalkMode talkMode
Audio communication capability of the camera.
Definition: LiveViewControllerTypes.h:412
avsCommon::utils::Optional< std::string > model
(Optional) Model name of the camera. Maximum length is 512 characters.
Definition: LiveViewControllerTypes.h:430
The device acts as a camera. There can be one camera per streaming session.
OverlayPosition
Definition: LiveViewControllerTypes.h:249
DisplayMode
Definition: LiveViewControllerTypes.h:189
TargetType
Enum class for different types of target endpoints. Currently only ALEXA_ENDPOINT is supported...
Definition: LiveViewControllerTypes.h:515
std::string overlayTypeToString(OverlayType overlayType)
Definition: LiveViewControllerTypes.h:302
bool hasCameraControl
Definition: LiveViewControllerTypes.h:474
The viewing device supports picture-in-picture display mode.
Any other display mode not covered by the ones above.
Any other overlay type not covered by the ones above.
AudioState microphoneState
State of the microphone at the start of the streaming session.
Definition: LiveViewControllerTypes.h:416
AudioState microphoneStateToAudioState(bool microphoneState)
Definition: LiveViewControllerTypes.h:97
std::string name
Friendly name of the viewing device, such as "Kitchen Echo Show." Maximum length is 512 characters...
Definition: LiveViewControllerTypes.h:469
::std::string string
Definition: gtest-port.h:1097
Role
Definition: LiveViewControllerTypes.h:318
std::string targetTypeToString(Target::TargetType targetType)
Definition: LiveViewControllerTypes.h:534
ViewerState
Definition: LiveViewControllerTypes.h:459
DisplayMode displayMode
Display mode in which to render the live stream.
Definition: LiveViewControllerTypes.h:440
Any other audio state not covered by the ones above.
MotionCapability
Definition: LiveViewControllerTypes.h:124
Directs the viewing device to display the overlay on the top right of the screen. ...
std::string concurrentTwoWayTalkStateToString(ConcurrentTwoWayTalkState concurrentTwoWayTalkState)
Definition: LiveViewControllerTypes.h:174
Camera is connecting currently which means RTCSC session is being initialized.
LiveViewTrigger
Definition: LiveViewControllerTypes.h:219
ConcurrentTwoWayTalkState concurrentTwoWayTalk
Defines whether the camera supports concurrent two-way communication.
Definition: LiveViewControllerTypes.h:414
bool operator<(const Viewer &anotherViewer) const
Definition: LiveViewControllerTypes.h:487
Any other state that is not covered by the viewer states above.
avsCommon::utils::Optional< TargetType > type
(Optional) Type of endpoint. Valid value: ALEXA_ENDPOINT.
Definition: LiveViewControllerTypes.h:525
Device isn&#39;t authorized to access the live view feature.
DisplayProperties suggestedDisplay
Display properties of the live streaming session.
Definition: LiveViewControllerTypes.h:559
LiveViewTrigger liveViewTrigger
Reason the live view streaming session started.
Definition: LiveViewControllerTypes.h:563
std::string viewerStateToString(Viewer::ViewerState viewerState)
Definition: LiveViewControllerTypes.h:498
Camera supports two-way audio communication with the viewing device.
Directs the viewing device to display the overlay on the bottom left of the screen.
Camera doesn&#39;t support audio communication.
Any other concurrent two-way talk state not covered by the ones above.
Definition: LiveViewControllerTypes.h:424
avsCommon::utils::Optional< OverlayPosition > overlayPosition
Definition: LiveViewControllerTypes.h:448
Camera is disconnected which means it cannot get the live camera stream anymore.
Definition: LiveViewControllerTypes.h:513
std::string make
Name of the manufacturer of the camera. Maximum length is 512 characters.
Definition: LiveViewControllerTypes.h:428
std::string roleToString(Role role)
Definition: LiveViewControllerTypes.h:336
Device battery is too low to support the live stream.
std::string liveViewTriggerToString(LiveViewTrigger liveViewTrigger)
Definition: LiveViewControllerTypes.h:234
ConcurrentTwoWayTalkState
Definition: LiveViewControllerTypes.h:159
AudioProperties audioProperties
Audio communication properties of the live streaming session.
Definition: LiveViewControllerTypes.h:561
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::string talkModeToString(TalkMode talkMode)
Definition: LiveViewControllerTypes.h:393
avsCommon::utils::Optional< OverlayType > overlayType
Definition: LiveViewControllerTypes.h:445
Any other overlay position not covered by the ones above.
std::string motionCapabilityToString(MotionCapability motionCapability)
Definition: LiveViewControllerTypes.h:141
Viewing device is connecting, which means the user can not see the camera feed yet.
std::string overlayPositionToString(OverlayPosition overlayPosition)
Definition: LiveViewControllerTypes.h:268
Camera camera
Camera source of the live feed.
Definition: LiveViewControllerTypes.h:551
An automated event, such as a doorbell press, triggered the streaming session.
The camera live feed stream displays on the entire screen.
Viewing device is connected, which means the user can see the camera feed.
TalkMode
Definition: LiveViewControllerTypes.h:370
Status
Definition: LiveViewControllerTypes.h:352
Directs the viewing device to display the overlay on the bottom right of the screen.
Any other endpoint that is not supported at this point.
std::chrono::milliseconds idleTimeoutInMilliseconds
Definition: LiveViewControllerTypes.h:569
AudioState speakerState
State of the speaker at the start of the streaming session.
Definition: LiveViewControllerTypes.h:418
CameraState
Definition: LiveViewControllerTypes.h:108
Any other live view trigger mode not covered by the ones above.
std::string displayModeToString(DisplayMode displayMode)
Definition: LiveViewControllerTypes.h:204
bool audioStateToMicrophoneState(AudioState audioState)
Definition: LiveViewControllerTypes.h:79
std::string audioStateToString(AudioState audioState)
Definition: LiveViewControllerTypes.h:58
Any other role type not covered by the ones above.
OverlayType
Definition: LiveViewControllerTypes.h:287
Any other talk mode not covered by the ones above.
The viewing device doesn&#39;t support overlay mode.
The camera live feed stream displays on top of other streams.
std::string endpointId
Identifier of the device.
Definition: LiveViewControllerTypes.h:523
avsCommon::utils::Optional< std::set< MotionCapability > > capabilities
(Optional) Motion capabilities of the camera.
Definition: LiveViewControllerTypes.h:432
AudioState
Definition: LiveViewControllerTypes.h:32
std::string name
Friendly name of the camera, such as "front door". Maximum length is 512 characters.
Definition: LiveViewControllerTypes.h:426
Definition: LiveViewControllerTypes.h:454
ViewerState state
Definition: LiveViewControllerTypes.h:478
Camera is currently connected which means RTCSC is ready to deliver the live camera stream...

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