88 #if !defined(MQTTASYNC_H) 91 #if defined(__cplusplus) 95 #if defined(WIN32) || defined(WIN64) 96 #define DLLImport __declspec(dllimport) 97 #define DLLExport __declspec(dllexport) 99 #define DLLImport extern 100 #define DLLExport __attribute__ ((visibility ("default"))) 111 #if !defined(NO_PERSISTENCE) 119 #define MQTTASYNC_SUCCESS 0 124 #define MQTTASYNC_FAILURE -1 128 #define MQTTASYNC_PERSISTENCE_ERROR -2 133 #define MQTTASYNC_DISCONNECTED -3 138 #define MQTTASYNC_MAX_MESSAGES_INFLIGHT -4 142 #define MQTTASYNC_BAD_UTF8_STRING -5 146 #define MQTTASYNC_NULL_PARAMETER -6 152 #define MQTTASYNC_TOPICNAME_TRUNCATED -7 157 #define MQTTASYNC_BAD_STRUCTURE -8 161 #define MQTTASYNC_BAD_QOS -9 165 #define MQTTASYNC_NO_MORE_MSGIDS -10 169 #define MQTTASYNC_OPERATION_INCOMPLETE -11 173 #define MQTTASYNC_MAX_BUFFERED_MESSAGES -12 177 #define MQTTASYNC_SSL_NOT_SUPPORTED -13 181 #define MQTTASYNC_BAD_PROTOCOL -14 185 #define MQTTASYNC_BAD_MQTT_OPTION -15 189 #define MQTTASYNC_WRONG_MQTT_VERSION -16 195 #define MQTTVERSION_DEFAULT 0 199 #define MQTTVERSION_3_1 3 203 #define MQTTVERSION_3_1_1 4 207 #define MQTTVERSION_5 5 211 #define MQTT_BAD_SUBSCRIBE 0x80 227 #define MQTTAsync_init_options_initializer { {'M', 'Q', 'T', 'G'}, 0, 0 } 318 #define MQTTAsync_message_initializer { {'M', 'Q', 'T', 'M'}, 1, 0, NULL, 0, 0, 0, 0, MQTTProperties_initializer } 460 #define MQTTAsync_failureData5_initializer {{'M', 'Q', 'F', 'D'}, 0, 0, MQTTREASONCODE_SUCCESS, MQTTProperties_initializer, 0, NULL} 531 #define MQTTAsync_successData5_initializer {{'M', 'Q', 'S', 'D'}, 0, 0, MQTTREASONCODE_SUCCESS, MQTTProperties_initializer} 644 #define MQTTAsync_responseOptions_initializer { {'M', 'Q', 'T', 'R'}, 1, NULL, NULL, 0, 0, NULL, NULL, MQTTProperties_initializer, MQTTSubscribe_options_initializer, 0, NULL} 647 #define MQTTAsync_callOptions_initializer MQTTAsync_responseOptions_initializer 817 int persistence_type,
void* persistence_context);
839 #define MQTTAsync_createOptions_initializer { {'M', 'Q', 'C', 'O'}, 0, 0, 100, MQTTVERSION_DEFAULT } 886 #define MQTTAsync_willOptions_initializer { {'M', 'Q', 'T', 'W'}, 1, NULL, NULL, 0, 0, { 0, NULL } } 888 #define MQTT_SSL_VERSION_DEFAULT 0 889 #define MQTT_SSL_VERSION_TLS_1_0 1 890 #define MQTT_SSL_VERSION_TLS_1_1 2 891 #define MQTT_SSL_VERSION_TLS_1_2 3 964 int (*ssl_error_cb) (
const char *str,
size_t len,
void *u);
973 #define MQTTAsync_SSLOptions_initializer { {'M', 'Q', 'T', 'S'}, 3, NULL, NULL, NULL, NULL, NULL, 1, MQTT_SSL_VERSION_DEFAULT, 0, NULL, NULL, NULL } 1149 #define MQTTAsync_connectOptions_initializer { {'M', 'Q', 'T', 'C'}, 6, 60, 1, 65535, NULL, NULL, NULL, 30, 0,\ 1150 NULL, NULL, NULL, NULL, 0, NULL, MQTTVERSION_DEFAULT, 0, 1, 60, {0, NULL}, 0, NULL, NULL, NULL, NULL} 1152 #define MQTTAsync_connectOptions_initializer5 { {'M', 'Q', 'T', 'C'}, 6, 60, 0, 65535, NULL, NULL, NULL, 30, 0,\ 1153 NULL, NULL, NULL, NULL, 0, NULL, MQTTVERSION_5, 0, 1, 60, {0, NULL}, 1, NULL, NULL, NULL, NULL} 1230 #define MQTTAsync_disconnectOptions_initializer { {'M', 'Q', 'T', 'D'}, 1, 0, NULL, NULL, NULL, MQTTProperties_initializer, MQTTREASONCODE_SUCCESS } 1397 #define MQTTASYNC_TRUE 1 int sendWhileDisconnected
Definition: MQTTAsync.h:828
MQTTAsync_token token
Definition: MQTTAsync.h:466
int MQTTAsync_subscribeMany(MQTTAsync handle, int count, char *const *topic, int *qos, MQTTAsync_responseOptions *response)
MQTTAsync_onSuccess5 * onSuccess5
Definition: MQTTAsync.h:618
Definition: MQTTAsync.h:1453
int struct_version
Definition: MQTTAsync.h:495
int len
Definition: MQTTAsync.h:881
void * ssl_error_context
Definition: MQTTAsync.h:970
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:435
int MQTTAsync_token
Definition: MQTTAsync.h:249
int * qosList
Definition: MQTTAsync.h:473
MQTTProperties properties
Definition: MQTTAsync.h:628
char *const * serverURIs
Definition: MQTTAsync.h:1095
char * serverURI
Definition: MQTTAsync.h:518
int struct_version
Definition: MQTTAsync.h:992
char * destinationName
Definition: MQTTAsync.h:513
MQTTAsync_token token
Definition: MQTTAsync.h:497
MQTTAsync_token token
Definition: MQTTAsync.h:431
Definition: MQTTAsync.h:857
void MQTTAsync_connectionLost(void *context, char *cause)
Definition: MQTTAsync.h:383
int MQTTVersion
Definition: MQTTAsync.h:484
MQTTProperties properties
Definition: MQTTAsync.h:1211
MQTTAsync_willOptions * will
Definition: MQTTAsync.h:1035
MQTTAsync_token token
Definition: MQTTAsync.h:612
void MQTTAsync_connected(void *context, char *cause)
Definition: MQTTAsync.h:398
int MQTTAsync_disconnect(MQTTAsync handle, const MQTTAsync_disconnectOptions *options)
int struct_version
Definition: MQTTAsync.h:222
const char * keyStore
Definition: MQTTAsync.h:918
const void * data
Definition: MQTTAsync.h:1120
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:836
int MQTTAsync_setMessageArrivedCallback(MQTTAsync handle, void *context, MQTTAsync_messageArrived *ma)
int sessionPresent
Definition: MQTTAsync.h:485
Definition: MQTTAsync.h:257
int MQTTAsync_unsubscribeMany(MQTTAsync handle, int count, char *const *topic, MQTTAsync_responseOptions *response)
int MQTTVersion
Definition: MQTTAsync.h:1102
int struct_version
Definition: MQTTAsync.h:588
const char * password
Definition: MQTTAsync.h:1047
MQTTAsync_onFailure5 * onFailure5
Definition: MQTTAsync.h:624
int cleanstart
Definition: MQTTAsync.h:1125
MQTTAsync_onFailure * onFailure
Definition: MQTTAsync.h:600
int keepAliveInterval
Definition: MQTTAsync.h:1003
void MQTTAsync_deliveryComplete(void *context, MQTTAsync_token token)
Definition: MQTTAsync.h:366
int qos
Definition: MQTTAsync.h:281
int MQTTVersion
Definition: MQTTAsync.h:519
MQTTProperties * willProperties
Definition: MQTTAsync.h:1133
Definition: MQTTSubscribeOpts.h:21
MQTTASYNC_TRACE_LEVELS
Definition: MQTTAsync.h:1447
int automaticReconnect
Definition: MQTTAsync.h:1106
void * payload
Definition: MQTTAsync.h:267
int MQTTAsync_connect(MQTTAsync handle, const MQTTAsync_connectOptions *options)
const char * trustStore
Definition: MQTTAsync.h:913
void * context
Definition: MQTTAsync.h:606
char struct_id[4]
Definition: MQTTAsync.h:585
int MQTTAsync_setCallbacks(MQTTAsync handle, void *context, MQTTAsync_connectionLost *cl, MQTTAsync_messageArrived *ma, MQTTAsync_deliveryComplete *dc)
const char * CApath
Definition: MQTTAsync.h:958
#define DLLExport
Definition: MQTTProperties.h:58
int payloadlen
Definition: MQTTAsync.h:265
MQTTAsync_message message
Definition: MQTTAsync.h:477
MQTTSubscribe_options subscribeOptions
Definition: MQTTAsync.h:632
int packet_type
Definition: MQTTAsync.h:457
Definition: MQTTAsync.h:582
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:311
MQTTProperties * connectProperties
Definition: MQTTAsync.h:1129
int struct_version
Definition: MQTTAsync.h:910
int struct_version
Definition: MQTTAsync.h:826
MQTTAsync_onFailure5 * onFailure5
Definition: MQTTAsync.h:1227
MQTTAsync_onSuccess5 * onSuccess5
Definition: MQTTAsync.h:1221
MQTTAsync_onFailure * onFailure
Definition: MQTTAsync.h:1076
int struct_version
Definition: MQTTAsync.h:1184
struct MQTTAsync_responseOptions MQTTAsync_responseOptions
MQTTAsync_SSLOptions * ssl
Definition: MQTTAsync.h:1064
const char * privateKeyPassword
Definition: MQTTAsync.h:925
int sslVersion
Definition: MQTTAsync.h:944
const char * topicName
Definition: MQTTAsync.h:866
Definition: MQTTAsync.h:1452
int MQTTAsync_messageArrived(void *context, char *topicName, int topicLen, MQTTAsync_message *message)
Definition: MQTTAsync.h:346
int subscribeOptionsCount
Definition: MQTTAsync.h:637
MQTTAsync_onSuccess * onSuccess
Definition: MQTTAsync.h:1195
Definition: MQTTAsync.h:980
MQTTAsync_onFailure5 * onFailure5
Definition: MQTTAsync.h:1145
const char * name
Definition: MQTTAsync.h:1488
Definition: MQTTAsync.h:1454
Definition: MQTTAsync.h:905
void * context
Definition: MQTTAsync.h:1207
MQTTProperties properties
Definition: MQTTAsync.h:451
MQTTAsync_onSuccess * onSuccess
Definition: MQTTAsync.h:594
int reasonCodeCount
Definition: MQTTAsync.h:506
void MQTTAsync_free(void *ptr)
int struct_version
Definition: MQTTAsync.h:864
char * destinationName
Definition: MQTTAsync.h:478
int retryInterval
Definition: MQTTAsync.h:1059
MQTTAsync_onSuccess * onSuccess
Definition: MQTTAsync.h:1070
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:819
MQTTSubscribe_options * subscribeOptionsList
Definition: MQTTAsync.h:641
int struct_version
Definition: MQTTAsync.h:445
void MQTTAsync_onFailure5(void *context, MQTTAsync_failureData5 *response)
Definition: MQTTAsync.h:580
Definition: MQTTProperties.h:118
Definition: MQTTAsync.h:1455
int verify
Definition: MQTTAsync.h:951
MQTTAsync_token token
Definition: MQTTAsync.h:447
void MQTTAsync_onSuccess(void *context, MQTTAsync_successData *response)
Definition: MQTTAsync.h:543
MQTTProperties properties
Definition: MQTTAsync.h:499
void MQTTAsync_global_init(MQTTAsync_init_options *inits)
int do_openssl_init
Definition: MQTTAsync.h:224
MQTTReasonCodes
Definition: MQTTReasonCodes.h:21
Definition: MQTTAsync.h:428
int connectTimeout
Definition: MQTTAsync.h:1051
Definition: MQTTAsync.h:440
int maxBufferedMessages
Definition: MQTTAsync.h:830
int maxInflight
Definition: MQTTAsync.h:1029
void MQTTAsync_disconnected(void *context, MQTTProperties *properties, enum MQTTReasonCodes reasonCode)
Definition: MQTTAsync.h:409
MQTTAsync_message message
Definition: MQTTAsync.h:512
int MQTTAsync_subscribe(MQTTAsync handle, const char *topic, int qos, MQTTAsync_responseOptions *response)
Definition: MQTTAsync.h:1486
Definition: MQTTAsync.h:1449
int len
Definition: MQTTAsync.h:1119
const char * MQTTAsync_strerror(int code)
int MQTTAsync_setDeliveryCompleteCallback(MQTTAsync handle, void *context, MQTTAsync_deliveryComplete *dc)
const void * data
Definition: MQTTAsync.h:882
Definition: MQTTAsync.h:1450
int MQTTAsync_setConnectionLostCallback(MQTTAsync handle, void *context, MQTTAsync_connectionLost *cl)
int serverURIcount
Definition: MQTTAsync.h:1086
const char * value
Definition: MQTTAsync.h:1489
void * MQTTAsync
Definition: MQTTAsync.h:239
int qos
Definition: MQTTAsync.h:471
const char * username
Definition: MQTTAsync.h:1041
int enableServerCertAuth
Definition: MQTTAsync.h:938
int MQTTAsync_isComplete(MQTTAsync handle, MQTTAsync_token token)
void MQTTAsync_onFailure(void *context, MQTTAsync_failureData *response)
Definition: MQTTAsync.h:568
int code
Definition: MQTTAsync.h:453
const char * message
Definition: MQTTAsync.h:455
Definition: MQTTAsync.h:1179
int retained
Definition: MQTTAsync.h:872
int timeout
Definition: MQTTAsync.h:1189
void MQTTAsync_traceCallback(enum MQTTASYNC_TRACE_LEVELS level, char *message)
Definition: MQTTAsync.h:1475
int struct_version
Definition: MQTTAsync.h:263
void * context
Definition: MQTTAsync.h:1082
int code
Definition: MQTTAsync.h:433
MQTTAsync_onFailure * onFailure
Definition: MQTTAsync.h:1201
Definition: MQTTAsync.h:217
const char * privateKey
Definition: MQTTAsync.h:923
int maxRetryInterval
Definition: MQTTAsync.h:1114
int MQTTAsync_sendMessage(MQTTAsync handle, const char *destinationName, const MQTTAsync_message *msg, MQTTAsync_responseOptions *response)
MQTTAsync_onSuccess5 * onSuccess5
Definition: MQTTAsync.h:1139
const char * enabledCipherSuites
Definition: MQTTAsync.h:935
int MQTTAsync_waitForCompletion(MQTTAsync handle, MQTTAsync_token token, unsigned long timeout)
int qos
Definition: MQTTAsync.h:877
int MQTTAsync_setConnected(MQTTAsync handle, void *context, MQTTAsync_connected *co)
int cleansession
Definition: MQTTAsync.h:1025
enum MQTTReasonCodes * reasonCodes
Definition: MQTTAsync.h:507
const char * message
Definition: MQTTAsync.h:868
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:492
int minRetryInterval
Definition: MQTTAsync.h:1110
int MQTTAsync_reconnect(MQTTAsync handle)
int retained
Definition: MQTTAsync.h:300
Definition: MQTTAsync.h:1451
int dup
Definition: MQTTAsync.h:307
MQTTAsync_nameValue * MQTTAsync_getVersionInfo(void)
MQTTProperties properties
Definition: MQTTAsync.h:315
Definition: MQTTAsync.h:463
void MQTTAsync_onSuccess5(void *context, MQTTAsync_successData5 *response)
Definition: MQTTAsync.h:556
char * serverURI
Definition: MQTTAsync.h:483
int sessionPresent
Definition: MQTTAsync.h:520
int MQTTAsync_setDisconnected(MQTTAsync handle, void *context, MQTTAsync_disconnected *co)
void MQTTAsync_setTraceLevel(enum MQTTASYNC_TRACE_LEVELS level)