AWS IoT Device SDK C++ v2
1.34.0
AWS IoT Device SDK C++ v2
|
Go to the documentation of this file.
15 #include <aws/mqtt/client.h>
16 #include <aws/mqtt/v5/mqtt5_client.h>
33 class Mqtt5ClientCore;
39 class MqttConnectionCore;
137 std::function<void(
const std::shared_ptr<Http::HttpRequest> &,
int errorCode)>;
160 friend class Mqtt5::Mqtt5ClientCore;
175 static std::shared_ptr<Crt::Mqtt::MqttConnection> NewConnectionFromMqtt5Client(
176 std::shared_ptr<Mqtt5::Mqtt5Client> mqtt5client) noexcept;
181 operator bool() const noexcept;
196 bool SetWill(const
char *topic,
QOS qos,
bool retain, const
ByteBuf &payload) noexcept;
205 bool SetLogin(const
char *username, const
char *password) noexcept;
210 bool SetWebsocketProxyOptions(const Http::HttpClientConnectionProxyOptions &proxyOptions) noexcept;
221 bool SetHttpProxyOptions(const Http::HttpClientConnectionProxyOptions &proxyOptions) noexcept;
234 bool SetReconnectTimeout(uint64_t min_seconds, uint64_t max_seconds) noexcept;
253 const
char *clientId,
255 uint16_t keepAliveTimeSecs = 0,
256 uint32_t pingTimeoutMs = 0,
257 uint32_t protocolOperationTimeoutMs = 0) noexcept;
263 bool Disconnect() noexcept;
266 aws_mqtt_client_connection *GetUnderlyingConnection() noexcept;
281 const
char *topicFilter,
290 const
char *topicFilter,
440 aws_mqtt_client *client,
452 aws_mqtt5_client *mqtt5Client,
458 std::shared_ptr<MqttConnectionCore> m_connectionCore;
std::function< void(MqttConnection &connection, OnConnectionFailureData *callbackData)> OnConnectionFailureHandler
Definition: MqttConnection.h:119
MqttConnection(const MqttConnection &)=delete
Definition: MqttTypes.h:28
AWS_CRT_CPP_API int LastError() noexcept
Definition: Api.cpp:422
std::function< void(const std::shared_ptr< Http::HttpRequest > &, int errorCode)> OnWebSocketHandshakeInterceptComplete
Definition: MqttConnection.h:137
std::function< void(SecureTunnel *secureTunnel, int errorCode)> OnConnectionFailure
Definition: SecureTunnel.h:509
std::function< void(MqttConnection &connection, uint16_t packetId, const String &topic, QOS qos, int errorCode)> OnSubAckHandler
Definition: MqttTypes.h:68
Definition: MqttConnection.h:71
std::function< void(MqttConnection &connection, OnConnectionSuccessData *callbackData)> OnConnectionSuccessHandler
Definition: MqttConnection.h:111
int error
Definition: MqttConnection.h:76
Definition: MqttConnection.h:158
ReturnCode returnCode
Definition: MqttConnection.h:58
aws_mqtt_qos QOS
Definition: Types.h:40
MqttConnection(MqttConnection &&)=delete
std::function< void(MqttConnection &connection, uint16_t packetId, const Vector< String > &topics, QOS qos, int errorCode)> OnMultiSubAckHandler
Definition: MqttTypes.h:84
MqttConnection & operator=(MqttConnection &&)=delete
std::function< void(SecureTunnel *secureTunnel, const ConnectionSuccessEventData &)> OnConnectionSuccess
Definition: SecureTunnel.h:503
bool sessionPresent
Definition: MqttConnection.h:64
std::function< void(MqttConnection &connection, uint16_t packetId, int errorCode)> OnOperationCompleteHandler
Definition: MqttTypes.h:97
std::function< void(MqttConnection &connection, ReturnCode connectCode, bool sessionPresent)> OnConnectionResumedHandler
Definition: MqttConnection.h:88
aws_mqtt_connect_return_code ReturnCode
Definition: Types.h:41
Definition: MqttTypes.h:103
std::vector< T, StlAllocator< T > > Vector
Definition: Types.h:53
std::function< void(MqttConnection &connection, OnConnectionClosedData *callbackData)> OnConnectionClosedHandler
Definition: MqttConnection.h:103
aws_byte_buf ByteBuf
Definition: Types.h:30
Definition: StringView.h:852
#define AWS_CRT_CPP_API
Definition: Exports.h:37
Definition: Allocator.h:11
std::function< void(std::shared_ptr< Http::HttpRequest > req, const OnWebSocketHandshakeInterceptComplete &onComplete)> OnWebSocketHandshakeIntercept
Definition: MqttConnection.h:146
Definition: MqttConnection.h:47
std::function< void(MqttConnection &connection)> OnDisconnectHandler
Definition: MqttConnection.h:124
std::function< void(MqttConnection &connection, const String &topic, const ByteBuf &payload, bool dup, QOS qos, bool retain)> OnMessageReceivedHandler
Definition: MqttTypes.h:56
Definition: MqttClient.h:48
std::basic_string< char, std::char_traits< char >, StlAllocator< char > > String
Definition: Types.h:45
MqttConnection & operator=(const MqttConnection &)=delete
Definition: MqttConnection.h:54
std::function< void(MqttConnection &connection, const String &topic, const ByteBuf &payload)> OnPublishReceivedHandler
Definition: MqttConnection.h:130
std::function< void(MqttConnection &connection, int error)> OnConnectionInterruptedHandler
Definition: MqttConnection.h:82
std::function< void(MqttConnection &connection, int errorCode, ReturnCode returnCode, bool sessionPresent)> OnConnectionCompletedHandler
Definition: MqttConnection.h:94