AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
DeviceInfo.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 ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_DEVICEINFO_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_DEVICEINFO_H_
18 
19 #include <string>
20 
23 
24 namespace alexaClientSDK {
25 namespace avsCommon {
26 namespace utils {
27 
31 class DeviceInfo {
32 public:
39  static std::shared_ptr<DeviceInfo> createFromConfiguration(
40  const std::shared_ptr<avsCommon::utils::configuration::ConfigurationNode>& configurationRoot);
41 
49  static std::unique_ptr<DeviceInfo> create(
51 
66  static std::unique_ptr<DeviceInfo> create(
67  const std::string& clientId,
68  const std::string& productId,
69  const std::string& deviceSerialNumber,
70  const std::string& manufacturerName,
71  const std::string& description,
72  const std::string& friendlyName = "",
73  const std::string& deviceType = "",
75  const std::string& registrationKey = "",
76  const std::string& productIdKey = "");
77 
83  std::string getClientId() const;
84 
90  std::string getProductId() const;
91 
98 
105 
112 
119 
125  std::string getDeviceType() const;
126 
133 
140 
147 
154  bool operator==(const DeviceInfo& rhs);
155 
162  bool operator!=(const DeviceInfo& rhs);
163 
164 private:
177  DeviceInfo(
178  const std::string& clientId,
179  const std::string& productId,
180  const std::string& deviceSerialNumber,
181  const std::string& manufacturerName,
182  const std::string& description,
183  const std::string& friendlyName,
184  const std::string& deviceType,
186  const std::string& registrationKey,
187  const std::string& productIdKey);
188 
190  std::string m_clientId;
191 
193  std::string m_productId;
194 
196  std::string m_deviceSerialNumber;
197 
199  std::string m_manufacturer;
200 
202  std::string m_deviceDescription;
203 
205  std::string m_friendlyName;
206 
208  std::string m_deviceType;
209 
212 
214  std::string m_registrationKey;
215 
217  std::string m_productIdKey;
218 };
219 
221  return m_manufacturer;
222 }
223 
225  return m_deviceDescription;
226 }
227 
229  return m_defaultEndpointId;
230 }
231 
232 } // namespace utils
233 } // namespace avsCommon
234 } // namespace alexaClientSDK
235 
236 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_DEVICEINFO_H_
std::string getManufacturerName() const
Definition: DeviceInfo.h:220
std::string getDeviceDescription() const
Definition: DeviceInfo.h:224
::std::string string
Definition: gtest-port.h:1097
bool operator==(const DeviceInfo &rhs)
static std::unique_ptr< DeviceInfo > create(const avsCommon::utils::configuration::ConfigurationNode &configurationRoot)
static std::shared_ptr< DeviceInfo > createFromConfiguration(const std::shared_ptr< avsCommon::utils::configuration::ConfigurationNode > &configurationRoot)
bool operator!=(const DeviceInfo &rhs)
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::string EndpointIdentifier
Definition: EndpointIdentifier.h:38
sdkInterfaces::endpoints::EndpointIdentifier getDefaultEndpointId() const
Definition: DeviceInfo.h:228

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