MQTTAsync.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2009, 2020 IBM Corp. 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
114 
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
128 
132 #define MQTTASYNC_MAX_MESSAGES_INFLIGHT -4
133 
136 #define MQTTASYNC_BAD_UTF8_STRING -5
137 
140 #define MQTTASYNC_NULL_PARAMETER -6
141 
146 #define MQTTASYNC_TOPICNAME_TRUNCATED -7
147 
151 #define MQTTASYNC_BAD_STRUCTURE -8
152 
155 #define MQTTASYNC_BAD_QOS -9
156 
159 #define MQTTASYNC_NO_MORE_MSGIDS -10
160 
163 #define MQTTASYNC_OPERATION_INCOMPLETE -11
164 
167 #define MQTTASYNC_MAX_BUFFERED_MESSAGES -12
168 
171 #define MQTTASYNC_SSL_NOT_SUPPORTED -13
172 
177 #define MQTTASYNC_BAD_PROTOCOL -14
178 
181  #define MQTTASYNC_BAD_MQTT_OPTION -15
182 
185  #define MQTTASYNC_WRONG_MQTT_VERSION -16
186 
189  #define MQTTASYNC_0_LEN_WILL_TOPIC -17
190 
191 
195 #define MQTTVERSION_DEFAULT 0
196 
199 #define MQTTVERSION_3_1 3
200 
203 #define MQTTVERSION_3_1_1 4
204 
207 #define MQTTVERSION_5 5
208 
211 #define MQTT_BAD_SUBSCRIBE 0x80
212 
213 
217 typedef struct
218 {
220  char struct_id[4];
226 
227 #define MQTTAsync_init_options_initializer { {'M', 'Q', 'T', 'G'}, 0, 0 }
228 
234 
239 typedef void* MQTTAsync;
249 typedef int MQTTAsync_token;
250 
257 typedef struct
258 {
260  char struct_id[4];
267  void* payload;
281  int qos;
300  int retained;
307  int dup;
312  int msgid;
318 
319 #define MQTTAsync_message_initializer { {'M', 'Q', 'T', 'M'}, 1, 0, NULL, 0, 0, 0, 0, MQTTProperties_initializer }
320 
354 typedef int MQTTAsync_messageArrived(void* context, char* topicName, int topicLen, MQTTAsync_message* message);
355 
377 typedef void MQTTAsync_deliveryComplete(void* context, MQTTAsync_token token);
378 
397 typedef void MQTTAsync_connectionLost(void* context, char* cause);
398 
399 
415 typedef void MQTTAsync_connected(void* context, char* cause);
416 
429 typedef void MQTTAsync_disconnected(void* context, MQTTProperties* properties,
430  enum MQTTReasonCodes reasonCode);
431 
447 LIBMQTT_API int MQTTAsync_setDisconnected(MQTTAsync handle, void* context, MQTTAsync_disconnected* co);
448 
450 typedef struct
451 {
453  char struct_id[4];
461  const char* username;
465  struct {
466  int len;
467  const void* data;
468  } binarypwd;
470 
471 #define MQTTAsync_connectData_initializer {{'M', 'Q', 'C', 'D'}, 0, NULL, {0, NULL}}
472 
474 
485 
496 
497 
508 
509 
511 typedef struct
512 {
514  MQTTAsync_token token;
516  int code;
518  const char *message;
520 
521 
523 typedef struct
524 {
526  char struct_id[4];
530  MQTTAsync_token token;
532  enum MQTTReasonCodes reasonCode;
536  int code;
538  const char *message;
542 
543 #define MQTTAsync_failureData5_initializer {{'M', 'Q', 'F', 'D'}, 0, 0, MQTTREASONCODE_SUCCESS, MQTTProperties_initializer, 0, NULL}
544 
546 typedef struct
547 {
549  MQTTAsync_token token;
551  union
552  {
555  int qos;
558  int* qosList;
560  struct
561  {
564  } pub;
565  /* For connect, the server connected to, MQTT version used, and sessionPresent flag */
566  struct
567  {
568  char* serverURI;
571  } connect;
572  } alt;
574 
575 
577 typedef struct
578 {
579  char struct_id[4];
582  MQTTAsync_token token;
583  enum MQTTReasonCodes reasonCode;
586  union
587  {
589  struct
590  {
593  } sub;
595  struct
596  {
599  } pub;
600  /* For connect, the server connected to, MQTT version used, and sessionPresent flag */
601  struct
602  {
603  char* serverURI;
606  } connect;
608  struct
609  {
610  int reasonCodeCount;
611  enum MQTTReasonCodes* reasonCodes;
612  } unsub;
613  } alt;
615 
616 #define MQTTAsync_successData5_initializer {{'M', 'Q', 'S', 'D'}, 0, 0, MQTTREASONCODE_SUCCESS, MQTTProperties_initializer}
617 
631 typedef void MQTTAsync_onSuccess(void* context, MQTTAsync_successData* response);
632 
647 typedef void MQTTAsync_onSuccess5(void* context, MQTTAsync_successData5* response);
648 
662 typedef void MQTTAsync_onFailure(void* context, MQTTAsync_failureData* response);
663 
677 typedef void MQTTAsync_onFailure5(void* context, MQTTAsync_failureData5* response);
678 
685 {
687  char struct_id[4];
708  void* context;
714  MQTTAsync_token token;
731  /*
732  * MQTT V5 subscribe options, when used with subscribe only.
733  */
735  /*
736  * MQTT V5 subscribe option count, when used with subscribeMany only.
737  * The number of entries in the subscribe_options_list array.
738  */
740  /*
741  * MQTT V5 subscribe option array, when used with subscribeMany only.
742  */
745 
746 #define MQTTAsync_responseOptions_initializer { {'M', 'Q', 'T', 'R'}, 1, NULL, NULL, 0, 0, NULL, NULL, MQTTProperties_initializer, MQTTSubscribe_options_initializer, 0, NULL}
747 
750 #define MQTTAsync_callOptions_initializer MQTTAsync_responseOptions_initializer
751 
781 LIBMQTT_API int MQTTAsync_setCallbacks(MQTTAsync handle, void* context, MQTTAsync_connectionLost* cl,
783 
804 LIBMQTT_API int MQTTAsync_setConnectionLostCallback(MQTTAsync handle, void* context,
806 
828 LIBMQTT_API int MQTTAsync_setMessageArrivedCallback(MQTTAsync handle, void* context,
830 
850 LIBMQTT_API int MQTTAsync_setDeliveryCompleteCallback(MQTTAsync handle, void* context,
852 
865 LIBMQTT_API int MQTTAsync_setConnected(MQTTAsync handle, void* context, MQTTAsync_connected* co);
866 
867 
876 LIBMQTT_API int MQTTAsync_reconnect(MQTTAsync handle);
877 
878 
923 LIBMQTT_API int MQTTAsync_create(MQTTAsync* handle, const char* serverURI, const char* clientId,
924  int persistence_type, void* persistence_context);
925 
927 typedef struct
928 {
930  char struct_id[4];
951  /*
952  * When the maximum number of buffered messages is reached, delete the oldest rather than the newest.
953  */
955  /*
956  * Restore messages from persistence on create - or clear it.
957  */
959  /*
960  * Persist QoS0 publish commands - an option to not persist them.
961  */
964 
965 #define MQTTAsync_createOptions_initializer { {'M', 'Q', 'C', 'O'}, 2, 0, 100, MQTTVERSION_DEFAULT, 0, 0, 1, 1}
966 
967 #define MQTTAsync_createOptions_initializer5 { {'M', 'Q', 'C', 'O'}, 2, 0, 100, MQTTVERSION_5, 0, 0, 1, 1}
968 
969 
970 LIBMQTT_API int MQTTAsync_createWithOptions(MQTTAsync* handle, const char* serverURI, const char* clientId,
971  int persistence_type, void* persistence_context, MQTTAsync_createOptions* options);
972 
985 typedef struct
986 {
988  char struct_id[4];
994  const char* topicName;
996  const char* message;
1005  int qos;
1007  struct
1008  {
1009  int len;
1010  const void* data;
1011  } payload;
1013 
1014 #define MQTTAsync_willOptions_initializer { {'M', 'Q', 'T', 'W'}, 1, NULL, NULL, 0, 0, { 0, NULL } }
1015 
1016 #define MQTT_SSL_VERSION_DEFAULT 0
1017 #define MQTT_SSL_VERSION_TLS_1_0 1
1018 #define MQTT_SSL_VERSION_TLS_1_1 2
1019 #define MQTT_SSL_VERSION_TLS_1_2 3
1020 
1033 typedef struct
1034 {
1036  char struct_id[4];
1037 
1046 
1048  const char* trustStore;
1049 
1053  const char* keyStore;
1054 
1058  const char* privateKey;
1059 
1061  const char* privateKeyPassword;
1062 
1071  const char* enabledCipherSuites;
1072 
1075 
1081 
1087  int verify;
1088 
1094  const char* CApath;
1095 
1100  int (*ssl_error_cb) (const char *str, size_t len, void *u);
1101 
1107 
1113  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);
1114 
1120 
1127 
1135  const unsigned char *protos;
1136 
1141  unsigned int protos_len;
1143 
1144 #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 }
1145 
1147 typedef struct
1148 {
1149  const char* name;
1150  const char* value;
1152 
1158 typedef struct
1159 {
1161  char struct_id[4];
1220  const char* username;
1226  const char* password;
1261  void* context;
1277  char* const* serverURIs;
1300  struct {
1301  int len;
1302  const void* data;
1303  } binarypwd;
1304  /*
1305  * MQTT V5 clean start flag. Only clears state at the beginning of the session.
1306  */
1333 
1334 
1335 #define MQTTAsync_connectOptions_initializer { {'M', 'Q', 'T', 'C'}, 7, 60, 1, 65535, NULL, NULL, NULL, 30, 0,\
1336 NULL, NULL, NULL, NULL, 0, NULL, MQTTVERSION_DEFAULT, 0, 1, 60, {0, NULL}, 0, NULL, NULL, NULL, NULL, NULL}
1337 
1338 #define MQTTAsync_connectOptions_initializer5 { {'M', 'Q', 'T', 'C'}, 7, 60, 0, 65535, NULL, NULL, NULL, 30, 0,\
1339 NULL, NULL, NULL, NULL, 0, NULL, MQTTVERSION_5, 0, 1, 60, {0, NULL}, 1, NULL, NULL, NULL, NULL, NULL}
1340 
1341 #define MQTTAsync_connectOptions_initializer_ws { {'M', 'Q', 'T', 'C'}, 7, 45, 1, 65535, NULL, NULL, NULL, 30, 0,\
1342 NULL, NULL, NULL, NULL, 0, NULL, MQTTVERSION_DEFAULT, 0, 1, 60, {0, NULL}, 0, NULL, NULL, NULL, NULL, NULL}
1343 
1344 #define MQTTAsync_connectOptions_initializer5_ws { {'M', 'Q', 'T', 'C'}, 7, 45, 0, 65535, NULL, NULL, NULL, 30, 0,\
1345 NULL, NULL, NULL, NULL, 0, NULL, MQTTVERSION_5, 0, 1, 60, {0, NULL}, 1, NULL, NULL, NULL, NULL, NULL}
1346 
1347 
1368 LIBMQTT_API int MQTTAsync_connect(MQTTAsync handle, const MQTTAsync_connectOptions* options);
1369 
1371 typedef struct
1372 {
1374  char struct_id[4];
1381  int timeout;
1399  void* context;
1407  enum MQTTReasonCodes reasonCode;
1421 
1422 #define MQTTAsync_disconnectOptions_initializer { {'M', 'Q', 'T', 'D'}, 0, 0, NULL, NULL, NULL,\
1423  MQTTProperties_initializer, MQTTREASONCODE_SUCCESS, NULL, NULL }
1424 
1425 #define MQTTAsync_disconnectOptions_initializer5 { {'M', 'Q', 'T', 'D'}, 1, 0, NULL, NULL, NULL,\
1426  MQTTProperties_initializer, MQTTREASONCODE_SUCCESS, NULL, NULL }
1427 
1447 
1448 
1456 LIBMQTT_API int MQTTAsync_isConnected(MQTTAsync handle);
1457 
1458 
1473 LIBMQTT_API int MQTTAsync_subscribe(MQTTAsync handle, const char* topic, int qos, MQTTAsync_responseOptions* response);
1474 
1475 
1493 LIBMQTT_API int MQTTAsync_subscribeMany(MQTTAsync handle, int count, char* const* topic, int* qos, MQTTAsync_responseOptions* response);
1494 
1507 LIBMQTT_API int MQTTAsync_unsubscribe(MQTTAsync handle, const char* topic, MQTTAsync_responseOptions* response);
1508 
1521 LIBMQTT_API int MQTTAsync_unsubscribeMany(MQTTAsync handle, int count, char* const* topic, MQTTAsync_responseOptions* response);
1522 
1523 
1542 LIBMQTT_API int MQTTAsync_send(MQTTAsync handle, const char* destinationName, int payloadlen, const void* payload, int qos,
1543  int retained, MQTTAsync_responseOptions* response);
1544 
1560 LIBMQTT_API int MQTTAsync_sendMessage(MQTTAsync handle, const char* destinationName, const MQTTAsync_message* msg, MQTTAsync_responseOptions* response);
1561 
1562 
1581 LIBMQTT_API int MQTTAsync_getPendingTokens(MQTTAsync handle, MQTTAsync_token **tokens);
1582 
1591 #define MQTTASYNC_TRUE 1
1592 LIBMQTT_API int MQTTAsync_isComplete(MQTTAsync handle, MQTTAsync_token token);
1593 
1594 
1605 LIBMQTT_API int MQTTAsync_waitForCompletion(MQTTAsync handle, MQTTAsync_token token, unsigned long timeout);
1606 
1607 
1619 
1628 LIBMQTT_API void MQTTAsync_free(void* ptr);
1629 
1637 LIBMQTT_API void* MQTTAsync_malloc(size_t size);
1638 
1646 LIBMQTT_API void MQTTAsync_destroy(MQTTAsync* handle);
1647 
1648 
1649 
1651 {
1659 };
1660 
1661 
1668 
1669 
1678 typedef void MQTTAsync_traceCallback(enum MQTTASYNC_TRACE_LEVELS level, char* message);
1679 
1687 
1695 
1702 LIBMQTT_API const char* MQTTAsync_strerror(int code);
1703 
1704 
2308 #ifdef __cplusplus
2309  }
2310 #endif
2311 
2312 #endif
MQTTAsync_onFailure * onFailure
Definition: MQTTAsync.h:1255
MQTTProperties properties
Definition: MQTTAsync.h:316
const char * keyStore
Definition: MQTTAsync.h:1053
LIBMQTT_API int MQTTAsync_connect(MQTTAsync handle, const MQTTAsync_connectOptions *options)
Definition: MQTTAsync.c:3480
unsigned int protos_len
Definition: MQTTAsync.h:1141
const char * trustStore
Definition: MQTTAsync.h:1048
LIBMQTT_API int MQTTAsync_subscribe(MQTTAsync handle, const char *topic, int qos, MQTTAsync_responseOptions *response)
Definition: MQTTAsync.c:4121
void MQTTAsync_traceCallback(enum MQTTASYNC_TRACE_LEVELS level, char *message)
Definition: MQTTAsync.h:1678
LIBMQTT_API int MQTTAsync_isConnected(MQTTAsync handle)
Definition: MQTTAsync.c:3932
MQTTAsync_onFailure5 * onFailure5
Definition: MQTTAsync.h:726
MQTTReasonCodes
string topic
Definition: test2.py:8
LIBMQTT_API int MQTTAsync_setAfterPersistenceRead(MQTTAsync handle, void *context, MQTTPersistence_afterRead *co)
Definition: MQTTAsync.c:3244
LIBMQTT_API int MQTTAsync_send(MQTTAsync handle, const char *destinationName, int payloadlen, const void *payload, int qos, int retained, MQTTAsync_responseOptions *response)
Definition: MQTTAsync.c:4230
const char * name
Definition: MQTTAsync.h:1149
LIBMQTT_API int MQTTAsync_setBeforePersistenceWrite(MQTTAsync handle, void *context, MQTTPersistence_beforeWrite *co)
Definition: MQTTAsync.c:3222
const char * message
Definition: MQTTAsync.h:996
const char * topicName
Definition: MQTTAsync.h:994
MQTTProperties properties
Definition: MQTTAsync.h:534
MQTTAsync_token token
Definition: MQTTAsync.h:582
LIBMQTT_API int MQTTAsync_setCallbacks(MQTTAsync handle, void *context, MQTTAsync_connectionLost *cl, MQTTAsync_messageArrived *ma, MQTTAsync_deliveryComplete *dc)
Definition: MQTTAsync.c:3062
MQTTProperties properties
Definition: MQTTAsync.h:584
#define LIBMQTT_API
MQTTSubscribe_options * subscribeOptionsList
Definition: MQTTAsync.h:743
void * MQTTAsync
Definition: MQTTAsync.h:239
LIBMQTT_API void MQTTAsync_destroy(MQTTAsync *handle)
Definition: MQTTAsync.c:2554
void MQTTAsync_connectionLost(void *context, char *cause)
Definition: MQTTAsync.h:397
MQTTAsync_onSuccess5 * onSuccess5
Definition: MQTTAsync.h:720
LIBMQTT_API int MQTTAsync_setDeliveryCompleteCallback(MQTTAsync handle, void *context, MQTTAsync_deliveryComplete *dc)
Definition: MQTTAsync.c:3133
LIBMQTT_API void * MQTTAsync_malloc(size_t size)
Definition: MQTTAsync.c:2634
const void * data
Definition: MQTTAsync.h:467
enum MQTTReasonCodes * reasonCodes
Definition: MQTTAsync.h:592
MQTTASYNC_TRACE_LEVELS
Definition: MQTTAsync.h:1650
LIBMQTT_API void MQTTAsync_free(void *ptr)
Definition: MQTTAsync.c:2626
int MQTTAsync_messageArrived(void *context, char *topicName, int topicLen, MQTTAsync_message *message)
Definition: MQTTAsync.h:354
void MQTTAsync_onSuccess5(void *context, MQTTAsync_successData5 *response)
Definition: MQTTAsync.h:647
LIBMQTT_API int MQTTAsync_reconnect(MQTTAsync handle)
Definition: MQTTAsync.c:1545
LIBMQTT_API int MQTTAsync_unsubscribeMany(MQTTAsync handle, int count, char *const *topic, MQTTAsync_responseOptions *response)
Definition: MQTTAsync.c:4131
const char * message
Definition: MQTTAsync.h:518
LIBMQTT_API int MQTTAsync_setConnected(MQTTAsync handle, void *context, MQTTAsync_connected *co)
Definition: MQTTAsync.c:3178
constexpr size_t count()
Definition: core.h:960
struct MQTTAsync_responseOptions MQTTAsync_responseOptions
int MQTTAsync_updateConnectOptions(void *context, MQTTAsync_connectData *data)
Definition: MQTTAsync.h:473
MQTTAsync_onFailure5 * onFailure5
Definition: MQTTAsync.h:1419
This structure represents a persistent data store, used to store outbound and inbound messages...
LIBMQTT_API int MQTTAsync_setConnectionLostCallback(MQTTAsync handle, void *context, MQTTAsync_connectionLost *cl)
Definition: MQTTAsync.c:3088
LIBMQTT_API int MQTTAsync_setMessageArrivedCallback(MQTTAsync handle, void *context, MQTTAsync_messageArrived *ma)
Definition: MQTTAsync.c:3111
MQTTAsync_onFailure * onFailure
Definition: MQTTAsync.h:702
MQTTAsync_onFailure5 * onFailure5
Definition: MQTTAsync.h:1327
LIBMQTT_API const char * MQTTAsync_strerror(int code)
Definition: MQTTAsync.c:4944
int qos
Definition: test6.c:56
MQTTAsync_token token
Definition: MQTTAsync.h:549
MQTTAsync_onFailure * onFailure
Definition: MQTTAsync.h:1393
MQTTAsync_message message
Definition: MQTTAsync.h:562
MQTTAsync_token token
Definition: MQTTAsync.h:530
MQTTAsync_token token
Definition: MQTTAsync.h:714
LIBMQTT_API int MQTTAsync_subscribeMany(MQTTAsync handle, int count, char *const *topic, int *qos, MQTTAsync_responseOptions *response)
Definition: MQTTAsync.c:4004
MQTTAsync_SSLOptions * ssl
Definition: MQTTAsync.h:1243
int MQTTAsync_token
Definition: MQTTAsync.h:249
MQTTAsync_onSuccess * onSuccess
Definition: MQTTAsync.h:696
LIBMQTT_API int MQTTAsync_isComplete(MQTTAsync handle, MQTTAsync_token token)
Definition: MQTTAsync.c:4803
MQTTAsync_willOptions * will
Definition: MQTTAsync.h:1214
const char * privateKeyPassword
Definition: MQTTAsync.h:1061
const char * username
Definition: MQTTAsync.h:461
void MQTTAsync_disconnected(void *context, MQTTProperties *properties, enum MQTTReasonCodes reasonCode)
Definition: MQTTAsync.h:429
const char * enabledCipherSuites
Definition: MQTTAsync.h:1071
MQTTProperties properties
Definition: MQTTAsync.h:1403
LIBMQTT_API MQTTAsync_nameValue * MQTTAsync_getVersionInfo(void)
Definition: MQTTAsync.c:4909
LIBMQTT_API int MQTTAsync_unsubscribe(MQTTAsync handle, const char *topic, MQTTAsync_responseOptions *response)
Definition: MQTTAsync.c:4209
const char * message
Definition: MQTTAsync.h:538
MQTTProperties properties
Definition: MQTTAsync.h:730
void MQTTAsync_onSuccess(void *context, MQTTAsync_successData *response)
Definition: MQTTAsync.h:631
const char * value
Definition: MQTTAsync.h:1150
MQTTAsync_message message
Definition: MQTTAsync.h:597
void MQTTAsync_connected(void *context, char *cause)
Definition: MQTTAsync.h:415
LIBMQTT_API void MQTTAsync_global_init(MQTTAsync_init_options *inits)
Definition: MQTTAsync.c:79
LIBMQTT_API void MQTTAsync_setTraceLevel(enum MQTTASYNC_TRACE_LEVELS level)
Definition: MQTTAsync.c:4897
const MQTTAsync_nameValue * httpHeaders
Definition: MQTTAsync.h:1331
int retained
Definition: test6.c:57
dictionary context
Definition: test2.py:57
LIBMQTT_API int MQTTAsync_disconnect(MQTTAsync handle, const MQTTAsync_disconnectOptions *options)
Definition: MQTTAsync.c:3923
LIBMQTT_API int MQTTAsync_setDisconnected(MQTTAsync handle, void *context, MQTTAsync_disconnected *co)
Definition: MQTTAsync.c:3156
const void * ptr(const T *p)
Definition: format.h:3610
const char * privateKey
Definition: MQTTAsync.h:1058
LIBMQTT_API int MQTTAsync_createWithOptions(MQTTAsync *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context, MQTTAsync_createOptions *options)
Definition: MQTTAsync.c:575
LIBMQTT_API int MQTTAsync_create(MQTTAsync *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context)
Definition: MQTTAsync.c:737
MQTTProperties * willProperties
Definition: MQTTAsync.h:1315
MQTTSubscribe_options subscribeOptions
Definition: MQTTAsync.h:734
void MQTTAsync_onFailure(void *context, MQTTAsync_failureData *response)
Definition: MQTTAsync.h:662
LIBMQTT_API void MQTTAsync_setTraceCallback(MQTTAsync_traceCallback *callback)
Definition: MQTTAsync.c:4903
MQTTAsync_token token
Definition: MQTTAsync.h:514
const void * data
Definition: MQTTAsync.h:1010
void MQTTAsync_onFailure5(void *context, MQTTAsync_failureData5 *response)
Definition: MQTTAsync.h:677
MQTTAsync_onSuccess5 * onSuccess5
Definition: MQTTAsync.h:1413
LIBMQTT_API int MQTTAsync_setUpdateConnectOptions(MQTTAsync handle, void *context, MQTTAsync_updateConnectOptions *co)
Definition: MQTTAsync.c:3200
LIBMQTT_API void MQTTAsync_freeMessage(MQTTAsync_message **msg)
Definition: MQTTAsync.c:2615
char *const * serverURIs
Definition: MQTTAsync.h:1277
LIBMQTT_API int MQTTAsync_getPendingTokens(MQTTAsync handle, MQTTAsync_token **tokens)
Definition: MQTTAsync.c:4737
dictionary data
Definition: mqtt_test.py:22
const char * CApath
Definition: MQTTAsync.h:1094
int MQTTPersistence_afterRead(void *context, char **buffer, int *buflen)
MQTTAsync_onSuccess * onSuccess
Definition: MQTTAsync.h:1249
void MQTTAsync_deliveryComplete(void *context, MQTTAsync_token token)
Definition: MQTTAsync.h:377
LIBMQTT_API int MQTTAsync_waitForCompletion(MQTTAsync handle, MQTTAsync_token token, unsigned long timeout)
Definition: MQTTAsync.c:4848
MQTTAsync_onSuccess5 * onSuccess5
Definition: MQTTAsync.h:1321
LIBMQTT_API int MQTTAsync_sendMessage(MQTTAsync handle, const char *destinationName, const MQTTAsync_message *msg, MQTTAsync_responseOptions *response)
Definition: MQTTAsync.c:4328
int len
Definition: utf-8.c:46
MQTTAsync_onSuccess * onSuccess
Definition: MQTTAsync.h:1387
int MQTTPersistence_beforeWrite(void *context, int bufcount, char *buffers[], int buflens[])
MQTTProperties * connectProperties
Definition: MQTTAsync.h:1311
struct Options options
const unsigned char * protos
Definition: MQTTAsync.h:1135


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:09