Paho Asynchronous MQTT C Client Library
MQTTAsync.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2009, 2022 IBM Corp., Ian Craggs and others
3  *
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v2.0
6  * and Eclipse Distribution License v1.0 which accompany this distribution.
7  *
8  * The Eclipse Public License is available at
9  * https://www.eclipse.org/legal/epl-2.0/
10  * and the Eclipse Distribution License is available at
11  * http://www.eclipse.org/org/documents/edl-v10.php.
12  *
13  * Contributors:
14  * Ian Craggs - initial API and implementation
15  * Ian Craggs, Allan Stockdill-Mander - SSL connections
16  * Ian Craggs - multiple server connection support
17  * Ian Craggs - MQTT 3.1.1 support
18  * Ian Craggs - fix for bug 444103 - success/failure callbacks not invoked
19  * Ian Craggs - automatic reconnect and offline buffering (send while disconnected)
20  * Ian Craggs - binary will message
21  * Ian Craggs - binary password
22  * Ian Craggs - remove const on eyecatchers #168
23  * Ian Craggs - MQTT 5.0
24  *******************************************************************************/
25 
26 /********************************************************************/
27 
85 /*
87 */
88 #if !defined(MQTTASYNC_H)
89 #define MQTTASYNC_H
90 
91 #if defined(__cplusplus)
92  extern "C" {
93 #endif
94 
95 #include <stdio.h>
96 /*
98 */
99 
100 #include "MQTTExportDeclarations.h"
101 
102 #include "MQTTProperties.h"
103 #include "MQTTReasonCodes.h"
104 #include "MQTTSubscribeOpts.h"
105 #if !defined(NO_PERSISTENCE)
106 #include "MQTTClientPersistence.h"
107 #endif
108 
113 #define MQTTASYNC_SUCCESS 0
118 #define MQTTASYNC_FAILURE -1
119 
120 /* error code -2 is MQTTAsync_PERSISTENCE_ERROR */
121 
122 #define MQTTASYNC_PERSISTENCE_ERROR -2
123 
127 #define MQTTASYNC_DISCONNECTED -3
132 #define MQTTASYNC_MAX_MESSAGES_INFLIGHT -4
136 #define MQTTASYNC_BAD_UTF8_STRING -5
140 #define MQTTASYNC_NULL_PARAMETER -6
146 #define MQTTASYNC_TOPICNAME_TRUNCATED -7
151 #define MQTTASYNC_BAD_STRUCTURE -8
155 #define MQTTASYNC_BAD_QOS -9
159 #define MQTTASYNC_NO_MORE_MSGIDS -10
163 #define MQTTASYNC_OPERATION_INCOMPLETE -11
167 #define MQTTASYNC_MAX_BUFFERED_MESSAGES -12
171 #define MQTTASYNC_SSL_NOT_SUPPORTED -13
182 #define MQTTASYNC_BAD_PROTOCOL -14
186 #define MQTTASYNC_BAD_MQTT_OPTION -15
190 #define MQTTASYNC_WRONG_MQTT_VERSION -16
194 #define MQTTASYNC_0_LEN_WILL_TOPIC -17
195 /*
196  * Return code: connect or disconnect command ignored because there is already a connect or disconnect
197  * command at the head of the list waiting to be processed. Use the onSuccess/onFailure callbacks to wait
198  * for the previous connect or disconnect command to be complete.
199  */
200 #define MQTTASYNC_COMMAND_IGNORED -18
201  /*
202  * Return code: maxBufferedMessages in the connect options must be >= 0
203  */
204  #define MQTTASYNC_MAX_BUFFERED -19
205 
209 #define MQTTVERSION_DEFAULT 0
213 #define MQTTVERSION_3_1 3
217 #define MQTTVERSION_3_1_1 4
221 #define MQTTVERSION_5 5
225 #define MQTT_BAD_SUBSCRIBE 0x80
226 
227 
231 typedef struct
232 {
234  char struct_id[4];
240 
241 #define MQTTAsync_init_options_initializer { {'M', 'Q', 'T', 'G'}, 0, 0 }
242 
248 
253 typedef void* MQTTAsync;
263 typedef int MQTTAsync_token;
264 
271 typedef struct
272 {
274  char struct_id[4];
281  void* payload;
295  int qos;
314  int retained;
321  int dup;
327  int msgid;
333 
334 #define MQTTAsync_message_initializer { {'M', 'Q', 'T', 'M'}, 1, 0, NULL, 0, 0, 0, 0, MQTTProperties_initializer }
335 
369 typedef int MQTTAsync_messageArrived(void* context, char* topicName, int topicLen, MQTTAsync_message* message);
370 
392 typedef void MQTTAsync_deliveryComplete(void* context, MQTTAsync_token token);
393 
412 typedef void MQTTAsync_connectionLost(void* context, char* cause);
413 
414 
430 typedef void MQTTAsync_connected(void* context, char* cause);
431 
444 typedef void MQTTAsync_disconnected(void* context, MQTTProperties* properties,
445  enum MQTTReasonCodes reasonCode);
446 
462 LIBMQTT_API int MQTTAsync_setDisconnected(MQTTAsync handle, void* context, MQTTAsync_disconnected* co);
463 
465 typedef struct
466 {
468  char struct_id[4];
477  const char* username;
483  struct {
484  int len;
485  const void* data;
486  } binarypwd;
488 
489 #define MQTTAsync_connectData_initializer {{'M', 'Q', 'C', 'D'}, 0, NULL, {0, NULL}}
490 
497 typedef int MQTTAsync_updateConnectOptions(void* context, MQTTAsync_connectData* data);
498 
509 
520 
521 
531 LIBMQTT_API int MQTTAsync_setAfterPersistenceRead(MQTTAsync handle, void* context, MQTTPersistence_afterRead* co);
532 
533 
535 typedef struct
536 {
540  int code;
542  const char *message;
544 
545 
547 typedef struct
548 {
550  char struct_id[4];
556  enum MQTTReasonCodes reasonCode;
560  int code;
562  const char *message;
566 
567 #define MQTTAsync_failureData5_initializer {{'M', 'Q', 'F', 'D'}, 0, 0, MQTTREASONCODE_SUCCESS, MQTTProperties_initializer, 0, NULL, 0}
568 
570 typedef struct
571 {
575  union
576  {
579  int qos;
582  int* qosList;
584  struct
585  {
588  } pub;
589  /* For connect, the server connected to, MQTT version used, and sessionPresent flag */
590  struct
591  {
592  char* serverURI;
595  } connect;
596  } alt;
598 
599 
601 typedef struct
602 {
603  char struct_id[4];
607  enum MQTTReasonCodes reasonCode;
610  union
611  {
613  struct
614  {
617  } sub;
619  struct
620  {
623  } pub;
624  /* For connect, the server connected to, MQTT version used, and sessionPresent flag */
625  struct
626  {
627  char* serverURI;
630  } connect;
632  struct
633  {
634  int reasonCodeCount;
635  enum MQTTReasonCodes* reasonCodes;
636  } unsub;
637  } alt;
639 
640 #define MQTTAsync_successData5_initializer {{'M', 'Q', 'S', 'D'}, 0, 0, MQTTREASONCODE_SUCCESS, MQTTProperties_initializer, {.sub={0,0}}}
641 
655 typedef void MQTTAsync_onSuccess(void* context, MQTTAsync_successData* response);
656 
671 typedef void MQTTAsync_onSuccess5(void* context, MQTTAsync_successData5* response);
672 
686 typedef void MQTTAsync_onFailure(void* context, MQTTAsync_failureData* response);
687 
701 typedef void MQTTAsync_onFailure5(void* context, MQTTAsync_failureData5* response);
702 
709 {
711  char struct_id[4];
732  void* context;
756  /*
757  * MQTT V5 subscribe options, when used with subscribe only.
758  */
760  /*
761  * MQTT V5 subscribe option count, when used with subscribeMany only.
762  * The number of entries in the subscribe_options_list array.
763  */
765  /*
766  * MQTT V5 subscribe option array, when used with subscribeMany only.
767  */
770 
771 #define MQTTAsync_responseOptions_initializer { {'M', 'Q', 'T', 'R'}, 1, NULL, NULL, 0, 0, NULL, NULL, MQTTProperties_initializer, MQTTSubscribe_options_initializer, 0, NULL}
772 
775 #define MQTTAsync_callOptions_initializer MQTTAsync_responseOptions_initializer
776 
808 
831 
855 
877 
890 LIBMQTT_API int MQTTAsync_setConnected(MQTTAsync handle, void* context, MQTTAsync_connected* co);
891 
892 
901 LIBMQTT_API int MQTTAsync_reconnect(MQTTAsync handle);
902 
903 
956 LIBMQTT_API int MQTTAsync_create(MQTTAsync* handle, const char* serverURI, const char* clientId,
957  int persistence_type, void* persistence_context);
958 
960 typedef struct
961 {
963  char struct_id[4];
986  /*
987  * When the maximum number of buffered messages is reached, delete the oldest rather than the newest.
988  */
990  /*
991  * Restore messages from persistence on create - or clear it.
992  */
994  /*
995  * Persist QoS0 publish commands - an option to not persist them.
996  */
999 
1000 #define MQTTAsync_createOptions_initializer { {'M', 'Q', 'C', 'O'}, 2, 0, 100, MQTTVERSION_DEFAULT, 0, 0, 1, 1}
1001 
1002 #define MQTTAsync_createOptions_initializer5 { {'M', 'Q', 'C', 'O'}, 2, 0, 100, MQTTVERSION_5, 0, 0, 1, 1}
1003 
1004 
1005 LIBMQTT_API int MQTTAsync_createWithOptions(MQTTAsync* handle, const char* serverURI, const char* clientId,
1006  int persistence_type, void* persistence_context, MQTTAsync_createOptions* options);
1007 
1020 typedef struct
1021 {
1023  char struct_id[4];
1029  const char* topicName;
1031  const char* message;
1040  int qos;
1042  struct
1043  {
1044  int len;
1045  const void* data;
1046  } payload;
1048 
1049 #define MQTTAsync_willOptions_initializer { {'M', 'Q', 'T', 'W'}, 1, NULL, NULL, 0, 0, { 0, NULL } }
1050 
1051 #define MQTT_SSL_VERSION_DEFAULT 0
1052 #define MQTT_SSL_VERSION_TLS_1_0 1
1053 #define MQTT_SSL_VERSION_TLS_1_1 2
1054 #define MQTT_SSL_VERSION_TLS_1_2 3
1055 
1068 typedef struct
1069 {
1071  char struct_id[4];
1072 
1081 
1083  const char* trustStore;
1084 
1088  const char* keyStore;
1089 
1093  const char* privateKey;
1094 
1096  const char* privateKeyPassword;
1097 
1106  const char* enabledCipherSuites;
1107 
1110 
1116 
1122  int verify;
1123 
1129  const char* CApath;
1130 
1135  int (*ssl_error_cb) (const char *str, size_t len, void *u);
1136 
1142 
1148  unsigned int (*ssl_psk_cb) (const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len, void *u);
1149 
1155 
1162 
1170  const unsigned char *protos;
1171 
1176  unsigned int protos_len;
1178 
1179 #define MQTTAsync_SSLOptions_initializer { {'M', 'Q', 'T', 'S'}, 5, NULL, NULL, NULL, NULL, NULL, 1, MQTT_SSL_VERSION_DEFAULT, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0 }
1180 
1182 typedef struct
1183 {
1184  const char* name;
1185  const char* value;
1187 
1198 typedef struct
1199 {
1201  char struct_id[4];
1261  const char* username;
1267  const char* password;
1302  void* context;
1318  char* const* serverURIs;
1341  struct {
1342  int len;
1343  const void* data;
1344  } binarypwd;
1345  /*
1346  * MQTT V5 clean start flag. Only clears state at the beginning of the session.
1347  */
1376  const char* httpProxy;
1380  const char* httpsProxy;
1382 
1384 #define MQTTAsync_connectOptions_initializer { {'M', 'Q', 'T', 'C'}, 8, 60, 1, 65535, NULL, NULL, NULL, 30, 0,\
1385 NULL, NULL, NULL, NULL, 0, NULL, MQTTVERSION_DEFAULT, 0, 1, 60, {0, NULL}, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
1386 
1388 #define MQTTAsync_connectOptions_initializer5 { {'M', 'Q', 'T', 'C'}, 8, 60, 0, 65535, NULL, NULL, NULL, 30, 0,\
1389 NULL, NULL, NULL, NULL, 0, NULL, MQTTVERSION_5, 0, 1, 60, {0, NULL}, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
1390 
1394 #define MQTTAsync_connectOptions_initializer_ws { {'M', 'Q', 'T', 'C'}, 8, 45, 1, 65535, NULL, NULL, NULL, 30, 0,\
1395 NULL, NULL, NULL, NULL, 0, NULL, MQTTVERSION_DEFAULT, 0, 1, 60, {0, NULL}, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
1396 
1400 #define MQTTAsync_connectOptions_initializer5_ws { {'M', 'Q', 'T', 'C'}, 8, 45, 0, 65535, NULL, NULL, NULL, 30, 0,\
1401 NULL, NULL, NULL, NULL, 0, NULL, MQTTVERSION_5, 0, 1, 60, {0, NULL}, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
1402 
1403 
1424 LIBMQTT_API int MQTTAsync_connect(MQTTAsync handle, const MQTTAsync_connectOptions* options);
1425 
1427 typedef struct
1428 {
1430  char struct_id[4];
1437  int timeout;
1455  void* context;
1463  enum MQTTReasonCodes reasonCode;
1477 
1478 #define MQTTAsync_disconnectOptions_initializer { {'M', 'Q', 'T', 'D'}, 0, 0, NULL, NULL, NULL,\
1479  MQTTProperties_initializer, MQTTREASONCODE_SUCCESS, NULL, NULL }
1480 
1481 #define MQTTAsync_disconnectOptions_initializer5 { {'M', 'Q', 'T', 'D'}, 1, 0, NULL, NULL, NULL,\
1482  MQTTProperties_initializer, MQTTREASONCODE_SUCCESS, NULL, NULL }
1483 
1502 LIBMQTT_API int MQTTAsync_disconnect(MQTTAsync handle, const MQTTAsync_disconnectOptions* options);
1503 
1504 
1512 LIBMQTT_API int MQTTAsync_isConnected(MQTTAsync handle);
1513 
1514 
1529 LIBMQTT_API int MQTTAsync_subscribe(MQTTAsync handle, const char* topic, int qos, MQTTAsync_responseOptions* response);
1530 
1531 
1549 LIBMQTT_API int MQTTAsync_subscribeMany(MQTTAsync handle, int count, char* const* topic, const int* qos, MQTTAsync_responseOptions* response);
1550 
1563 LIBMQTT_API int MQTTAsync_unsubscribe(MQTTAsync handle, const char* topic, MQTTAsync_responseOptions* response);
1564 
1577 LIBMQTT_API int MQTTAsync_unsubscribeMany(MQTTAsync handle, int count, char* const* topic, MQTTAsync_responseOptions* response);
1578 
1579 
1599 LIBMQTT_API int MQTTAsync_send(MQTTAsync handle, const char* destinationName, int payloadlen, const void* payload, int qos,
1600  int retained, MQTTAsync_responseOptions* response);
1601 
1618 LIBMQTT_API int MQTTAsync_sendMessage(MQTTAsync handle, const char* destinationName, const MQTTAsync_message* msg, MQTTAsync_responseOptions* response);
1619 
1620 
1639 LIBMQTT_API int MQTTAsync_getPendingTokens(MQTTAsync handle, MQTTAsync_token **tokens);
1640 
1649 #define MQTTASYNC_TRUE 1
1650 LIBMQTT_API int MQTTAsync_isComplete(MQTTAsync handle, MQTTAsync_token token);
1651 
1652 
1665 LIBMQTT_API int MQTTAsync_waitForCompletion(MQTTAsync handle, MQTTAsync_token token, unsigned long timeout);
1666 
1667 
1679 
1688 LIBMQTT_API void MQTTAsync_free(void* ptr);
1689 
1697 LIBMQTT_API void* MQTTAsync_malloc(size_t size);
1698 
1706 LIBMQTT_API void MQTTAsync_destroy(MQTTAsync* handle);
1707 
1708 
1709 
1711 {
1719 };
1720 
1721 
1728 
1729 
1739 typedef void MQTTAsync_traceCallback(enum MQTTASYNC_TRACE_LEVELS level, char* message);
1740 
1748 
1756 
1763 LIBMQTT_API const char* MQTTAsync_strerror(int code);
1764 
1765 
2379 #if defined(__cplusplus)
2380  }
2381 #endif
2382 
2383 #endif
int MQTTAsync_connect(MQTTAsync handle, const MQTTAsync_connectOptions *options)
int MQTTAsync_unsubscribe(MQTTAsync handle, const char *topic, MQTTAsync_responseOptions *response)
void MQTTAsync_setTraceCallback(MQTTAsync_traceCallback *callback)
void * MQTTAsync
Definition: MQTTAsync.h:253
int MQTTAsync_setBeforePersistenceWrite(MQTTAsync handle, void *context, MQTTPersistence_beforeWrite *co)
void MQTTAsync_global_init(MQTTAsync_init_options *inits)
int MQTTAsync_setConnected(MQTTAsync handle, void *context, MQTTAsync_connected *co)
void MQTTAsync_free(void *ptr)
void MQTTAsync_connected(void *context, char *cause)
Definition: MQTTAsync.h:430
void MQTTAsync_connectionLost(void *context, char *cause)
Definition: MQTTAsync.h:412
int MQTTAsync_messageArrived(void *context, char *topicName, int topicLen, MQTTAsync_message *message)
Definition: MQTTAsync.h:369
int MQTTAsync_setMessageArrivedCallback(MQTTAsync handle, void *context, MQTTAsync_messageArrived *ma)
int MQTTAsync_isConnected(MQTTAsync handle)
int MQTTAsync_waitForCompletion(MQTTAsync handle, MQTTAsync_token token, unsigned long timeout)
void MQTTAsync_disconnected(void *context, MQTTProperties *properties, enum MQTTReasonCodes reasonCode)
Definition: MQTTAsync.h:444
int MQTTAsync_create(MQTTAsync *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context)
int MQTTAsync_sendMessage(MQTTAsync handle, const char *destinationName, const MQTTAsync_message *msg, MQTTAsync_responseOptions *response)
MQTTASYNC_TRACE_LEVELS
Definition: MQTTAsync.h:1711
@ MQTTASYNC_TRACE_FATAL
Definition: MQTTAsync.h:1718
@ MQTTASYNC_TRACE_MEDIUM
Definition: MQTTAsync.h:1713
@ MQTTASYNC_TRACE_SEVERE
Definition: MQTTAsync.h:1717
@ MQTTASYNC_TRACE_PROTOCOL
Definition: MQTTAsync.h:1715
@ MQTTASYNC_TRACE_MINIMUM
Definition: MQTTAsync.h:1714
@ MQTTASYNC_TRACE_ERROR
Definition: MQTTAsync.h:1716
@ MQTTASYNC_TRACE_MAXIMUM
Definition: MQTTAsync.h:1712
int MQTTAsync_updateConnectOptions(void *context, MQTTAsync_connectData *data)
Definition: MQTTAsync.h:497
void MQTTAsync_onFailure(void *context, MQTTAsync_failureData *response)
Definition: MQTTAsync.h:686
int MQTTAsync_send(MQTTAsync handle, const char *destinationName, int payloadlen, const void *payload, int qos, int retained, MQTTAsync_responseOptions *response)
void MQTTAsync_traceCallback(enum MQTTASYNC_TRACE_LEVELS level, char *message)
Definition: MQTTAsync.h:1739
int MQTTAsync_unsubscribeMany(MQTTAsync handle, int count, char *const *topic, MQTTAsync_responseOptions *response)
int MQTTAsync_createWithOptions(MQTTAsync *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context, MQTTAsync_createOptions *options)
void MQTTAsync_onSuccess(void *context, MQTTAsync_successData *response)
Definition: MQTTAsync.h:655
int MQTTAsync_token
Definition: MQTTAsync.h:263
MQTTAsync_nameValue * MQTTAsync_getVersionInfo(void)
const char * MQTTAsync_strerror(int code)
void MQTTAsync_onSuccess5(void *context, MQTTAsync_successData5 *response)
Definition: MQTTAsync.h:671
void MQTTAsync_onFailure5(void *context, MQTTAsync_failureData5 *response)
Definition: MQTTAsync.h:701
int MQTTAsync_setDeliveryCompleteCallback(MQTTAsync handle, void *context, MQTTAsync_deliveryComplete *dc)
void MQTTAsync_freeMessage(MQTTAsync_message **msg)
int MQTTAsync_setUpdateConnectOptions(MQTTAsync handle, void *context, MQTTAsync_updateConnectOptions *co)
void MQTTAsync_deliveryComplete(void *context, MQTTAsync_token token)
Definition: MQTTAsync.h:392
int MQTTAsync_isComplete(MQTTAsync handle, MQTTAsync_token token)
int MQTTAsync_setAfterPersistenceRead(MQTTAsync handle, void *context, MQTTPersistence_afterRead *co)
int MQTTAsync_getPendingTokens(MQTTAsync handle, MQTTAsync_token **tokens)
int MQTTAsync_reconnect(MQTTAsync handle)
int MQTTAsync_subscribeMany(MQTTAsync handle, int count, char *const *topic, const int *qos, MQTTAsync_responseOptions *response)
void MQTTAsync_setTraceLevel(enum MQTTASYNC_TRACE_LEVELS level)
void MQTTAsync_destroy(MQTTAsync *handle)
int MQTTAsync_setDisconnected(MQTTAsync handle, void *context, MQTTAsync_disconnected *co)
int MQTTAsync_disconnect(MQTTAsync handle, const MQTTAsync_disconnectOptions *options)
int MQTTAsync_subscribe(MQTTAsync handle, const char *topic, int qos, MQTTAsync_responseOptions *response)
struct MQTTAsync_responseOptions MQTTAsync_responseOptions
int MQTTAsync_setCallbacks(MQTTAsync handle, void *context, MQTTAsync_connectionLost *cl, MQTTAsync_messageArrived *ma, MQTTAsync_deliveryComplete *dc)
int MQTTAsync_setConnectionLostCallback(MQTTAsync handle, void *context, MQTTAsync_connectionLost *cl)
void * MQTTAsync_malloc(size_t size)
This structure represents a persistent data store, used to store outbound and inbound messages,...
int MQTTPersistence_beforeWrite(void *context, int bufcount, char *buffers[], int buflens[])
Definition: MQTTClientPersistence.h:264
int MQTTPersistence_afterRead(void *context, char **buffer, int *buflen)
Definition: MQTTClientPersistence.h:275
MQTTReasonCodes
Definition: MQTTReasonCodes.h:23
Definition: MQTTAsync.h:1069
const char * trustStore
Definition: MQTTAsync.h:1083
int struct_version
Definition: MQTTAsync.h:1080
int disableDefaultTrustStore
Definition: MQTTAsync.h:1161
void * ssl_error_context
Definition: MQTTAsync.h:1141
unsigned int protos_len
Definition: MQTTAsync.h:1176
const char * CApath
Definition: MQTTAsync.h:1129
const char * keyStore
Definition: MQTTAsync.h:1088
int sslVersion
Definition: MQTTAsync.h:1115
const unsigned char * protos
Definition: MQTTAsync.h:1170
int enableServerCertAuth
Definition: MQTTAsync.h:1109
const char * privateKey
Definition: MQTTAsync.h:1093
int verify
Definition: MQTTAsync.h:1122
const char * enabledCipherSuites
Definition: MQTTAsync.h:1106
void * ssl_psk_context
Definition: MQTTAsync.h:1154
const char * privateKeyPassword
Definition: MQTTAsync.h:1096
Definition: MQTTAsync.h:466
int struct_version
Definition: MQTTAsync.h:470
const void * data
Definition: MQTTAsync.h:485
const char * username
Definition: MQTTAsync.h:477
int len
Definition: MQTTAsync.h:484
Definition: MQTTAsync.h:1199
int maxRetryInterval
Definition: MQTTAsync.h:1337
int cleansession
Definition: MQTTAsync.h:1245
int struct_version
Definition: MQTTAsync.h:1212
MQTTAsync_onFailure * onFailure
Definition: MQTTAsync.h:1296
const void * data
Definition: MQTTAsync.h:1343
int MQTTVersion
Definition: MQTTAsync.h:1325
int minRetryInterval
Definition: MQTTAsync.h:1333
MQTTAsync_onSuccess5 * onSuccess5
Definition: MQTTAsync.h:1362
const char * httpsProxy
Definition: MQTTAsync.h:1380
int connectTimeout
Definition: MQTTAsync.h:1271
MQTTAsync_onFailure5 * onFailure5
Definition: MQTTAsync.h:1368
int maxInflight
Definition: MQTTAsync.h:1249
int automaticReconnect
Definition: MQTTAsync.h:1329
MQTTAsync_willOptions * will
Definition: MQTTAsync.h:1255
MQTTAsync_SSLOptions * ssl
Definition: MQTTAsync.h:1284
MQTTProperties * connectProperties
Definition: MQTTAsync.h:1352
const char * password
Definition: MQTTAsync.h:1267
int serverURIcount
Definition: MQTTAsync.h:1306
char *const * serverURIs
Definition: MQTTAsync.h:1318
const char * username
Definition: MQTTAsync.h:1261
MQTTAsync_onSuccess * onSuccess
Definition: MQTTAsync.h:1290
MQTTProperties * willProperties
Definition: MQTTAsync.h:1356
const MQTTAsync_nameValue * httpHeaders
Definition: MQTTAsync.h:1372
int retryInterval
Definition: MQTTAsync.h:1279
int keepAliveInterval
Definition: MQTTAsync.h:1223
int cleanstart
Definition: MQTTAsync.h:1348
const char * httpProxy
Definition: MQTTAsync.h:1376
void * context
Definition: MQTTAsync.h:1302
int len
Definition: MQTTAsync.h:1342
Definition: MQTTAsync.h:961
int struct_version
Definition: MQTTAsync.h:969
int sendWhileDisconnected
Definition: MQTTAsync.h:971
int persistQoS0
Definition: MQTTAsync.h:997
int MQTTVersion
Definition: MQTTAsync.h:981
int restoreMessages
Definition: MQTTAsync.h:993
int maxBufferedMessages
Definition: MQTTAsync.h:975
int deleteOldestMessages
Definition: MQTTAsync.h:989
int allowDisconnectedSendAtAnyTime
Definition: MQTTAsync.h:985
Definition: MQTTAsync.h:1428
int struct_version
Definition: MQTTAsync.h:1432
MQTTAsync_onFailure * onFailure
Definition: MQTTAsync.h:1449
MQTTProperties properties
Definition: MQTTAsync.h:1459
MQTTAsync_onSuccess5 * onSuccess5
Definition: MQTTAsync.h:1469
int timeout
Definition: MQTTAsync.h:1437
MQTTAsync_onFailure5 * onFailure5
Definition: MQTTAsync.h:1475
MQTTAsync_onSuccess * onSuccess
Definition: MQTTAsync.h:1443
void * context
Definition: MQTTAsync.h:1455
Definition: MQTTAsync.h:548
int struct_version
Definition: MQTTAsync.h:552
MQTTProperties properties
Definition: MQTTAsync.h:558
const char * message
Definition: MQTTAsync.h:562
int packet_type
Definition: MQTTAsync.h:564
int code
Definition: MQTTAsync.h:560
Definition: MQTTAsync.h:536
const char * message
Definition: MQTTAsync.h:542
int code
Definition: MQTTAsync.h:540
MQTTAsync_token token
Definition: MQTTAsync.h:538
Definition: MQTTAsync.h:232
int struct_version
Definition: MQTTAsync.h:236
int do_openssl_init
Definition: MQTTAsync.h:238
Definition: MQTTAsync.h:272
int struct_version
Definition: MQTTAsync.h:277
MQTTProperties properties
Definition: MQTTAsync.h:331
int qos
Definition: MQTTAsync.h:295
int msgid
Definition: MQTTAsync.h:327
int retained
Definition: MQTTAsync.h:314
void * payload
Definition: MQTTAsync.h:281
int payloadlen
Definition: MQTTAsync.h:279
int dup
Definition: MQTTAsync.h:321
Definition: MQTTAsync.h:1183
const char * value
Definition: MQTTAsync.h:1185
const char * name
Definition: MQTTAsync.h:1184
Definition: MQTTAsync.h:709
int struct_version
Definition: MQTTAsync.h:714
MQTTAsync_onFailure * onFailure
Definition: MQTTAsync.h:726
MQTTProperties properties
Definition: MQTTAsync.h:755
MQTTSubscribe_options subscribeOptions
Definition: MQTTAsync.h:759
int subscribeOptionsCount
Definition: MQTTAsync.h:764
MQTTAsync_onSuccess5 * onSuccess5
Definition: MQTTAsync.h:745
MQTTAsync_onFailure5 * onFailure5
Definition: MQTTAsync.h:751
MQTTSubscribe_options * subscribeOptionsList
Definition: MQTTAsync.h:768
char struct_id[4]
Definition: MQTTAsync.h:711
MQTTAsync_onSuccess * onSuccess
Definition: MQTTAsync.h:720
void * context
Definition: MQTTAsync.h:732
MQTTAsync_token token
Definition: MQTTAsync.h:739
Definition: MQTTAsync.h:602
int struct_version
Definition: MQTTAsync.h:604
int MQTTVersion
Definition: MQTTAsync.h:628
MQTTProperties properties
Definition: MQTTAsync.h:608
enum MQTTReasonCodes * reasonCodes
Definition: MQTTAsync.h:616
int sessionPresent
Definition: MQTTAsync.h:629
MQTTAsync_message message
Definition: MQTTAsync.h:621
char * serverURI
Definition: MQTTAsync.h:627
int reasonCodeCount
Definition: MQTTAsync.h:615
char * destinationName
Definition: MQTTAsync.h:622
Definition: MQTTAsync.h:571
int MQTTVersion
Definition: MQTTAsync.h:593
int qos
Definition: MQTTAsync.h:579
int sessionPresent
Definition: MQTTAsync.h:594
MQTTAsync_message message
Definition: MQTTAsync.h:586
int * qosList
Definition: MQTTAsync.h:582
char * serverURI
Definition: MQTTAsync.h:592
char * destinationName
Definition: MQTTAsync.h:587
MQTTAsync_token token
Definition: MQTTAsync.h:573
Definition: MQTTAsync.h:1021
int struct_version
Definition: MQTTAsync.h:1027
const void * data
Definition: MQTTAsync.h:1045
const char * topicName
Definition: MQTTAsync.h:1029
const char * message
Definition: MQTTAsync.h:1031
int qos
Definition: MQTTAsync.h:1040
int retained
Definition: MQTTAsync.h:1035
int len
Definition: MQTTAsync.h:1044
Definition: MQTTProperties.h:113
Definition: MQTTSubscribeOpts.h:22