Paho Asynchronous MQTT C Client Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MQTTAsync.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2009, 2018 IBM Corp.
3  *
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * and Eclipse Distribution License v1.0 which accompany this distribution.
7  *
8  * The Eclipse Public License is available at
9  * http://www.eclipse.org/legal/epl-v10.html
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 #if defined(WIN32) || defined(WIN64)
96  #define DLLImport __declspec(dllimport)
97  #define DLLExport __declspec(dllexport)
98 #else
99  #define DLLImport extern
100  #define DLLExport __attribute__ ((visibility ("default")))
101 #endif
102 
103 #include <stdio.h>
104 /*
106 */
107 
108 #include "MQTTProperties.h"
109 #include "MQTTReasonCodes.h"
110 #include "MQTTSubscribeOpts.h"
111 #if !defined(NO_PERSISTENCE)
112 #include "MQTTClientPersistence.h"
113 #endif
114 
119 #define MQTTASYNC_SUCCESS 0
120 
124 #define MQTTASYNC_FAILURE -1
125 
126 /* error code -2 is MQTTAsync_PERSISTENCE_ERROR */
127 
128 #define MQTTASYNC_PERSISTENCE_ERROR -2
129 
133 #define MQTTASYNC_DISCONNECTED -3
134 
138 #define MQTTASYNC_MAX_MESSAGES_INFLIGHT -4
139 
142 #define MQTTASYNC_BAD_UTF8_STRING -5
143 
146 #define MQTTASYNC_NULL_PARAMETER -6
147 
152 #define MQTTASYNC_TOPICNAME_TRUNCATED -7
153 
157 #define MQTTASYNC_BAD_STRUCTURE -8
158 
161 #define MQTTASYNC_BAD_QOS -9
162 
165 #define MQTTASYNC_NO_MORE_MSGIDS -10
166 
169 #define MQTTASYNC_OPERATION_INCOMPLETE -11
170 
173 #define MQTTASYNC_MAX_BUFFERED_MESSAGES -12
174 
177 #define MQTTASYNC_SSL_NOT_SUPPORTED -13
178 
183 #define MQTTASYNC_BAD_PROTOCOL -14
184 
187  #define MQTTASYNC_BAD_MQTT_OPTION -15
188 
191  #define MQTTASYNC_WRONG_MQTT_VERSION -16
192 
193 
197 #define MQTTVERSION_DEFAULT 0
198 
201 #define MQTTVERSION_3_1 3
202 
205 #define MQTTVERSION_3_1_1 4
206 
209 #define MQTTVERSION_5 5
210 
213 #define MQTT_BAD_SUBSCRIBE 0x80
214 
215 
219 typedef struct
220 {
222  char struct_id[4];
228 
229 #define MQTTAsync_init_options_initializer { {'M', 'Q', 'T', 'G'}, 0, 0 }
230 
236 
241 typedef void* MQTTAsync;
251 typedef int MQTTAsync_token;
252 
259 typedef struct
260 {
262  char struct_id[4];
269  void* payload;
283  int qos;
302  int retained;
309  int dup;
313  int msgid;
319 
320 #define MQTTAsync_message_initializer { {'M', 'Q', 'T', 'M'}, 1, 0, NULL, 0, 0, 0, 0, MQTTProperties_initializer }
321 
348 typedef int MQTTAsync_messageArrived(void* context, char* topicName, int topicLen, MQTTAsync_message* message);
349 
368 typedef void MQTTAsync_deliveryComplete(void* context, MQTTAsync_token token);
369 
385 typedef void MQTTAsync_connectionLost(void* context, char* cause);
386 
387 
400 typedef void MQTTAsync_connected(void* context, char* cause);
401 
411 typedef void MQTTAsync_disconnected(void* context, MQTTProperties* properties,
412  enum MQTTReasonCodes reasonCode);
413 
426 DLLExport int MQTTAsync_setDisconnected(MQTTAsync handle, void* context, MQTTAsync_disconnected* co);
427 
428 
430 typedef struct
431 {
433  MQTTAsync_token token;
435  int code;
437  const char *message;
439 
440 
442 typedef struct
443 {
445  char struct_id[4];
449  MQTTAsync_token token;
451  enum MQTTReasonCodes reasonCode;
455  int code;
457  const char *message;
461 
462 #define MQTTAsync_failureData5_initializer {{'M', 'Q', 'F', 'D'}, 0, 0, MQTTREASONCODE_SUCCESS, MQTTProperties_initializer, 0, NULL}
463 
465 typedef struct
466 {
468  MQTTAsync_token token;
470  union
471  {
473  int qos;
475  int* qosList;
477  struct
478  {
481  } pub;
482  /* For connect, the server connected to, MQTT version used, and sessionPresent flag */
483  struct
484  {
485  char* serverURI;
488  } connect;
489  } alt;
491 
492 
494 typedef struct
495 {
496  char struct_id[4];
499  MQTTAsync_token token;
500  enum MQTTReasonCodes reasonCode;
503  union
504  {
506  struct
507  {
510  } sub;
512  struct
513  {
516  } pub;
517  /* For connect, the server connected to, MQTT version used, and sessionPresent flag */
518  struct
519  {
520  char* serverURI;
523  } connect;
525  struct
526  {
527  int reasonCodeCount;
528  enum MQTTReasonCodes* reasonCodes;
529  } unsub;
530  } alt;
532 
533 #define MQTTAsync_successData5_initializer {{'M', 'Q', 'S', 'D'}, 0, 0, MQTTREASONCODE_SUCCESS, MQTTProperties_initializer}
534 
545 typedef void MQTTAsync_onSuccess(void* context, MQTTAsync_successData* response);
546 
558 typedef void MQTTAsync_onSuccess5(void* context, MQTTAsync_successData5* response);
559 
570 typedef void MQTTAsync_onFailure(void* context, MQTTAsync_failureData* response);
571 
582 typedef void MQTTAsync_onFailure5(void* context, MQTTAsync_failureData5* response);
583 
585 {
587  char struct_id[4];
608  void* context;
614  MQTTAsync_token token;
631  /*
632  * MQTT V5 subscribe options, when used with subscribe only.
633  */
635  /*
636  * MQTT V5 subscribe option count, when used with subscribeMany only.
637  * The number of entries in the subscribe_options_list array.
638  */
640  /*
641  * MQTT V5 subscribe option array, when used with subscribeMany only.
642  */
645 
646 #define MQTTAsync_responseOptions_initializer { {'M', 'Q', 'T', 'R'}, 1, NULL, NULL, 0, 0, NULL, NULL, MQTTProperties_initializer, MQTTSubscribe_options_initializer, 0, NULL}
647 
649 #define MQTTAsync_callOptions_initializer MQTTAsync_responseOptions_initializer
650 
679 DLLExport int MQTTAsync_setCallbacks(MQTTAsync handle, void* context, MQTTAsync_connectionLost* cl,
681 
702 DLLExport int MQTTAsync_setConnectionLostCallback(MQTTAsync handle, void* context,
704 
726 DLLExport int MQTTAsync_setMessageArrivedCallback(MQTTAsync handle, void* context,
728 
748 DLLExport int MQTTAsync_setDeliveryCompleteCallback(MQTTAsync handle, void* context,
750 
763 DLLExport int MQTTAsync_setConnected(MQTTAsync handle, void* context, MQTTAsync_connected* co);
764 
765 
774 DLLExport int MQTTAsync_reconnect(MQTTAsync handle);
775 
776 
818 DLLExport int MQTTAsync_create(MQTTAsync* handle, const char* serverURI, const char* clientId,
819  int persistence_type, void* persistence_context);
820 
821 typedef struct
822 {
824  char struct_id[4];
840 
841 #define MQTTAsync_createOptions_initializer { {'M', 'Q', 'C', 'O'}, 1, 0, 100, MQTTVERSION_DEFAULT }
842 
843 #define MQTTAsync_createOptions_initializer5 { {'M', 'Q', 'C', 'O'}, 1, 0, 100, MQTTVERSION_5 }
844 
845 
846 DLLExport int MQTTAsync_createWithOptions(MQTTAsync* handle, const char* serverURI, const char* clientId,
847  int persistence_type, void* persistence_context, MQTTAsync_createOptions* options);
848 
861 typedef struct
862 {
864  char struct_id[4];
870  const char* topicName;
872  const char* message;
876  int retained;
881  int qos;
883  struct
884  {
885  int len;
886  const void* data;
887  } payload;
889 
890 #define MQTTAsync_willOptions_initializer { {'M', 'Q', 'T', 'W'}, 1, NULL, NULL, 0, 0, { 0, NULL } }
891 
892 #define MQTT_SSL_VERSION_DEFAULT 0
893 #define MQTT_SSL_VERSION_TLS_1_0 1
894 #define MQTT_SSL_VERSION_TLS_1_1 2
895 #define MQTT_SSL_VERSION_TLS_1_2 3
896 
909 typedef struct
910 {
912  char struct_id[4];
915 
917  const char* trustStore;
918 
922  const char* keyStore;
923 
927  const char* privateKey;
929  const char* privateKeyPassword;
930 
939  const char* enabledCipherSuites;
940 
943 
949 
955  int verify;
956 
962  const char* CApath;
963 
968  int (*ssl_error_cb) (const char *str, size_t len, void *u);
969 
975 
981  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);
982 
988 
995 
997 
998 #define MQTTAsync_SSLOptions_initializer { {'M', 'Q', 'T', 'S'}, 4, NULL, NULL, NULL, NULL, NULL, 1, MQTT_SSL_VERSION_DEFAULT, 0, NULL, NULL, NULL, NULL, NULL, 0}
999 
1005 typedef struct
1006 {
1008  char struct_id[4];
1066  const char* username;
1072  const char* password;
1107  void* context;
1120  char* const* serverURIs;
1143  struct {
1144  int len;
1145  const void* data;
1146  } binarypwd;
1147  /*
1148  * MQTT V5 clean start flag. Only clears state at the beginning of the session.
1149  */
1172 
1173 
1174 #define MQTTAsync_connectOptions_initializer { {'M', 'Q', 'T', 'C'}, 6, 60, 1, 65535, NULL, NULL, NULL, 30, 0,\
1175 NULL, NULL, NULL, NULL, 0, NULL, MQTTVERSION_DEFAULT, 0, 1, 60, {0, NULL}, 0, NULL, NULL, NULL, NULL}
1176 
1177 #define MQTTAsync_connectOptions_initializer5 { {'M', 'Q', 'T', 'C'}, 6, 60, 0, 65535, NULL, NULL, NULL, 30, 0,\
1178 NULL, NULL, NULL, NULL, 0, NULL, MQTTVERSION_5, 0, 1, 60, {0, NULL}, 1, NULL, NULL, NULL, NULL}
1179 
1180 
1201 DLLExport int MQTTAsync_connect(MQTTAsync handle, const MQTTAsync_connectOptions* options);
1202 
1203 
1204 typedef struct
1205 {
1207  char struct_id[4];
1214  int timeout;
1232  void* context;
1240  enum MQTTReasonCodes reasonCode;
1254 
1255 #define MQTTAsync_disconnectOptions_initializer { {'M', 'Q', 'T', 'D'}, 0, 0, NULL, NULL, NULL,\
1256  MQTTProperties_initializer, MQTTREASONCODE_SUCCESS }
1257 
1258 #define MQTTAsync_disconnectOptions_initializer5 { {'M', 'Q', 'T', 'D'}, 1, 0, NULL, NULL, NULL,\
1259  MQTTProperties_initializer, MQTTREASONCODE_SUCCESS, NULL, NULL }
1260 
1279 DLLExport int MQTTAsync_disconnect(MQTTAsync handle, const MQTTAsync_disconnectOptions* options);
1280 
1281 
1289 DLLExport int MQTTAsync_isConnected(MQTTAsync handle);
1290 
1291 
1306 DLLExport int MQTTAsync_subscribe(MQTTAsync handle, const char* topic, int qos, MQTTAsync_responseOptions* response);
1307 
1308 
1326 DLLExport int MQTTAsync_subscribeMany(MQTTAsync handle, int count, char* const* topic, int* qos, MQTTAsync_responseOptions* response);
1327 
1340 DLLExport int MQTTAsync_unsubscribe(MQTTAsync handle, const char* topic, MQTTAsync_responseOptions* response);
1341 
1354 DLLExport int MQTTAsync_unsubscribeMany(MQTTAsync handle, int count, char* const* topic, MQTTAsync_responseOptions* response);
1355 
1356 
1375 DLLExport int MQTTAsync_send(MQTTAsync handle, const char* destinationName, int payloadlen, const void* payload, int qos,
1376  int retained, MQTTAsync_responseOptions* response);
1377 
1378 
1394 DLLExport int MQTTAsync_sendMessage(MQTTAsync handle, const char* destinationName, const MQTTAsync_message* msg, MQTTAsync_responseOptions* response);
1395 
1396 
1415 DLLExport int MQTTAsync_getPendingTokens(MQTTAsync handle, MQTTAsync_token **tokens);
1416 
1425 #define MQTTASYNC_TRUE 1
1426 DLLExport int MQTTAsync_isComplete(MQTTAsync handle, MQTTAsync_token token);
1427 
1428 
1439 DLLExport int MQTTAsync_waitForCompletion(MQTTAsync handle, MQTTAsync_token token, unsigned long timeout);
1440 
1441 
1453 
1462 DLLExport void MQTTAsync_free(void* ptr);
1463 
1471 DLLExport void MQTTAsync_destroy(MQTTAsync* handle);
1472 
1473 
1474 
1476 {
1484 };
1485 
1486 
1493 
1494 
1503 typedef void MQTTAsync_traceCallback(enum MQTTASYNC_TRACE_LEVELS level, char* message);
1504 
1512 
1513 
1514 typedef struct
1515 {
1516  const char* name;
1517  const char* value;
1519 
1527 
1534 DLLExport const char* MQTTAsync_strerror(int code);
1535 
1536 
2092 #ifdef __cplusplus
2093  }
2094 #endif
2095 
2096 #endif
int sendWhileDisconnected
Definition: MQTTAsync.h:830
MQTTAsync_token token
Definition: MQTTAsync.h:468
int MQTTAsync_subscribeMany(MQTTAsync handle, int count, char *const *topic, int *qos, MQTTAsync_responseOptions *response)
MQTTAsync_onSuccess5 * onSuccess5
Definition: MQTTAsync.h:620
Definition: MQTTAsync.h:1481
int struct_version
Definition: MQTTAsync.h:497
int len
Definition: MQTTAsync.h:885
void * ssl_error_context
Definition: MQTTAsync.h:974
int MQTTAsync_getPendingTokens(MQTTAsync handle, MQTTAsync_token **tokens)
void MQTTAsync_setTraceCallback(MQTTAsync_traceCallback *callback)
int MQTTAsync_isConnected(MQTTAsync handle)
const char * message
Definition: MQTTAsync.h:437
int MQTTAsync_token
Definition: MQTTAsync.h:251
int * qosList
Definition: MQTTAsync.h:475
MQTTProperties properties
Definition: MQTTAsync.h:630
char *const * serverURIs
Definition: MQTTAsync.h:1120
char * serverURI
Definition: MQTTAsync.h:520
int struct_version
Definition: MQTTAsync.h:1017
char * destinationName
Definition: MQTTAsync.h:515
MQTTAsync_token token
Definition: MQTTAsync.h:499
MQTTAsync_token token
Definition: MQTTAsync.h:433
Definition: MQTTAsync.h:861
void MQTTAsync_connectionLost(void *context, char *cause)
Definition: MQTTAsync.h:385
int MQTTVersion
Definition: MQTTAsync.h:486
MQTTProperties properties
Definition: MQTTAsync.h:1236
MQTTAsync_willOptions * will
Definition: MQTTAsync.h:1060
MQTTAsync_token token
Definition: MQTTAsync.h:614
void MQTTAsync_connected(void *context, char *cause)
Definition: MQTTAsync.h:400
int MQTTAsync_disconnect(MQTTAsync handle, const MQTTAsync_disconnectOptions *options)
int struct_version
Definition: MQTTAsync.h:224
const char * keyStore
Definition: MQTTAsync.h:922
const void * data
Definition: MQTTAsync.h:1145
int MQTTAsync_createWithOptions(MQTTAsync *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context, MQTTAsync_createOptions *options)
int MQTTVersion
Definition: MQTTAsync.h:838
int MQTTAsync_setMessageArrivedCallback(MQTTAsync handle, void *context, MQTTAsync_messageArrived *ma)
int sessionPresent
Definition: MQTTAsync.h:487
Definition: MQTTAsync.h:259
int MQTTAsync_unsubscribeMany(MQTTAsync handle, int count, char *const *topic, MQTTAsync_responseOptions *response)
int MQTTVersion
Definition: MQTTAsync.h:1127
int struct_version
Definition: MQTTAsync.h:590
const char * password
Definition: MQTTAsync.h:1072
MQTTAsync_onFailure5 * onFailure5
Definition: MQTTAsync.h:626
int cleanstart
Definition: MQTTAsync.h:1150
MQTTAsync_onFailure * onFailure
Definition: MQTTAsync.h:602
int keepAliveInterval
Definition: MQTTAsync.h:1028
void MQTTAsync_deliveryComplete(void *context, MQTTAsync_token token)
Definition: MQTTAsync.h:368
int qos
Definition: MQTTAsync.h:283
int MQTTVersion
Definition: MQTTAsync.h:521
MQTTProperties * willProperties
Definition: MQTTAsync.h:1158
Definition: MQTTSubscribeOpts.h:21
MQTTASYNC_TRACE_LEVELS
Definition: MQTTAsync.h:1475
int automaticReconnect
Definition: MQTTAsync.h:1131
void * payload
Definition: MQTTAsync.h:269
int MQTTAsync_connect(MQTTAsync handle, const MQTTAsync_connectOptions *options)
const char * trustStore
Definition: MQTTAsync.h:917
void * context
Definition: MQTTAsync.h:608
char struct_id[4]
Definition: MQTTAsync.h:587
int MQTTAsync_setCallbacks(MQTTAsync handle, void *context, MQTTAsync_connectionLost *cl, MQTTAsync_messageArrived *ma, MQTTAsync_deliveryComplete *dc)
const char * CApath
Definition: MQTTAsync.h:962
#define DLLExport
Definition: MQTTProperties.h:58
int payloadlen
Definition: MQTTAsync.h:267
MQTTAsync_message message
Definition: MQTTAsync.h:479
MQTTSubscribe_options subscribeOptions
Definition: MQTTAsync.h:634
int packet_type
Definition: MQTTAsync.h:459
Definition: MQTTAsync.h:584
int MQTTAsync_send(MQTTAsync handle, const char *destinationName, int payloadlen, const void *payload, int qos, int retained, MQTTAsync_responseOptions *response)
int msgid
Definition: MQTTAsync.h:313
MQTTProperties * connectProperties
Definition: MQTTAsync.h:1154
int struct_version
Definition: MQTTAsync.h:914
int struct_version
Definition: MQTTAsync.h:828
MQTTAsync_onFailure5 * onFailure5
Definition: MQTTAsync.h:1252
MQTTAsync_onSuccess5 * onSuccess5
Definition: MQTTAsync.h:1246
MQTTAsync_onFailure * onFailure
Definition: MQTTAsync.h:1101
int struct_version
Definition: MQTTAsync.h:1209
struct MQTTAsync_responseOptions MQTTAsync_responseOptions
MQTTAsync_SSLOptions * ssl
Definition: MQTTAsync.h:1089
const char * privateKeyPassword
Definition: MQTTAsync.h:929
int sslVersion
Definition: MQTTAsync.h:948
const char * topicName
Definition: MQTTAsync.h:870
Definition: MQTTAsync.h:1480
int MQTTAsync_messageArrived(void *context, char *topicName, int topicLen, MQTTAsync_message *message)
Definition: MQTTAsync.h:348
int subscribeOptionsCount
Definition: MQTTAsync.h:639
MQTTAsync_onSuccess * onSuccess
Definition: MQTTAsync.h:1220
Definition: MQTTAsync.h:1005
MQTTAsync_onFailure5 * onFailure5
Definition: MQTTAsync.h:1170
const char * name
Definition: MQTTAsync.h:1516
Definition: MQTTAsync.h:1482
Definition: MQTTAsync.h:909
void * context
Definition: MQTTAsync.h:1232
MQTTProperties properties
Definition: MQTTAsync.h:453
MQTTAsync_onSuccess * onSuccess
Definition: MQTTAsync.h:596
int reasonCodeCount
Definition: MQTTAsync.h:508
void MQTTAsync_free(void *ptr)
int struct_version
Definition: MQTTAsync.h:868
char * destinationName
Definition: MQTTAsync.h:480
int retryInterval
Definition: MQTTAsync.h:1084
MQTTAsync_onSuccess * onSuccess
Definition: MQTTAsync.h:1095
void MQTTAsync_freeMessage(MQTTAsync_message **msg)
int MQTTAsync_create(MQTTAsync *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context)
Definition: MQTTAsync.h:821
MQTTSubscribe_options * subscribeOptionsList
Definition: MQTTAsync.h:643
int struct_version
Definition: MQTTAsync.h:447
void MQTTAsync_onFailure5(void *context, MQTTAsync_failureData5 *response)
Definition: MQTTAsync.h:582
void * ssl_psk_context
Definition: MQTTAsync.h:987
Definition: MQTTProperties.h:118
Definition: MQTTAsync.h:1483
int verify
Definition: MQTTAsync.h:955
MQTTAsync_token token
Definition: MQTTAsync.h:449
void MQTTAsync_onSuccess(void *context, MQTTAsync_successData *response)
Definition: MQTTAsync.h:545
MQTTProperties properties
Definition: MQTTAsync.h:501
void MQTTAsync_global_init(MQTTAsync_init_options *inits)
int do_openssl_init
Definition: MQTTAsync.h:226
MQTTReasonCodes
Definition: MQTTReasonCodes.h:21
Definition: MQTTAsync.h:430
int connectTimeout
Definition: MQTTAsync.h:1076
Definition: MQTTAsync.h:442
int maxBufferedMessages
Definition: MQTTAsync.h:832
int maxInflight
Definition: MQTTAsync.h:1054
void MQTTAsync_disconnected(void *context, MQTTProperties *properties, enum MQTTReasonCodes reasonCode)
Definition: MQTTAsync.h:411
MQTTAsync_message message
Definition: MQTTAsync.h:514
int MQTTAsync_subscribe(MQTTAsync handle, const char *topic, int qos, MQTTAsync_responseOptions *response)
Definition: MQTTAsync.h:1514
Definition: MQTTAsync.h:1477
int len
Definition: MQTTAsync.h:1144
const char * MQTTAsync_strerror(int code)
int MQTTAsync_setDeliveryCompleteCallback(MQTTAsync handle, void *context, MQTTAsync_deliveryComplete *dc)
const void * data
Definition: MQTTAsync.h:886
Definition: MQTTAsync.h:1478
int MQTTAsync_setConnectionLostCallback(MQTTAsync handle, void *context, MQTTAsync_connectionLost *cl)
int serverURIcount
Definition: MQTTAsync.h:1111
const char * value
Definition: MQTTAsync.h:1517
void * MQTTAsync
Definition: MQTTAsync.h:241
int qos
Definition: MQTTAsync.h:473
int disableDefaultTrustStore
Definition: MQTTAsync.h:994
const char * username
Definition: MQTTAsync.h:1066
int enableServerCertAuth
Definition: MQTTAsync.h:942
int MQTTAsync_isComplete(MQTTAsync handle, MQTTAsync_token token)
void MQTTAsync_onFailure(void *context, MQTTAsync_failureData *response)
Definition: MQTTAsync.h:570
int code
Definition: MQTTAsync.h:455
const char * message
Definition: MQTTAsync.h:457
Definition: MQTTAsync.h:1204
int retained
Definition: MQTTAsync.h:876
int timeout
Definition: MQTTAsync.h:1214
void MQTTAsync_traceCallback(enum MQTTASYNC_TRACE_LEVELS level, char *message)
Definition: MQTTAsync.h:1503
int struct_version
Definition: MQTTAsync.h:265
void * context
Definition: MQTTAsync.h:1107
int code
Definition: MQTTAsync.h:435
MQTTAsync_onFailure * onFailure
Definition: MQTTAsync.h:1226
Definition: MQTTAsync.h:219
const char * privateKey
Definition: MQTTAsync.h:927
int maxRetryInterval
Definition: MQTTAsync.h:1139
int MQTTAsync_sendMessage(MQTTAsync handle, const char *destinationName, const MQTTAsync_message *msg, MQTTAsync_responseOptions *response)
MQTTAsync_onSuccess5 * onSuccess5
Definition: MQTTAsync.h:1164
const char * enabledCipherSuites
Definition: MQTTAsync.h:939
int MQTTAsync_waitForCompletion(MQTTAsync handle, MQTTAsync_token token, unsigned long timeout)
int qos
Definition: MQTTAsync.h:881
int MQTTAsync_setConnected(MQTTAsync handle, void *context, MQTTAsync_connected *co)
int cleansession
Definition: MQTTAsync.h:1050
enum MQTTReasonCodes * reasonCodes
Definition: MQTTAsync.h:509
const char * message
Definition: MQTTAsync.h:872
int MQTTAsync_unsubscribe(MQTTAsync handle, const char *topic, MQTTAsync_responseOptions *response)
This structure represents a persistent data store, used to store outbound and inbound messages...
void MQTTAsync_destroy(MQTTAsync *handle)
Definition: MQTTAsync.h:494
int minRetryInterval
Definition: MQTTAsync.h:1135
int MQTTAsync_reconnect(MQTTAsync handle)
int retained
Definition: MQTTAsync.h:302
Definition: MQTTAsync.h:1479
int dup
Definition: MQTTAsync.h:309
MQTTAsync_nameValue * MQTTAsync_getVersionInfo(void)
MQTTProperties properties
Definition: MQTTAsync.h:317
Definition: MQTTAsync.h:465
void MQTTAsync_onSuccess5(void *context, MQTTAsync_successData5 *response)
Definition: MQTTAsync.h:558
char * serverURI
Definition: MQTTAsync.h:485
int sessionPresent
Definition: MQTTAsync.h:522
int MQTTAsync_setDisconnected(MQTTAsync handle, void *context, MQTTAsync_disconnected *co)
void MQTTAsync_setTraceLevel(enum MQTTASYNC_TRACE_LEVELS level)