AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
VisualCharacteristicsInterface.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 ACSDK_VISUALCHARACTERISTICSINTERFACES_VISUALCHARACTERISTICSINTERFACE_H_
16 #define ACSDK_VISUALCHARACTERISTICSINTERFACES_VISUALCHARACTERISTICSINTERFACE_H_
17 
18 #include <string>
19 #include <vector>
20 
21 namespace alexaClientSDK {
22 namespace visualCharacteristicsInterfaces {
23 
27 struct Dimension {
29  enum class Unit {
31  PIXEL,
32 
34  DPI,
35 
37  DP,
38 
41 
43  INCHES
44  };
45 
48 
50  double width;
51 
53  double height;
54 
60  static const std::string unitToText(const Unit unit) {
61  switch (unit) {
62  case Unit::PIXEL:
63  return "PIXEL";
64  case Unit::DPI:
65  return "DPI";
66  case Unit::DP:
67  return "DP";
68  case Unit::CENTIMETERS:
69  return "CENTIMETERS";
70  case Unit::INCHES:
71  return "INCHES";
72  }
73 
74  return std::string();
75  }
76 };
77 
81 struct WindowSize {
83  enum class WindowSizeType {
85  DISCRETE,
86 
88  CONTINUOUS
89  };
90 
93 
96 
102 
103  static const std::string windowSizeTypeToText(const WindowSizeType windowSizeType) {
104  switch (windowSizeType) {
105  case WindowSizeType::DISCRETE:
106  return "DISCRETE";
107  case WindowSizeType::CONTINUOUS:
108  return "CONTINUOUS";
109  }
110 
111  return std::string();
112  }
113 };
114 
121  enum class WindowType {
123  STANDARD,
124 
126  OVERLAY
127  };
128 
131 
134 
136  std::vector<WindowSize> sizes;
137 
139  std::vector<std::string> interactionModes;
140 
146  static const std::string windowTypeToText(const WindowType windowType) {
147  switch (windowType) {
148  case WindowType::STANDARD:
149  return "STANDARD";
150  case WindowType::OVERLAY:
151  return "OVERLAY";
152  }
153 
154  return std::string();
155  }
156 };
157 
164  enum class UIMode {
166  AUTO,
167 
169  HUB,
170 
172  TV,
173 
175  MOBILE,
176 
178  PC,
179 
181  HEADLESS
182  };
183 
185  enum class Unit {
187  CENTIMETERS,
188 
190  INCHES
191  };
192 
195 
198 
201 
204 
207 
210 
213 
216 
222  static const std::string uiModeToText(const UIMode uiMode) {
223  switch (uiMode) {
224  case UIMode::AUTO:
225  return "AUTO";
226  case UIMode::HUB:
227  return "HUB";
228  case UIMode::TV:
229  return "TV";
230  case UIMode::MOBILE:
231  return "MOBILE";
232  case UIMode::PC:
233  return "PC";
234  case UIMode::HEADLESS:
235  return "HEADLESS";
236  }
237 
238  return std::string();
239  }
240 
246  static const std::string unitToText(const Unit unit) {
247  switch (unit) {
248  case Unit::CENTIMETERS:
249  return "CENTIMETERS";
250  case Unit::INCHES:
251  return "INCHES";
252  }
253 
254  return std::string();
255  }
256 };
257 
264  enum Type {
267  };
268 
270  enum TouchType {
273 
275  UNSUPPORTED
276  };
277 
279  enum Shape {
282 
284  ROUND
285  };
286 
289 
291  std::vector<TouchType> touch;
292 
295 
298 
301 
304 
307 
313  static const std::string typeToText(const Type type) {
314  switch (type) {
315  case Type::PIXEL:
316  return "PIXEL";
317  }
318 
319  return std::string();
320  }
321 
327  static const std::string touchTypeToText(const TouchType touchType) {
328  switch (touchType) {
329  case TouchType::SINGLE:
330  return "SINGLE";
331  case TouchType::UNSUPPORTED:
332  return "UNSUPPORTED";
333  }
334 
335  return std::string();
336  }
337 
343  static const std::string shapeToText(const Shape shape) {
344  switch (shape) {
345  case Shape::RECTANGLE:
346  return "RECTANGLE";
347  case Shape::ROUND:
348  return "ROUND";
349  }
350 
351  return std::string();
352  }
353 };
354 
363 };
364 
371  int display;
373 };
374 
379  std::vector<InteractionMode> interactionModes;
380  std::vector<WindowTemplate> windowTemplates;
382 };
383 
388 public:
392  virtual ~VisualCharacteristicsInterface() = default;
393 
398  virtual std::vector<WindowTemplate> getWindowTemplates() = 0;
399 
404  virtual std::vector<InteractionMode> getInteractionModes() = 0;
405 
410  virtual DisplayCharacteristics getDisplayCharacteristics() = 0;
411 
418  virtual void setWindowInstances(
419  const std::vector<WindowInstance>& instances,
420  const std::string& defaultWindowInstanceId) = 0;
421 
428  virtual bool addWindowInstance(const WindowInstance& instance) = 0;
429 
435  virtual bool removeWindowInstance(const std::string& windowInstanceId) = 0;
436 
441  virtual void updateWindowInstance(const WindowInstance& instance) = 0;
442 
448  virtual bool setDefaultWindowInstance(const std::string& windowInstanceId) = 0;
449 };
450 } // namespace visualCharacteristicsInterfaces
451 } // namespace alexaClientSDK
452 #endif // ACSDK_VISUALCHARACTERISTICSINTERFACES_VISUALCHARACTERISTICSINTERFACE_H_
Dimension maximum
Definition: VisualCharacteristicsInterface.h:101
static const std::string touchTypeToText(const TouchType touchType)
Definition: VisualCharacteristicsInterface.h:327
Dimension densityIndependentResolution
The density independent resolution, unit must be DP.
Definition: VisualCharacteristicsInterface.h:303
static const std::string windowTypeToText(const WindowType windowType)
Definition: VisualCharacteristicsInterface.h:146
std::string id
Window template id.
Definition: VisualCharacteristicsInterface.h:130
UIMode
Enum defining the UI modes of interaction mode.
Definition: VisualCharacteristicsInterface.h:164
bool includeInWindowState
Definition: VisualCharacteristicsInterface.h:369
DisplayCharacteristics displayCharacteristics
Definition: VisualCharacteristicsInterface.h:381
static const std::string uiModeToText(const UIMode uiMode)
Definition: VisualCharacteristicsInterface.h:222
int display
Definition: VisualCharacteristicsInterface.h:371
int zOrderIndex
Definition: VisualCharacteristicsInterface.h:372
std::string sizeConfigurationId
Definition: VisualCharacteristicsInterface.h:362
Definition: VisualCharacteristicsInterface.h:27
double width
Width in unit dimensions.
Definition: VisualCharacteristicsInterface.h:50
std::vector< TouchType > touch
Touch types supported by the display.
Definition: VisualCharacteristicsInterface.h:291
Dimension resolution
The display resolution, unit must be PIXEL.
Definition: VisualCharacteristicsInterface.h:300
Unit
Enum class defining the unit for the interaction mode.
Definition: VisualCharacteristicsInterface.h:185
::std::string string
Definition: gtest-port.h:1097
Definition: VisualCharacteristicsInterface.h:262
UIMode uiMode
UI mode for this interaction mode.
Definition: VisualCharacteristicsInterface.h:194
std::string templateId
Definition: VisualCharacteristicsInterface.h:360
Shape
Enum defining the shape of the display.
Definition: VisualCharacteristicsInterface.h:279
bool dialogSupported
Dialog support.
Definition: VisualCharacteristicsInterface.h:215
std::string id
Definition: VisualCharacteristicsInterface.h:359
Definition: VisualCharacteristicsInterface.h:358
Rectangle shape.
Definition: VisualCharacteristicsInterface.h:281
std::vector< WindowSize > sizes
Sizes supported by this window template.
Definition: VisualCharacteristicsInterface.h:136
std::string id
Unique identifier for the specified size configuration.
Definition: VisualCharacteristicsInterface.h:92
TouchType
Enum defining the touch type supported by display.
Definition: VisualCharacteristicsInterface.h:270
Single display type.
Definition: VisualCharacteristicsInterface.h:272
Type
Enum defining the type of the Display.
Definition: VisualCharacteristicsInterface.h:264
int pixelDensity
The pixel density, unit is DPI.
Definition: VisualCharacteristicsInterface.h:297
std::string id
ID of this interaction mode.
Definition: VisualCharacteristicsInterface.h:197
WindowType
Enum defining the window types for the template.
Definition: VisualCharacteristicsInterface.h:121
static const std::string unitToText(const Unit unit)
Definition: VisualCharacteristicsInterface.h:246
static const std::string typeToText(const Type type)
Definition: VisualCharacteristicsInterface.h:313
static const std::string shapeToText(const Shape shape)
Definition: VisualCharacteristicsInterface.h:343
Dimension minimum
Definition: VisualCharacteristicsInterface.h:100
Unit
Enum defining the units for dimension.
Definition: VisualCharacteristicsInterface.h:29
std::vector< InteractionMode > interactionModes
Definition: VisualCharacteristicsInterface.h:379
WindowSizeType
Enum defining the Window Size types.
Definition: VisualCharacteristicsInterface.h:83
static const std::string unitToText(const Unit unit)
Definition: VisualCharacteristicsInterface.h:60
Definition: VisualCharacteristicsInterface.h:81
Unit interactionDistanceUnit
Unit of the interaction distance for this interaction mode.
Definition: VisualCharacteristicsInterface.h:200
Definition: VisualCharacteristicsInterface.h:119
static const std::string windowSizeTypeToText(const WindowSizeType windowSizeType)
Definition: VisualCharacteristicsInterface.h:103
std::vector< WindowTemplate > windowTemplates
Definition: VisualCharacteristicsInterface.h:380
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Unit unit
Unit for this dimension.
Definition: VisualCharacteristicsInterface.h:47
bool touchSupported
Touch support.
Definition: VisualCharacteristicsInterface.h:206
int interactionDistanceValue
Value of the interaction distance for this interaction mode.
Definition: VisualCharacteristicsInterface.h:203
Type type
Type of the display.
Definition: VisualCharacteristicsInterface.h:288
Definition: VisualCharacteristicsInterface.h:162
std::string interactionMode
Definition: VisualCharacteristicsInterface.h:361
WindowType type
Type of of the window template.
Definition: VisualCharacteristicsInterface.h:133
bool keyboardSupported
Keyboard support.
Definition: VisualCharacteristicsInterface.h:209
double height
Height in unit dimensions.
Definition: VisualCharacteristicsInterface.h:53
bool videoSupported
Video support.
Definition: VisualCharacteristicsInterface.h:212
WindowSizeType type
Window size type.
Definition: VisualCharacteristicsInterface.h:95
std::vector< std::string > interactionModes
Interaction mode supported by this window template.
Definition: VisualCharacteristicsInterface.h:139
Shape shape
Shape of the display.
Definition: VisualCharacteristicsInterface.h:294
Dimension physicalSize
The physical size of the display, unit must be CENTIMETERS or INCHES.
Definition: VisualCharacteristicsInterface.h:306
bool supportsBackgroundPresentations
Definition: VisualCharacteristicsInterface.h:370

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