AWS IoT Device SDK C++ v2: identity/include/aws/iotidentity/IotIdentityClient.h Source File

AWS IoT Device SDK C++ v2 1.14.0 AWS IoT Device SDK C++ v2

IotIdentityClient.h
Go to the documentation of this file.
1#pragma once
2
3/* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 * SPDX-License-Identifier: Apache-2.0.
5 *
6 * This file is generated
7 */
8
9#include <aws/iotidentity/Exports.h>
10
11#include <aws/crt/StlAllocator.h>
12#include <aws/crt/Types.h>
13
14#include <aws/crt/mqtt/MqttClient.h>
15
16namespace Aws
17{
18 namespace Iotidentity
19 {
20
21 class CreateCertificateFromCsrRequest;
22 class CreateCertificateFromCsrResponse;
23 class CreateCertificateFromCsrSubscriptionRequest;
24 class CreateKeysAndCertificateRequest;
25 class CreateKeysAndCertificateResponse;
26 class CreateKeysAndCertificateSubscriptionRequest;
27 class ErrorResponse;
28 class RegisterThingRequest;
29 class RegisterThingResponse;
30 class RegisterThingSubscriptionRequest;
31
32 using OnSubscribeComplete = std::function<void(int ioErr)>;
33 using OnPublishComplete = std::function<void(int ioErr)>;
34
35 using OnSubscribeToCreateCertificateFromCsrAcceptedResponse =
36 std::function<void(Aws::Iotidentity::CreateCertificateFromCsrResponse *, int ioErr)>;
37
38 using OnSubscribeToCreateKeysAndCertificateRejectedResponse =
39 std::function<void(Aws::Iotidentity::ErrorResponse *, int ioErr)>;
40
41 using OnSubscribeToRegisterThingAcceptedResponse =
42 std::function<void(Aws::Iotidentity::RegisterThingResponse *, int ioErr)>;
43
44 using OnSubscribeToRegisterThingRejectedResponse =
45 std::function<void(Aws::Iotidentity::ErrorResponse *, int ioErr)>;
46
47 using OnSubscribeToCreateKeysAndCertificateAcceptedResponse =
48 std::function<void(Aws::Iotidentity::CreateKeysAndCertificateResponse *, int ioErr)>;
49
50 using OnSubscribeToCreateCertificateFromCsrRejectedResponse =
51 std::function<void(Aws::Iotidentity::ErrorResponse *, int ioErr)>;
52
59 class AWS_IOTIDENTITY_API IotIdentityClient final
60 {
61 public:
62 IotIdentityClient(const std::shared_ptr<Aws::Crt::Mqtt::MqttConnection> &connection);
63
64 operator bool() const noexcept;
65 int GetLastError() const noexcept;
66
86 bool SubscribeToCreateCertificateFromCsrAccepted(
87 const Aws::Iotidentity::CreateCertificateFromCsrSubscriptionRequest &request,
88 Aws::Crt::Mqtt::QOS qos,
89 const OnSubscribeToCreateCertificateFromCsrAcceptedResponse &handler,
90 const OnSubscribeComplete &onSubAck);
91
111 bool SubscribeToCreateKeysAndCertificateRejected(
112 const Aws::Iotidentity::CreateKeysAndCertificateSubscriptionRequest &request,
113 Aws::Crt::Mqtt::QOS qos,
114 const OnSubscribeToCreateKeysAndCertificateRejectedResponse &handler,
115 const OnSubscribeComplete &onSubAck);
116
136 bool SubscribeToRegisterThingAccepted(
137 const Aws::Iotidentity::RegisterThingSubscriptionRequest &request,
138 Aws::Crt::Mqtt::QOS qos,
139 const OnSubscribeToRegisterThingAcceptedResponse &handler,
140 const OnSubscribeComplete &onSubAck);
141
161 bool SubscribeToRegisterThingRejected(
162 const Aws::Iotidentity::RegisterThingSubscriptionRequest &request,
163 Aws::Crt::Mqtt::QOS qos,
164 const OnSubscribeToRegisterThingRejectedResponse &handler,
165 const OnSubscribeComplete &onSubAck);
166
186 bool SubscribeToCreateKeysAndCertificateAccepted(
187 const Aws::Iotidentity::CreateKeysAndCertificateSubscriptionRequest &request,
188 Aws::Crt::Mqtt::QOS qos,
189 const OnSubscribeToCreateKeysAndCertificateAcceptedResponse &handler,
190 const OnSubscribeComplete &onSubAck);
191
211 bool SubscribeToCreateCertificateFromCsrRejected(
212 const Aws::Iotidentity::CreateCertificateFromCsrSubscriptionRequest &request,
213 Aws::Crt::Mqtt::QOS qos,
214 const OnSubscribeToCreateCertificateFromCsrRejectedResponse &handler,
215 const OnSubscribeComplete &onSubAck);
216
238 bool PublishCreateCertificateFromCsr(
239 const Aws::Iotidentity::CreateCertificateFromCsrRequest &request,
240 Aws::Crt::Mqtt::QOS qos,
241 const OnPublishComplete &onPubAck);
242
264 bool PublishCreateKeysAndCertificate(
265 const Aws::Iotidentity::CreateKeysAndCertificateRequest &request,
266 Aws::Crt::Mqtt::QOS qos,
267 const OnPublishComplete &onPubAck);
268
287 bool PublishRegisterThing(
288 const Aws::Iotidentity::RegisterThingRequest &request,
289 Aws::Crt::Mqtt::QOS qos,
290 const OnPublishComplete &onPubAck);
291
292 private:
293 std::shared_ptr<Aws::Crt::Mqtt::MqttConnection> m_connection;
294 };
295
296 } // namespace Iotidentity
297
298} // namespace Aws
StlAllocator.h
Types.h
Aws::Iotidentity::CreateCertificateFromCsrRequest
Definition: CreateCertificateFromCsrRequest.h:24
Aws::Iotidentity::CreateCertificateFromCsrResponse
Definition: CreateCertificateFromCsrResponse.h:24
Aws::Iotidentity::CreateCertificateFromCsrSubscriptionRequest
Definition: CreateCertificateFromCsrSubscriptionRequest.h:24
Aws::Iotidentity::CreateKeysAndCertificateRequest
Definition: CreateKeysAndCertificateRequest.h:24
Aws::Iotidentity::CreateKeysAndCertificateResponse
Definition: CreateKeysAndCertificateResponse.h:24
Aws::Iotidentity::CreateKeysAndCertificateSubscriptionRequest
Definition: CreateKeysAndCertificateSubscriptionRequest.h:24
Aws::Iotidentity::ErrorResponse
Definition: ErrorResponse.h:24
Aws::Iotidentity::IotIdentityClient
Definition: IotIdentityClient.h:60
Aws::Iotidentity::RegisterThingRequest
Definition: RegisterThingRequest.h:24
Aws::Iotidentity::RegisterThingResponse
Definition: RegisterThingResponse.h:24
Aws::Iotidentity::RegisterThingSubscriptionRequest
Definition: RegisterThingSubscriptionRequest.h:24
MqttClient.h
Exports.h
AWS_IOTIDENTITY_API
#define AWS_IOTIDENTITY_API
Definition: Exports.h:20
Aws::Crt::Mqtt::QOS
aws_mqtt_qos QOS
Definition: Types.h:42
Aws::Iotidentity::OnSubscribeToCreateKeysAndCertificateRejectedResponse
std::function< void(Aws::Iotidentity::ErrorResponse *, int ioErr)> OnSubscribeToCreateKeysAndCertificateRejectedResponse
Definition: IotIdentityClient.h:39
Aws::Iotidentity::OnSubscribeToCreateKeysAndCertificateAcceptedResponse
std::function< void(Aws::Iotidentity::CreateKeysAndCertificateResponse *, int ioErr)> OnSubscribeToCreateKeysAndCertificateAcceptedResponse
Definition: IotIdentityClient.h:48
Aws::Iotidentity::OnSubscribeToCreateCertificateFromCsrRejectedResponse
std::function< void(Aws::Iotidentity::ErrorResponse *, int ioErr)> OnSubscribeToCreateCertificateFromCsrRejectedResponse
Definition: IotIdentityClient.h:51
Aws::Iotidentity::OnSubscribeToCreateCertificateFromCsrAcceptedResponse
std::function< void(Aws::Iotidentity::CreateCertificateFromCsrResponse *, int ioErr)> OnSubscribeToCreateCertificateFromCsrAcceptedResponse
Definition: IotIdentityClient.h:36
Aws::Iotidentity::OnPublishComplete
std::function< void(int ioErr)> OnPublishComplete
Definition: IotIdentityClient.h:33
Aws::Iotidentity::OnSubscribeToRegisterThingAcceptedResponse
std::function< void(Aws::Iotidentity::RegisterThingResponse *, int ioErr)> OnSubscribeToRegisterThingAcceptedResponse
Definition: IotIdentityClient.h:42
Aws::Iotidentity::OnSubscribeComplete
std::function< void(int ioErr)> OnSubscribeComplete
Definition: IotIdentityClient.h:32
Aws::Iotidentity::OnSubscribeToRegisterThingRejectedResponse
std::function< void(Aws::Iotidentity::ErrorResponse *, int ioErr)> OnSubscribeToRegisterThingRejectedResponse
Definition: IotIdentityClient.h:45
Aws
Definition: Api.h:17