AWS IoT Device SDK C++ v2  1.34.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 
10 
11 #include <aws/crt/StlAllocator.h>
12 #include <aws/crt/Types.h>
13 
16 
17 namespace Aws
18 {
19  namespace Iotidentity
20  {
21 
22  class CreateCertificateFromCsrRequest;
23  class CreateCertificateFromCsrResponse;
24  class CreateCertificateFromCsrSubscriptionRequest;
25  class CreateKeysAndCertificateRequest;
26  class CreateKeysAndCertificateResponse;
27  class CreateKeysAndCertificateSubscriptionRequest;
28  class ErrorResponse;
29  class RegisterThingRequest;
30  class RegisterThingResponse;
31  class RegisterThingSubscriptionRequest;
32 
33  using OnSubscribeComplete = std::function<void(int ioErr)>;
34  using OnPublishComplete = std::function<void(int ioErr)>;
35 
37  std::function<void(Aws::Iotidentity::CreateCertificateFromCsrResponse *, int ioErr)>;
38 
40  std::function<void(Aws::Iotidentity::ErrorResponse *, int ioErr)>;
41 
43  std::function<void(Aws::Iotidentity::CreateKeysAndCertificateResponse *, int ioErr)>;
44 
46  std::function<void(Aws::Iotidentity::ErrorResponse *, int ioErr)>;
47 
49  std::function<void(Aws::Iotidentity::RegisterThingResponse *, int ioErr)>;
50 
52  std::function<void(Aws::Iotidentity::ErrorResponse *, int ioErr)>;
53 
61  {
62  public:
63  IotIdentityClient(const std::shared_ptr<Aws::Crt::Mqtt::MqttConnection> &connection);
64  IotIdentityClient(const std::shared_ptr<Aws::Crt::Mqtt5::Mqtt5Client> &mqtt5Client);
65 
66  operator bool() const noexcept;
67  int GetLastError() const noexcept;
68 
88  bool SubscribeToCreateCertificateFromCsrAccepted(
92  const OnSubscribeComplete &onSubAck);
93 
113  bool SubscribeToCreateCertificateFromCsrRejected(
117  const OnSubscribeComplete &onSubAck);
118 
138  bool SubscribeToCreateKeysAndCertificateAccepted(
142  const OnSubscribeComplete &onSubAck);
143 
163  bool SubscribeToCreateKeysAndCertificateRejected(
167  const OnSubscribeComplete &onSubAck);
168 
188  bool SubscribeToRegisterThingAccepted(
192  const OnSubscribeComplete &onSubAck);
193 
213  bool SubscribeToRegisterThingRejected(
217  const OnSubscribeComplete &onSubAck);
218 
240  bool PublishCreateCertificateFromCsr(
243  const OnPublishComplete &onPubAck);
244 
266  bool PublishCreateKeysAndCertificate(
269  const OnPublishComplete &onPubAck);
270 
289  bool PublishRegisterThing(
292  const OnPublishComplete &onPubAck);
293 
294  private:
295  std::shared_ptr<Aws::Crt::Mqtt::MqttConnection> m_connection;
296  };
297 
298  } // namespace Iotidentity
299 
300 } // namespace Aws
Aws::Iotidentity::RegisterThingSubscriptionRequest
Definition: RegisterThingSubscriptionRequest.h:24
Aws::Iotidentity::OnPublishComplete
std::function< void(int ioErr)> OnPublishComplete
Definition: IotIdentityClient.h:34
Aws::Iotidentity::OnSubscribeToCreateCertificateFromCsrRejectedResponse
std::function< void(Aws::Iotidentity::ErrorResponse *, int ioErr)> OnSubscribeToCreateCertificateFromCsrRejectedResponse
Definition: IotIdentityClient.h:40
Aws::Iotidentity::CreateKeysAndCertificateRequest
Definition: CreateKeysAndCertificateRequest.h:24
Aws::Iotidentity::OnSubscribeComplete
std::function< void(int ioErr)> OnSubscribeComplete
Definition: IotIdentityClient.h:33
Aws::Iotidentity::ErrorResponse
Definition: ErrorResponse.h:24
StlAllocator.h
Aws::Iotidentity::CreateKeysAndCertificateResponse
Definition: CreateKeysAndCertificateResponse.h:24
Aws::Iotidentity::CreateCertificateFromCsrSubscriptionRequest
Definition: CreateCertificateFromCsrSubscriptionRequest.h:24
AWS_IOTIDENTITY_API
#define AWS_IOTIDENTITY_API
Definition: Exports.h:20
Aws::Iotidentity::OnSubscribeToCreateKeysAndCertificateRejectedResponse
std::function< void(Aws::Iotidentity::ErrorResponse *, int ioErr)> OnSubscribeToCreateKeysAndCertificateRejectedResponse
Definition: IotIdentityClient.h:46
Aws::Iotidentity::CreateCertificateFromCsrRequest
Definition: CreateCertificateFromCsrRequest.h:24
Aws::Crt::Mqtt::QOS
aws_mqtt_qos QOS
Definition: Types.h:40
Mqtt5Client.h
Aws::Iotidentity::IotIdentityClient
Definition: IotIdentityClient.h:61
Aws::Iotidentity::OnSubscribeToRegisterThingAcceptedResponse
std::function< void(Aws::Iotidentity::RegisterThingResponse *, int ioErr)> OnSubscribeToRegisterThingAcceptedResponse
Definition: IotIdentityClient.h:49
Aws::Iotidentity::CreateKeysAndCertificateSubscriptionRequest
Definition: CreateKeysAndCertificateSubscriptionRequest.h:24
Exports.h
Aws::Iotidentity::RegisterThingResponse
Definition: RegisterThingResponse.h:24
Aws::Iotidentity::OnSubscribeToCreateKeysAndCertificateAcceptedResponse
std::function< void(Aws::Iotidentity::CreateKeysAndCertificateResponse *, int ioErr)> OnSubscribeToCreateKeysAndCertificateAcceptedResponse
Definition: IotIdentityClient.h:43
Types.h
Aws::Iotidentity::OnSubscribeToRegisterThingRejectedResponse
std::function< void(Aws::Iotidentity::ErrorResponse *, int ioErr)> OnSubscribeToRegisterThingRejectedResponse
Definition: IotIdentityClient.h:52
Aws
Definition: Allocator.h:11
Aws::Iotidentity::OnSubscribeToCreateCertificateFromCsrAcceptedResponse
std::function< void(Aws::Iotidentity::CreateCertificateFromCsrResponse *, int ioErr)> OnSubscribeToCreateCertificateFromCsrAcceptedResponse
Definition: IotIdentityClient.h:37
MqttClient.h
Aws::Iotidentity::RegisterThingRequest
Definition: RegisterThingRequest.h:24
Aws::Iotidentity::CreateCertificateFromCsrResponse
Definition: CreateCertificateFromCsrResponse.h:24