AWS IoT Device SDK C++ v2  1.34.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 
11 #include <aws/crt/StlAllocator.h>
12 #include <aws/crt/Types.h>
13 
16 
17 namespace Aws
18 {
19  namespace Iotshadow
20  {
21 
22  class DeleteNamedShadowRequest;
23  class DeleteNamedShadowSubscriptionRequest;
24  class DeleteShadowRequest;
25  class DeleteShadowResponse;
26  class DeleteShadowSubscriptionRequest;
27  class ErrorResponse;
28  class GetNamedShadowRequest;
29  class GetNamedShadowSubscriptionRequest;
30  class GetShadowRequest;
31  class GetShadowResponse;
32  class GetShadowSubscriptionRequest;
33  class NamedShadowDeltaUpdatedSubscriptionRequest;
34  class NamedShadowUpdatedSubscriptionRequest;
35  class ShadowDeltaUpdatedEvent;
36  class ShadowDeltaUpdatedSubscriptionRequest;
37  class ShadowUpdatedEvent;
38  class ShadowUpdatedSubscriptionRequest;
39  class UpdateNamedShadowRequest;
40  class UpdateNamedShadowSubscriptionRequest;
41  class UpdateShadowRequest;
42  class UpdateShadowResponse;
43  class UpdateShadowSubscriptionRequest;
44 
45  using OnSubscribeComplete = std::function<void(int ioErr)>;
46  using OnPublishComplete = std::function<void(int ioErr)>;
47 
49  std::function<void(Aws::Iotshadow::DeleteShadowResponse *, int ioErr)>;
50 
52  std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
53 
55  std::function<void(Aws::Iotshadow::DeleteShadowResponse *, int ioErr)>;
56 
58  std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
59 
61  std::function<void(Aws::Iotshadow::GetShadowResponse *, int ioErr)>;
62 
64  std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
65 
67  std::function<void(Aws::Iotshadow::GetShadowResponse *, int ioErr)>;
68 
69  using OnSubscribeToGetShadowRejectedResponse = std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
70 
72  std::function<void(Aws::Iotshadow::ShadowDeltaUpdatedEvent *, int ioErr)>;
73 
75  std::function<void(Aws::Iotshadow::ShadowUpdatedEvent *, int ioErr)>;
76 
78  std::function<void(Aws::Iotshadow::ShadowDeltaUpdatedEvent *, int ioErr)>;
79 
81  std::function<void(Aws::Iotshadow::ShadowUpdatedEvent *, int ioErr)>;
82 
84  std::function<void(Aws::Iotshadow::UpdateShadowResponse *, int ioErr)>;
85 
87  std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
88 
90  std::function<void(Aws::Iotshadow::UpdateShadowResponse *, int ioErr)>;
91 
93  std::function<void(Aws::Iotshadow::ErrorResponse *, int ioErr)>;
94 
104  {
105  public:
106  IotShadowClient(const std::shared_ptr<Aws::Crt::Mqtt::MqttConnection> &connection);
107  IotShadowClient(const std::shared_ptr<Aws::Crt::Mqtt5::Mqtt5Client> &mqtt5Client);
108 
109  operator bool() const noexcept;
110  int GetLastError() const noexcept;
111 
131  bool SubscribeToDeleteNamedShadowAccepted(
135  const OnSubscribeComplete &onSubAck);
136 
156  bool SubscribeToDeleteNamedShadowRejected(
160  const OnSubscribeComplete &onSubAck);
161 
181  bool SubscribeToDeleteShadowAccepted(
185  const OnSubscribeComplete &onSubAck);
186 
206  bool SubscribeToDeleteShadowRejected(
210  const OnSubscribeComplete &onSubAck);
211 
231  bool SubscribeToGetNamedShadowAccepted(
235  const OnSubscribeComplete &onSubAck);
236 
256  bool SubscribeToGetNamedShadowRejected(
260  const OnSubscribeComplete &onSubAck);
261 
281  bool SubscribeToGetShadowAccepted(
285  const OnSubscribeComplete &onSubAck);
286 
306  bool SubscribeToGetShadowRejected(
310  const OnSubscribeComplete &onSubAck);
311 
331  bool SubscribeToNamedShadowDeltaUpdatedEvents(
335  const OnSubscribeComplete &onSubAck);
336 
356  bool SubscribeToNamedShadowUpdatedEvents(
360  const OnSubscribeComplete &onSubAck);
361 
381  bool SubscribeToShadowDeltaUpdatedEvents(
385  const OnSubscribeComplete &onSubAck);
386 
406  bool SubscribeToShadowUpdatedEvents(
410  const OnSubscribeComplete &onSubAck);
411 
431  bool SubscribeToUpdateNamedShadowAccepted(
435  const OnSubscribeComplete &onSubAck);
436 
456  bool SubscribeToUpdateNamedShadowRejected(
460  const OnSubscribeComplete &onSubAck);
461 
481  bool SubscribeToUpdateShadowAccepted(
485  const OnSubscribeComplete &onSubAck);
486 
506  bool SubscribeToUpdateShadowRejected(
510  const OnSubscribeComplete &onSubAck);
511 
530  bool PublishDeleteNamedShadow(
533  const OnPublishComplete &onPubAck);
534 
553  bool PublishDeleteShadow(
556  const OnPublishComplete &onPubAck);
557 
576  bool PublishGetNamedShadow(
579  const OnPublishComplete &onPubAck);
580 
599  bool PublishGetShadow(
600  const Aws::Iotshadow::GetShadowRequest &request,
602  const OnPublishComplete &onPubAck);
603 
622  bool PublishUpdateNamedShadow(
625  const OnPublishComplete &onPubAck);
626 
645  bool PublishUpdateShadow(
648  const OnPublishComplete &onPubAck);
649 
650  private:
651  std::shared_ptr<Aws::Crt::Mqtt::MqttConnection> m_connection;
652  };
653 
654  } // namespace Iotshadow
655 
656 } // namespace Aws
Aws::Iotshadow::ShadowDeltaUpdatedEvent
Definition: ShadowDeltaUpdatedEvent.h:28
Aws::Iotshadow::ErrorResponse
Definition: ErrorResponse.h:26
Aws::Iotshadow::OnSubscribeToNamedShadowUpdatedEventsResponse
std::function< void(Aws::Iotshadow::ShadowUpdatedEvent *, int ioErr)> OnSubscribeToNamedShadowUpdatedEventsResponse
Definition: IotShadowClient.h:75
Aws::Iotshadow::UpdateNamedShadowSubscriptionRequest
Definition: UpdateNamedShadowSubscriptionRequest.h:24
Aws::Iotshadow::UpdateNamedShadowRequest
Definition: UpdateNamedShadowRequest.h:26
Aws::Iotshadow::OnSubscribeToGetShadowAcceptedResponse
std::function< void(Aws::Iotshadow::GetShadowResponse *, int ioErr)> OnSubscribeToGetShadowAcceptedResponse
Definition: IotShadowClient.h:67
Aws::Iotshadow::OnSubscribeToUpdateNamedShadowAcceptedResponse
std::function< void(Aws::Iotshadow::UpdateShadowResponse *, int ioErr)> OnSubscribeToUpdateNamedShadowAcceptedResponse
Definition: IotShadowClient.h:84
Aws::Iotshadow::OnSubscribeToNamedShadowDeltaUpdatedEventsResponse
std::function< void(Aws::Iotshadow::ShadowDeltaUpdatedEvent *, int ioErr)> OnSubscribeToNamedShadowDeltaUpdatedEventsResponse
Definition: IotShadowClient.h:72
Aws::Iotshadow::OnSubscribeToGetNamedShadowAcceptedResponse
std::function< void(Aws::Iotshadow::GetShadowResponse *, int ioErr)> OnSubscribeToGetNamedShadowAcceptedResponse
Definition: IotShadowClient.h:61
StlAllocator.h
Aws::Iotshadow::ShadowDeltaUpdatedSubscriptionRequest
Definition: ShadowDeltaUpdatedSubscriptionRequest.h:24
Aws::Iotshadow::NamedShadowDeltaUpdatedSubscriptionRequest
Definition: NamedShadowDeltaUpdatedSubscriptionRequest.h:24
Aws::Iotshadow::UpdateShadowSubscriptionRequest
Definition: UpdateShadowSubscriptionRequest.h:24
Aws::Iotshadow::IotShadowClient
Definition: IotShadowClient.h:104
Aws::Iotshadow::OnSubscribeToUpdateShadowAcceptedResponse
std::function< void(Aws::Iotshadow::UpdateShadowResponse *, int ioErr)> OnSubscribeToUpdateShadowAcceptedResponse
Definition: IotShadowClient.h:90
Aws::Iotshadow::DeleteNamedShadowRequest
Definition: DeleteNamedShadowRequest.h:24
Aws::Crt::Mqtt::QOS
aws_mqtt_qos QOS
Definition: Types.h:40
Aws::Iotshadow::UpdateShadowRequest
Definition: UpdateShadowRequest.h:26
Aws::Iotshadow::DeleteNamedShadowSubscriptionRequest
Definition: DeleteNamedShadowSubscriptionRequest.h:24
Mqtt5Client.h
Aws::Iotshadow::NamedShadowUpdatedSubscriptionRequest
Definition: NamedShadowUpdatedSubscriptionRequest.h:24
Aws::Iotshadow::GetNamedShadowSubscriptionRequest
Definition: GetNamedShadowSubscriptionRequest.h:24
Aws::Iotshadow::DeleteShadowRequest
Definition: DeleteShadowRequest.h:24
Aws::Iotshadow::OnSubscribeToDeleteShadowAcceptedResponse
std::function< void(Aws::Iotshadow::DeleteShadowResponse *, int ioErr)> OnSubscribeToDeleteShadowAcceptedResponse
Definition: IotShadowClient.h:55
Aws::Iotshadow::ShadowUpdatedEvent
Definition: ShadowUpdatedEvent.h:27
Aws::Iotshadow::ShadowUpdatedSubscriptionRequest
Definition: ShadowUpdatedSubscriptionRequest.h:24
Aws::Iotshadow::OnSubscribeToGetShadowRejectedResponse
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToGetShadowRejectedResponse
Definition: IotShadowClient.h:69
Aws::Iotshadow::OnSubscribeToDeleteNamedShadowRejectedResponse
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToDeleteNamedShadowRejectedResponse
Definition: IotShadowClient.h:52
Exports.h
Types.h
Aws::Iotshadow::OnPublishComplete
std::function< void(int ioErr)> OnPublishComplete
Definition: IotShadowClient.h:46
Aws::Iotshadow::OnSubscribeToGetNamedShadowRejectedResponse
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToGetNamedShadowRejectedResponse
Definition: IotShadowClient.h:64
Aws::Iotshadow::GetShadowResponse
Definition: GetShadowResponse.h:28
Aws::Iotshadow::OnSubscribeToUpdateShadowRejectedResponse
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToUpdateShadowRejectedResponse
Definition: IotShadowClient.h:93
Aws::Iotshadow::GetShadowSubscriptionRequest
Definition: GetShadowSubscriptionRequest.h:24
Aws::Iotshadow::UpdateShadowResponse
Definition: UpdateShadowResponse.h:28
Aws
Definition: Allocator.h:11
Aws::Iotshadow::GetNamedShadowRequest
Definition: GetNamedShadowRequest.h:24
Aws::Iotshadow::GetShadowRequest
Definition: GetShadowRequest.h:24
Aws::Iotshadow::OnSubscribeToShadowDeltaUpdatedEventsResponse
std::function< void(Aws::Iotshadow::ShadowDeltaUpdatedEvent *, int ioErr)> OnSubscribeToShadowDeltaUpdatedEventsResponse
Definition: IotShadowClient.h:78
Aws::Iotshadow::OnSubscribeToDeleteShadowRejectedResponse
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToDeleteShadowRejectedResponse
Definition: IotShadowClient.h:58
Aws::Iotshadow::DeleteShadowResponse
Definition: DeleteShadowResponse.h:26
Aws::Iotshadow::OnSubscribeToDeleteNamedShadowAcceptedResponse
std::function< void(Aws::Iotshadow::DeleteShadowResponse *, int ioErr)> OnSubscribeToDeleteNamedShadowAcceptedResponse
Definition: IotShadowClient.h:49
MqttClient.h
Aws::Iotshadow::OnSubscribeToUpdateNamedShadowRejectedResponse
std::function< void(Aws::Iotshadow::ErrorResponse *, int ioErr)> OnSubscribeToUpdateNamedShadowRejectedResponse
Definition: IotShadowClient.h:87
Aws::Iotshadow::OnSubscribeToShadowUpdatedEventsResponse
std::function< void(Aws::Iotshadow::ShadowUpdatedEvent *, int ioErr)> OnSubscribeToShadowUpdatedEventsResponse
Definition: IotShadowClient.h:81
Aws::Iotshadow::DeleteShadowSubscriptionRequest
Definition: DeleteShadowSubscriptionRequest.h:24
AWS_IOTSHADOW_API
#define AWS_IOTSHADOW_API
Definition: Exports.h:20
Aws::Iotshadow::OnSubscribeComplete
std::function< void(int ioErr)> OnSubscribeComplete
Definition: IotShadowClient.h:45