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
10
12#include <aws/crt/Types.h>
13
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
48 std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
49
51 std::function<void(Aws::Iotshadow::GetShadowResponse *, int ioErr)>;
52
54 std::function<void(Aws::Iotshadow::ShadowDeltaUpdatedEvent *, int ioErr)>;
55
57 std::function<void(Aws::Iotshadow::DeleteShadowResponse *, int ioErr)>;
58
60 std::function<void(Aws::Iotshadow::UpdateShadowResponse *, int ioErr)>;
61
63 std::function<void(Aws::Iotshadow::DeleteShadowResponse *, int ioErr)>;
64
66 std::function<void(Aws::Iotshadow::UpdateShadowResponse *, int ioErr)>;
67
69 std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
70
72 std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
73
75 std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
76
78 std::function<void(Aws::Iotshadow::ShadowUpdatedEvent *, int ioErr)>;
79
81 std::function<void(Aws::Iotshadow::GetShadowResponse *, int ioErr)>;
82
84 std::function<void(Aws::Iotshadow::ShadowUpdatedEvent *, int ioErr)>;
85
87 std::function<void(Aws::Iotshadow::ShadowDeltaUpdatedEvent *, int ioErr)>;
88
90 std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
91
93
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(
133 const OnSubscribeComplete &onSubAck);
134
154 bool SubscribeToGetNamedShadowAccepted(
158 const OnSubscribeComplete &onSubAck);
159
179 bool SubscribeToShadowDeltaUpdatedEvents(
183 const OnSubscribeComplete &onSubAck);
184
204 bool SubscribeToDeleteShadowAccepted(
208 const OnSubscribeComplete &onSubAck);
209
229 bool SubscribeToUpdateNamedShadowAccepted(
233 const OnSubscribeComplete &onSubAck);
234
254 bool SubscribeToDeleteNamedShadowAccepted(
258 const OnSubscribeComplete &onSubAck);
259
279 bool SubscribeToUpdateShadowAccepted(
283 const OnSubscribeComplete &onSubAck);
284
304 bool SubscribeToUpdateShadowRejected(
308 const OnSubscribeComplete &onSubAck);
309
329 bool SubscribeToDeleteShadowRejected(
333 const OnSubscribeComplete &onSubAck);
334
354 bool SubscribeToUpdateNamedShadowRejected(
358 const OnSubscribeComplete &onSubAck);
359
379 bool SubscribeToNamedShadowUpdatedEvents(
383 const OnSubscribeComplete &onSubAck);
384
404 bool SubscribeToGetShadowAccepted(
408 const OnSubscribeComplete &onSubAck);
409
429 bool SubscribeToShadowUpdatedEvents(
433 const OnSubscribeComplete &onSubAck);
434
454 bool SubscribeToNamedShadowDeltaUpdatedEvents(
458 const OnSubscribeComplete &onSubAck);
459
479 bool SubscribeToGetNamedShadowRejected(
483 const OnSubscribeComplete &onSubAck);
484
504 bool SubscribeToGetShadowRejected(
508 const OnSubscribeComplete &onSubAck);
509
528 bool PublishGetShadow(
531 const OnPublishComplete &onPubAck);
532
551 bool PublishDeleteShadow(
554 const OnPublishComplete &onPubAck);
555
574 bool PublishUpdateShadow(
577 const OnPublishComplete &onPubAck);
578
597 bool PublishDeleteNamedShadow(
600 const OnPublishComplete &onPubAck);
601
620 bool PublishGetNamedShadow(
623 const OnPublishComplete &onPubAck);
624
643 bool PublishUpdateNamedShadow(
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
Definition: DeleteNamedShadowRequest.h:24
Definition: DeleteNamedShadowSubscriptionRequest.h:24
Definition: DeleteShadowRequest.h:24
Definition: DeleteShadowResponse.h:26
Definition: DeleteShadowSubscriptionRequest.h:24
Definition: ErrorResponse.h:26
Definition: GetNamedShadowRequest.h:24
Definition: GetNamedShadowSubscriptionRequest.h:24
Definition: GetShadowRequest.h:24
Definition: GetShadowResponse.h:28
Definition: GetShadowSubscriptionRequest.h:24
Definition: IotShadowClient.h:103
Definition: NamedShadowDeltaUpdatedSubscriptionRequest.h:24
Definition: NamedShadowUpdatedSubscriptionRequest.h:24
Definition: ShadowDeltaUpdatedEvent.h:28
Definition: ShadowDeltaUpdatedSubscriptionRequest.h:24
Definition: ShadowUpdatedEvent.h:27
Definition: ShadowUpdatedSubscriptionRequest.h:24
Definition: UpdateNamedShadowRequest.h:26
Definition: UpdateNamedShadowSubscriptionRequest.h:24
Definition: UpdateShadowRequest.h:26
Definition: UpdateShadowResponse.h:28
Definition: UpdateShadowSubscriptionRequest.h:24
aws_mqtt_qos QOS
Definition: Types.h:42
std::function< void(Aws::Iotshadow::GetShadowResponse *, int ioErr)> OnSubscribeToGetNamedShadowAcceptedResponse
Definition: IotShadowClient.h:51
std::function< void(Aws::Iotshadow::ShadowUpdatedEvent *, int ioErr)> OnSubscribeToNamedShadowUpdatedEventsResponse
Definition: IotShadowClient.h:78
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToDeleteNamedShadowRejectedResponse
Definition: IotShadowClient.h:48
std::function< void(Aws::Iotshadow::ShadowDeltaUpdatedEvent *, int ioErr)> OnSubscribeToShadowDeltaUpdatedEventsResponse
Definition: IotShadowClient.h:54
std::function< void(Aws::Iotshadow::ShadowDeltaUpdatedEvent *, int ioErr)> OnSubscribeToNamedShadowDeltaUpdatedEventsResponse
Definition: IotShadowClient.h:87
std::function< void(Aws::Iotshadow::DeleteShadowResponse *, int ioErr)> OnSubscribeToDeleteNamedShadowAcceptedResponse
Definition: IotShadowClient.h:63
std::function< void(int ioErr)> OnSubscribeComplete
Definition: IotShadowClient.h:44
std::function< void(int ioErr)> OnPublishComplete
Definition: IotShadowClient.h:45
std::function< void(Aws::Iotshadow::GetShadowResponse *, int ioErr)> OnSubscribeToGetShadowAcceptedResponse
Definition: IotShadowClient.h:81
std::function< void(Aws::Iotshadow::DeleteShadowResponse *, int ioErr)> OnSubscribeToDeleteShadowAcceptedResponse
Definition: IotShadowClient.h:57
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToGetShadowRejectedResponse
Definition: IotShadowClient.h:92
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToUpdateNamedShadowRejectedResponse
Definition: IotShadowClient.h:75
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToUpdateShadowRejectedResponse
Definition: IotShadowClient.h:69
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToDeleteShadowRejectedResponse
Definition: IotShadowClient.h:72
std::function< void(Aws::Iotshadow::UpdateShadowResponse *, int ioErr)> OnSubscribeToUpdateNamedShadowAcceptedResponse
Definition: IotShadowClient.h:60
std::function< void(Aws::Iotshadow::UpdateShadowResponse *, int ioErr)> OnSubscribeToUpdateShadowAcceptedResponse
Definition: IotShadowClient.h:66
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToGetNamedShadowRejectedResponse
Definition: IotShadowClient.h:90
std::function< void(Aws::Iotshadow::ShadowUpdatedEvent *, int ioErr)> OnSubscribeToShadowUpdatedEventsResponse
Definition: IotShadowClient.h:84
Definition: Api.h:17
#define AWS_IOTSHADOW_API
Definition: Exports.h:20