AWS IoT Device SDK C++ v2: shadow/include/aws/iotshadow/IotShadowClient.h Source File

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

IotShadowClient.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/iotshadow/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 Iotshadow
19 {
20
21 class DeleteNamedShadowRequest;
22 class DeleteNamedShadowSubscriptionRequest;
23 class DeleteShadowRequest;
24 class DeleteShadowResponse;
25 class DeleteShadowSubscriptionRequest;
26 class ErrorResponse;
27 class GetNamedShadowRequest;
28 class GetNamedShadowSubscriptionRequest;
29 class GetShadowRequest;
30 class GetShadowResponse;
31 class GetShadowSubscriptionRequest;
32 class NamedShadowDeltaUpdatedSubscriptionRequest;
33 class NamedShadowUpdatedSubscriptionRequest;
34 class ShadowDeltaUpdatedEvent;
35 class ShadowDeltaUpdatedSubscriptionRequest;
36 class ShadowUpdatedEvent;
37 class ShadowUpdatedSubscriptionRequest;
38 class UpdateNamedShadowRequest;
39 class UpdateNamedShadowSubscriptionRequest;
40 class UpdateShadowRequest;
41 class UpdateShadowResponse;
42 class UpdateShadowSubscriptionRequest;
43
44 using OnSubscribeComplete = std::function<void(int ioErr)>;
45 using OnPublishComplete = std::function<void(int ioErr)>;
46
47 using OnSubscribeToDeleteNamedShadowRejectedResponse =
48 std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
49
50 using OnSubscribeToGetNamedShadowAcceptedResponse =
51 std::function<void(Aws::Iotshadow::GetShadowResponse *, int ioErr)>;
52
53 using OnSubscribeToShadowDeltaUpdatedEventsResponse =
54 std::function<void(Aws::Iotshadow::ShadowDeltaUpdatedEvent *, int ioErr)>;
55
56 using OnSubscribeToDeleteShadowAcceptedResponse =
57 std::function<void(Aws::Iotshadow::DeleteShadowResponse *, int ioErr)>;
58
59 using OnSubscribeToUpdateNamedShadowAcceptedResponse =
60 std::function<void(Aws::Iotshadow::UpdateShadowResponse *, int ioErr)>;
61
62 using OnSubscribeToDeleteNamedShadowAcceptedResponse =
63 std::function<void(Aws::Iotshadow::DeleteShadowResponse *, int ioErr)>;
64
65 using OnSubscribeToUpdateShadowAcceptedResponse =
66 std::function<void(Aws::Iotshadow::UpdateShadowResponse *, int ioErr)>;
67
68 using OnSubscribeToUpdateShadowRejectedResponse =
69 std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
70
71 using OnSubscribeToDeleteShadowRejectedResponse =
72 std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
73
74 using OnSubscribeToUpdateNamedShadowRejectedResponse =
75 std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
76
77 using OnSubscribeToNamedShadowUpdatedEventsResponse =
78 std::function<void(Aws::Iotshadow::ShadowUpdatedEvent *, int ioErr)>;
79
80 using OnSubscribeToGetShadowAcceptedResponse =
81 std::function<void(Aws::Iotshadow::GetShadowResponse *, int ioErr)>;
82
83 using OnSubscribeToShadowUpdatedEventsResponse =
84 std::function<void(Aws::Iotshadow::ShadowUpdatedEvent *, int ioErr)>;
85
86 using OnSubscribeToNamedShadowDeltaUpdatedEventsResponse =
87 std::function<void(Aws::Iotshadow::ShadowDeltaUpdatedEvent *, int ioErr)>;
88
89 using OnSubscribeToGetNamedShadowRejectedResponse =
90 std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
91
92 using OnSubscribeToGetShadowRejectedResponse = std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
93
102 class AWS_IOTSHADOW_API IotShadowClient final
103 {
104 public:
105 IotShadowClient(const std::shared_ptr<Aws::Crt::Mqtt::MqttConnection> &connection);
106
107 operator bool() const noexcept;
108 int GetLastError() const noexcept;
109
129 bool SubscribeToDeleteNamedShadowRejected(
130 const Aws::Iotshadow::DeleteNamedShadowSubscriptionRequest &request,
131 Aws::Crt::Mqtt::QOS qos,
132 const OnSubscribeToDeleteNamedShadowRejectedResponse &handler,
133 const OnSubscribeComplete &onSubAck);
134
154 bool SubscribeToGetNamedShadowAccepted(
155 const Aws::Iotshadow::GetNamedShadowSubscriptionRequest &request,
156 Aws::Crt::Mqtt::QOS qos,
157 const OnSubscribeToGetNamedShadowAcceptedResponse &handler,
158 const OnSubscribeComplete &onSubAck);
159
179 bool SubscribeToShadowDeltaUpdatedEvents(
180 const Aws::Iotshadow::ShadowDeltaUpdatedSubscriptionRequest &request,
181 Aws::Crt::Mqtt::QOS qos,
182 const OnSubscribeToShadowDeltaUpdatedEventsResponse &handler,
183 const OnSubscribeComplete &onSubAck);
184
204 bool SubscribeToDeleteShadowAccepted(
205 const Aws::Iotshadow::DeleteShadowSubscriptionRequest &request,
206 Aws::Crt::Mqtt::QOS qos,
207 const OnSubscribeToDeleteShadowAcceptedResponse &handler,
208 const OnSubscribeComplete &onSubAck);
209
229 bool SubscribeToUpdateNamedShadowAccepted(
230 const Aws::Iotshadow::UpdateNamedShadowSubscriptionRequest &request,
231 Aws::Crt::Mqtt::QOS qos,
232 const OnSubscribeToUpdateNamedShadowAcceptedResponse &handler,
233 const OnSubscribeComplete &onSubAck);
234
254 bool SubscribeToDeleteNamedShadowAccepted(
255 const Aws::Iotshadow::DeleteNamedShadowSubscriptionRequest &request,
256 Aws::Crt::Mqtt::QOS qos,
257 const OnSubscribeToDeleteNamedShadowAcceptedResponse &handler,
258 const OnSubscribeComplete &onSubAck);
259
279 bool SubscribeToUpdateShadowAccepted(
280 const Aws::Iotshadow::UpdateShadowSubscriptionRequest &request,
281 Aws::Crt::Mqtt::QOS qos,
282 const OnSubscribeToUpdateShadowAcceptedResponse &handler,
283 const OnSubscribeComplete &onSubAck);
284
304 bool SubscribeToUpdateShadowRejected(
305 const Aws::Iotshadow::UpdateShadowSubscriptionRequest &request,
306 Aws::Crt::Mqtt::QOS qos,
307 const OnSubscribeToUpdateShadowRejectedResponse &handler,
308 const OnSubscribeComplete &onSubAck);
309
329 bool SubscribeToDeleteShadowRejected(
330 const Aws::Iotshadow::DeleteShadowSubscriptionRequest &request,
331 Aws::Crt::Mqtt::QOS qos,
332 const OnSubscribeToDeleteShadowRejectedResponse &handler,
333 const OnSubscribeComplete &onSubAck);
334
354 bool SubscribeToUpdateNamedShadowRejected(
355 const Aws::Iotshadow::UpdateNamedShadowSubscriptionRequest &request,
356 Aws::Crt::Mqtt::QOS qos,
357 const OnSubscribeToUpdateNamedShadowRejectedResponse &handler,
358 const OnSubscribeComplete &onSubAck);
359
379 bool SubscribeToNamedShadowUpdatedEvents(
380 const Aws::Iotshadow::NamedShadowUpdatedSubscriptionRequest &request,
381 Aws::Crt::Mqtt::QOS qos,
382 const OnSubscribeToNamedShadowUpdatedEventsResponse &handler,
383 const OnSubscribeComplete &onSubAck);
384
404 bool SubscribeToGetShadowAccepted(
405 const Aws::Iotshadow::GetShadowSubscriptionRequest &request,
406 Aws::Crt::Mqtt::QOS qos,
407 const OnSubscribeToGetShadowAcceptedResponse &handler,
408 const OnSubscribeComplete &onSubAck);
409
429 bool SubscribeToShadowUpdatedEvents(
430 const Aws::Iotshadow::ShadowUpdatedSubscriptionRequest &request,
431 Aws::Crt::Mqtt::QOS qos,
432 const OnSubscribeToShadowUpdatedEventsResponse &handler,
433 const OnSubscribeComplete &onSubAck);
434
454 bool SubscribeToNamedShadowDeltaUpdatedEvents(
455 const Aws::Iotshadow::NamedShadowDeltaUpdatedSubscriptionRequest &request,
456 Aws::Crt::Mqtt::QOS qos,
457 const OnSubscribeToNamedShadowDeltaUpdatedEventsResponse &handler,
458 const OnSubscribeComplete &onSubAck);
459
479 bool SubscribeToGetNamedShadowRejected(
480 const Aws::Iotshadow::GetNamedShadowSubscriptionRequest &request,
481 Aws::Crt::Mqtt::QOS qos,
482 const OnSubscribeToGetNamedShadowRejectedResponse &handler,
483 const OnSubscribeComplete &onSubAck);
484
504 bool SubscribeToGetShadowRejected(
505 const Aws::Iotshadow::GetShadowSubscriptionRequest &request,
506 Aws::Crt::Mqtt::QOS qos,
507 const OnSubscribeToGetShadowRejectedResponse &handler,
508 const OnSubscribeComplete &onSubAck);
509
528 bool PublishGetShadow(
529 const Aws::Iotshadow::GetShadowRequest &request,
530 Aws::Crt::Mqtt::QOS qos,
531 const OnPublishComplete &onPubAck);
532
551 bool PublishDeleteShadow(
552 const Aws::Iotshadow::DeleteShadowRequest &request,
553 Aws::Crt::Mqtt::QOS qos,
554 const OnPublishComplete &onPubAck);
555
574 bool PublishUpdateShadow(
575 const Aws::Iotshadow::UpdateShadowRequest &request,
576 Aws::Crt::Mqtt::QOS qos,
577 const OnPublishComplete &onPubAck);
578
597 bool PublishDeleteNamedShadow(
598 const Aws::Iotshadow::DeleteNamedShadowRequest &request,
599 Aws::Crt::Mqtt::QOS qos,
600 const OnPublishComplete &onPubAck);
601
620 bool PublishGetNamedShadow(
621 const Aws::Iotshadow::GetNamedShadowRequest &request,
622 Aws::Crt::Mqtt::QOS qos,
623 const OnPublishComplete &onPubAck);
624
643 bool PublishUpdateNamedShadow(
644 const Aws::Iotshadow::UpdateNamedShadowRequest &request,
645 Aws::Crt::Mqtt::QOS qos,
646 const OnPublishComplete &onPubAck);
647
648 private:
649 std::shared_ptr<Aws::Crt::Mqtt::MqttConnection> m_connection;
650 };
651
652 } // namespace Iotshadow
653
654} // namespace Aws
StlAllocator.h
Types.h
Aws::Iotshadow::DeleteNamedShadowRequest
Definition: DeleteNamedShadowRequest.h:24
Aws::Iotshadow::DeleteNamedShadowSubscriptionRequest
Definition: DeleteNamedShadowSubscriptionRequest.h:24
Aws::Iotshadow::DeleteShadowRequest
Definition: DeleteShadowRequest.h:24
Aws::Iotshadow::DeleteShadowResponse
Definition: DeleteShadowResponse.h:26
Aws::Iotshadow::DeleteShadowSubscriptionRequest
Definition: DeleteShadowSubscriptionRequest.h:24
Aws::Iotshadow::ErrorResponse
Definition: ErrorResponse.h:26
Aws::Iotshadow::GetNamedShadowRequest
Definition: GetNamedShadowRequest.h:24
Aws::Iotshadow::GetNamedShadowSubscriptionRequest
Definition: GetNamedShadowSubscriptionRequest.h:24
Aws::Iotshadow::GetShadowRequest
Definition: GetShadowRequest.h:24
Aws::Iotshadow::GetShadowResponse
Definition: GetShadowResponse.h:28
Aws::Iotshadow::GetShadowSubscriptionRequest
Definition: GetShadowSubscriptionRequest.h:24
Aws::Iotshadow::IotShadowClient
Definition: IotShadowClient.h:103
Aws::Iotshadow::NamedShadowDeltaUpdatedSubscriptionRequest
Definition: NamedShadowDeltaUpdatedSubscriptionRequest.h:24
Aws::Iotshadow::NamedShadowUpdatedSubscriptionRequest
Definition: NamedShadowUpdatedSubscriptionRequest.h:24
Aws::Iotshadow::ShadowDeltaUpdatedEvent
Definition: ShadowDeltaUpdatedEvent.h:28
Aws::Iotshadow::ShadowDeltaUpdatedSubscriptionRequest
Definition: ShadowDeltaUpdatedSubscriptionRequest.h:24
Aws::Iotshadow::ShadowUpdatedEvent
Definition: ShadowUpdatedEvent.h:27
Aws::Iotshadow::ShadowUpdatedSubscriptionRequest
Definition: ShadowUpdatedSubscriptionRequest.h:24
Aws::Iotshadow::UpdateNamedShadowRequest
Definition: UpdateNamedShadowRequest.h:26
Aws::Iotshadow::UpdateNamedShadowSubscriptionRequest
Definition: UpdateNamedShadowSubscriptionRequest.h:24
Aws::Iotshadow::UpdateShadowRequest
Definition: UpdateShadowRequest.h:26
Aws::Iotshadow::UpdateShadowResponse
Definition: UpdateShadowResponse.h:28
Aws::Iotshadow::UpdateShadowSubscriptionRequest
Definition: UpdateShadowSubscriptionRequest.h:24
MqttClient.h
Aws::Crt::Mqtt::QOS
aws_mqtt_qos QOS
Definition: Types.h:42
Aws::Iotshadow::OnSubscribeToGetNamedShadowAcceptedResponse
std::function< void(Aws::Iotshadow::GetShadowResponse *, int ioErr)> OnSubscribeToGetNamedShadowAcceptedResponse
Definition: IotShadowClient.h:51
Aws::Iotshadow::OnSubscribeToNamedShadowUpdatedEventsResponse
std::function< void(Aws::Iotshadow::ShadowUpdatedEvent *, int ioErr)> OnSubscribeToNamedShadowUpdatedEventsResponse
Definition: IotShadowClient.h:78
Aws::Iotshadow::OnSubscribeToDeleteNamedShadowRejectedResponse
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToDeleteNamedShadowRejectedResponse
Definition: IotShadowClient.h:48
Aws::Iotshadow::OnSubscribeToShadowDeltaUpdatedEventsResponse
std::function< void(Aws::Iotshadow::ShadowDeltaUpdatedEvent *, int ioErr)> OnSubscribeToShadowDeltaUpdatedEventsResponse
Definition: IotShadowClient.h:54
Aws::Iotshadow::OnSubscribeToNamedShadowDeltaUpdatedEventsResponse
std::function< void(Aws::Iotshadow::ShadowDeltaUpdatedEvent *, int ioErr)> OnSubscribeToNamedShadowDeltaUpdatedEventsResponse
Definition: IotShadowClient.h:87
Aws::Iotshadow::OnSubscribeToDeleteNamedShadowAcceptedResponse
std::function< void(Aws::Iotshadow::DeleteShadowResponse *, int ioErr)> OnSubscribeToDeleteNamedShadowAcceptedResponse
Definition: IotShadowClient.h:63
Aws::Iotshadow::OnSubscribeComplete
std::function< void(int ioErr)> OnSubscribeComplete
Definition: IotShadowClient.h:44
Aws::Iotshadow::OnPublishComplete
std::function< void(int ioErr)> OnPublishComplete
Definition: IotShadowClient.h:45
Aws::Iotshadow::OnSubscribeToGetShadowAcceptedResponse
std::function< void(Aws::Iotshadow::GetShadowResponse *, int ioErr)> OnSubscribeToGetShadowAcceptedResponse
Definition: IotShadowClient.h:81
Aws::Iotshadow::OnSubscribeToDeleteShadowAcceptedResponse
std::function< void(Aws::Iotshadow::DeleteShadowResponse *, int ioErr)> OnSubscribeToDeleteShadowAcceptedResponse
Definition: IotShadowClient.h:57
Aws::Iotshadow::OnSubscribeToGetShadowRejectedResponse
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToGetShadowRejectedResponse
Definition: IotShadowClient.h:92
Aws::Iotshadow::OnSubscribeToUpdateNamedShadowRejectedResponse
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToUpdateNamedShadowRejectedResponse
Definition: IotShadowClient.h:75
Aws::Iotshadow::OnSubscribeToUpdateShadowRejectedResponse
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToUpdateShadowRejectedResponse
Definition: IotShadowClient.h:69
Aws::Iotshadow::OnSubscribeToDeleteShadowRejectedResponse
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToDeleteShadowRejectedResponse
Definition: IotShadowClient.h:72
Aws::Iotshadow::OnSubscribeToUpdateNamedShadowAcceptedResponse
std::function< void(Aws::Iotshadow::UpdateShadowResponse *, int ioErr)> OnSubscribeToUpdateNamedShadowAcceptedResponse
Definition: IotShadowClient.h:60
Aws::Iotshadow::OnSubscribeToUpdateShadowAcceptedResponse
std::function< void(Aws::Iotshadow::UpdateShadowResponse *, int ioErr)> OnSubscribeToUpdateShadowAcceptedResponse
Definition: IotShadowClient.h:66
Aws::Iotshadow::OnSubscribeToGetNamedShadowRejectedResponse
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToGetNamedShadowRejectedResponse
Definition: IotShadowClient.h:90
Aws::Iotshadow::OnSubscribeToShadowUpdatedEventsResponse
std::function< void(Aws::Iotshadow::ShadowUpdatedEvent *, int ioErr)> OnSubscribeToShadowUpdatedEventsResponse
Definition: IotShadowClient.h:84
Aws
Definition: Api.h:17
Exports.h
AWS_IOTSHADOW_API
#define AWS_IOTSHADOW_API
Definition: Exports.h:20