AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
AVSDiscoveryEndpointAttributes.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_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_AVSDISCOVERYENDPOINTATTRIBUTES_H_
16 #define ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_AVSDISCOVERYENDPOINTATTRIBUTES_H_
17 
18 #include <map>
19 #include <memory>
20 #include <string>
21 #include <vector>
22 
25 
26 namespace alexaClientSDK {
27 namespace avsCommon {
28 namespace avs {
29 
45  struct Registration {
48 
51 
54 
57 
67  const std::string& productId,
68  const std::string& serialNumber,
69  const std::string& registrationKey,
70  const std::string& productIdKey);
71 
75  Registration() = default;
76 
82  bool operator==(const Registration& rhs) {
83  return (
84  productId == rhs.productId && serialNumber == rhs.serialNumber &&
85  registrationKey == rhs.registrationKey && productIdKey == rhs.productIdKey);
86  }
87 
93  bool operator!=(const Registration& rhs) {
94  return !(*this == rhs);
95  }
96  };
97 
116  };
117 
122  static constexpr size_t MAX_ENDPOINT_IDENTIFIER_LENGTH = 256;
123  static constexpr size_t MAX_FRIENDLY_NAME_LENGTH = 128;
124  static constexpr size_t MAX_MANUFACTURER_NAME_LENGTH = 128;
125  static constexpr size_t MAX_DESCRIPTION_LENGTH = 128;
126  static constexpr size_t MAX_ENDPOINT_ADDITIONAL_ATTRIBUTES_LENGTH = 256;
127  static constexpr size_t MAX_CONNECTIONS_VALUE_LENGTH = 256;
129 
131  static constexpr size_t MAX_COOKIES_SIZE_BYTES = 5000;
132 
135 
139 
142 
145 
149  std::vector<std::string> displayCategories;
150 
153 
156 
160  std::vector<std::map<std::string, std::string>> connections;
161 
164  std::map<std::string, std::string> cookies;
165 };
166 
168  const std::string& productId,
169  const std::string& serialNumber,
171  const std::string& productIdKey) :
172  productId(productId),
173  serialNumber(serialNumber),
174  registrationKey(registrationKey),
175  productIdKey(productIdKey) {
176 }
177 
178 } // namespace avs
179 } // namespace avsCommon
180 } // namespace alexaClientSDK
181 
182 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_AVS_INCLUDE_AVSCOMMON_AVS_AVSDISCOVERYENDPOINTATTRIBUTES_H_
static constexpr size_t MAX_DESCRIPTION_LENGTH
Definition: AVSDiscoveryEndpointAttributes.h:125
std::string friendlyName
Definition: AVSDiscoveryEndpointAttributes.h:138
std::string serialNumber
The device serialNumber.
Definition: AVSDiscoveryEndpointAttributes.h:50
std::vector< std::string > displayCategories
Definition: AVSDiscoveryEndpointAttributes.h:149
::std::string string
Definition: gtest-port.h:1097
std::string productId
The productID of the device provided when registering the client on https://developer.amazon.com.
Definition: AVSDiscoveryEndpointAttributes.h:47
static constexpr size_t MAX_CONNECTIONS_VALUE_LENGTH
Definition: AVSDiscoveryEndpointAttributes.h:127
std::string customIdentifier
Your custom identifier for the device.
Definition: AVSDiscoveryEndpointAttributes.h:115
std::string registrationKey
The device registration key value.
Definition: AVSDiscoveryEndpointAttributes.h:53
bool operator!=(const Registration &rhs)
Definition: AVSDiscoveryEndpointAttributes.h:93
sdkInterfaces::endpoints::EndpointIdentifier endpointId
A unique ID to identify the endpoint. See EndpointIdentifier documentation for more information...
Definition: AVSDiscoveryEndpointAttributes.h:134
bool operator==(const Registration &rhs)
Definition: AVSDiscoveryEndpointAttributes.h:82
static constexpr size_t MAX_COOKIES_SIZE_BYTES
Cookies cannot exceed 5KB.
Definition: AVSDiscoveryEndpointAttributes.h:131
std::string firmwareVersion
The firmware version of the device.
Definition: AVSDiscoveryEndpointAttributes.h:111
utils::Optional< Registration > registration
Registration field used to identify the default endpoint.
Definition: AVSDiscoveryEndpointAttributes.h:152
utils::Optional< AdditionalAttributes > additionalAttributes
Contains additional information that can be used to identify an endpoint.
Definition: AVSDiscoveryEndpointAttributes.h:155
std::vector< std::map< std::string, std::string > > connections
Definition: AVSDiscoveryEndpointAttributes.h:160
static constexpr size_t MAX_FRIENDLY_NAME_LENGTH
Definition: AVSDiscoveryEndpointAttributes.h:123
std::string softwareVersion
The software version of the device.
Definition: AVSDiscoveryEndpointAttributes.h:113
std::string productIdKey
The device product id key value.
Definition: AVSDiscoveryEndpointAttributes.h:56
Definition: AVSDiscoveryEndpointAttributes.h:41
std::string manufacturer
The name of the manufacturer of the device.
Definition: AVSDiscoveryEndpointAttributes.h:105
static constexpr size_t MAX_ENDPOINT_IDENTIFIER_LENGTH
Definition: AVSDiscoveryEndpointAttributes.h:122
std::map< std::string, std::string > cookies
Definition: AVSDiscoveryEndpointAttributes.h:164
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::string model
The name of the model of the device.
Definition: AVSDiscoveryEndpointAttributes.h:107
static constexpr size_t MAX_ENDPOINT_ADDITIONAL_ATTRIBUTES_LENGTH
Definition: AVSDiscoveryEndpointAttributes.h:126
std::string description
A non-empty string with a description about the endpoint.
Definition: AVSDiscoveryEndpointAttributes.h:141
std::string EndpointIdentifier
Definition: EndpointIdentifier.h:38
std::string manufacturerName
A non-empty string identifying the endpoint manufacturer name.
Definition: AVSDiscoveryEndpointAttributes.h:144
std::string serialNumber
The serial number of the device.
Definition: AVSDiscoveryEndpointAttributes.h:109
static constexpr size_t MAX_MANUFACTURER_NAME_LENGTH
Definition: AVSDiscoveryEndpointAttributes.h:124

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