Paho MQTT C Client Library: MQTTClient.h Source File

| Paho MQTT C Client Library

MQTTClient.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright (c) 2009, 2023 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 and/or initial documentation
15 * Ian Craggs, Allan Stockdill-Mander - SSL updates
16 * Ian Craggs - multiple server connection support
17 * Ian Craggs - MQTT 3.1.1 support
18 * Ian Craggs - remove const from eyecatchers #168
19 *******************************************************************************/
20
104 /*
106 */
107 #if !defined(MQTTCLIENT_H)
108 #define MQTTCLIENT_H
109
110 #if defined(__cplusplus)
111 extern "C" {
112 #endif
113
114 #include <stdio.h>
115 /*
117 */
118
119 #include "MQTTExportDeclarations.h"
120
121 #include "MQTTProperties.h"
122 #include "MQTTReasonCodes.h"
123 #include "MQTTSubscribeOpts.h"
124 #if !defined(NO_PERSISTENCE)
125 #include "MQTTClientPersistence.h"
126 #endif
127
132 #define MQTTCLIENT_SUCCESS 0
137 #define MQTTCLIENT_FAILURE -1
138
139 /* error code -2 is MQTTCLIENT_PERSISTENCE_ERROR */
140
144 #define MQTTCLIENT_DISCONNECTED -3
149 #define MQTTCLIENT_MAX_MESSAGES_INFLIGHT -4
153 #define MQTTCLIENT_BAD_UTF8_STRING -5
157 #define MQTTCLIENT_NULL_PARAMETER -6
163 #define MQTTCLIENT_TOPICNAME_TRUNCATED -7
168 #define MQTTCLIENT_BAD_STRUCTURE -8
172 #define MQTTCLIENT_BAD_QOS -9
176 #define MQTTCLIENT_SSL_NOT_SUPPORTED -10
180 #define MQTTCLIENT_BAD_MQTT_VERSION -11
190 #define MQTTCLIENT_BAD_PROTOCOL -14
194 #define MQTTCLIENT_BAD_MQTT_OPTION -15
198 #define MQTTCLIENT_WRONG_MQTT_VERSION -16
202 #define MQTTCLIENT_0_LEN_WILL_TOPIC -17
203
204
208 #define MQTTVERSION_DEFAULT 0
212 #define MQTTVERSION_3_1 3
216 #define MQTTVERSION_3_1_1 4
220 #define MQTTVERSION_5 5
224 #define MQTT_BAD_SUBSCRIBE 0x80
225
229 typedef struct
230 {
232 char struct_id[4];
234 int struct_version;
236 int do_openssl_init;
237 } MQTTClient_init_options;
238
239 #define MQTTClient_init_options_initializer { {'M', 'Q', 'T', 'G'}, 0, 0 }
240
245 LIBMQTT_API void MQTTClient_global_init(MQTTClient_init_options* inits);
246
251 typedef void* MQTTClient;
262 typedef int MQTTClient_deliveryToken;
263 typedef int MQTTClient_token;
264
271 typedef struct
272 {
274 char struct_id[4];
277 int struct_version;
279 int payloadlen;
281 void* payload;
295 int qos;
314 int retained;
321 int dup;
325 int msgid;
329 MQTTProperties properties;
330 } MQTTClient_message;
331
332 #define MQTTClient_message_initializer { {'M', 'Q', 'T', 'M'}, 1, 0, NULL, 0, 0, 0, 0, MQTTProperties_initializer }
333
364 typedef int MQTTClient_messageArrived(void* context, char* topicName, int topicLen, MQTTClient_message* message);
365
386 typedef void MQTTClient_deliveryComplete(void* context, MQTTClient_deliveryToken dt);
387
403 typedef void MQTTClient_connectionLost(void* context, char* cause);
404
433 LIBMQTT_API int MQTTClient_setCallbacks(MQTTClient handle, void* context, MQTTClient_connectionLost* cl,
434 MQTTClient_messageArrived* ma, MQTTClient_deliveryComplete* dc);
435
436
446 typedef void MQTTClient_disconnected(void* context, MQTTProperties* properties,
447 enum MQTTReasonCodes reasonCode);
448
462 LIBMQTT_API int MQTTClient_setDisconnected(MQTTClient handle, void* context, MQTTClient_disconnected* co);
463
487 typedef void MQTTClient_published(void* context, int dt, int packet_type, MQTTProperties* properties,
488 enum MQTTReasonCodes reasonCode);
489
490 LIBMQTT_API int MQTTClient_setPublished(MQTTClient handle, void* context, MQTTClient_published* co);
491
544 LIBMQTT_API int MQTTClient_create(MQTTClient* handle, const char* serverURI, const char* clientId,
545 int persistence_type, void* persistence_context);
546
548 typedef struct
549 {
551 char struct_id[4];
553 int struct_version;
559 int MQTTVersion;
560 } MQTTClient_createOptions;
561
562 #define MQTTClient_createOptions_initializer { {'M', 'Q', 'C', 'O'}, 0, MQTTVERSION_DEFAULT }
563
608 LIBMQTT_API int MQTTClient_createWithOptions(MQTTClient* handle, const char* serverURI, const char* clientId,
609 int persistence_type, void* persistence_context, MQTTClient_createOptions* options);
610
623 typedef struct
624 {
626 char struct_id[4];
630 int struct_version;
632 const char* topicName;
634 const char* message;
638 int retained;
643 int qos;
645 struct
646 {
647 int len;
648 const void* data;
649 } payload;
650 } MQTTClient_willOptions;
651
652 #define MQTTClient_willOptions_initializer { {'M', 'Q', 'T', 'W'}, 1, NULL, NULL, 0, 0, {0, NULL} }
653
654 #define MQTT_SSL_VERSION_DEFAULT 0
655 #define MQTT_SSL_VERSION_TLS_1_0 1
656 #define MQTT_SSL_VERSION_TLS_1_1 2
657 #define MQTT_SSL_VERSION_TLS_1_2 3
658
671 typedef struct
672 {
674 char struct_id[4];
675
683 int struct_version;
684
686 const char* trustStore;
687
691 const char* keyStore;
692
696 const char* privateKey;
697
699 const char* privateKeyPassword;
700
709 const char* enabledCipherSuites;
710
712 int enableServerCertAuth;
713
718 int sslVersion;
719
725 int verify;
726
732 const char* CApath;
733
738 int (*ssl_error_cb) (const char *str, size_t len, void *u);
739
744 void* ssl_error_context;
745
751 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);
752
757 void* ssl_psk_context;
758
764 int disableDefaultTrustStore;
765
773 const unsigned char *protos;
774
779 unsigned int protos_len;
780 } MQTTClient_SSLOptions;
781
782 #define MQTTClient_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 }
783
791 typedef struct
792 {
793 const char* name;
794 const char* value;
795 } MQTTClient_nameValue;
796
802 LIBMQTT_API MQTTClient_nameValue* MQTTClient_getVersionInfo(void);
803
824 typedef struct
825 {
827 char struct_id[4];
838 int struct_version;
848 int keepAliveInterval;
870 int cleansession;
880 int reliable;
886 MQTTClient_willOptions* will;
892 const char* username;
898 const char* password;
902 int connectTimeout;
910 int retryInterval;
915 MQTTClient_SSLOptions* ssl;
919 int serverURIcount;
933 char* const* serverURIs;
941 int MQTTVersion;
945 struct
946 {
947 const char* serverURI;
948 int MQTTVersion;
949 int sessionPresent;
950 } returned;
954 struct
955 {
956 int len;
957 const void* data;
958 } binarypwd;
962 int maxInflightMessages;
963 /*
964 * MQTT V5 clean start flag. Only clears state at the beginning of the session.
965 */
966 int cleanstart;
970 const MQTTClient_nameValue* httpHeaders;
974 const char* httpProxy;
978 const char* httpsProxy;
979 } MQTTClient_connectOptions;
980
982 #define MQTTClient_connectOptions_initializer { {'M', 'Q', 'T', 'C'}, 8, 60, 1, 1, NULL, NULL, NULL, 30, 0, NULL,\
983 0, NULL, MQTTVERSION_DEFAULT, {NULL, 0, 0}, {0, NULL}, -1, 0, NULL, NULL, NULL}
984
986 #define MQTTClient_connectOptions_initializer5 { {'M', 'Q', 'T', 'C'}, 8, 60, 0, 1, NULL, NULL, NULL, 30, 0, NULL,\
987 0, NULL, MQTTVERSION_5, {NULL, 0, 0}, {0, NULL}, -1, 1, NULL, NULL, NULL}
988
992 #define MQTTClient_connectOptions_initializer_ws { {'M', 'Q', 'T', 'C'}, 8, 45, 1, 1, NULL, NULL, NULL, 30, 0, NULL,\
993 0, NULL, MQTTVERSION_DEFAULT, {NULL, 0, 0}, {0, NULL}, -1, 0, NULL, NULL, NULL}
994
998 #define MQTTClient_connectOptions_initializer5_ws { {'M', 'Q', 'T', 'C'}, 8, 45, 0, 1, NULL, NULL, NULL, 30, 0, NULL,\
999 0, NULL, MQTTVERSION_5, {NULL, 0, 0}, {0, NULL}, -1, 1, NULL, NULL, NULL}
1000
1021 LIBMQTT_API int MQTTClient_connect(MQTTClient handle, MQTTClient_connectOptions* options);
1022
1024 typedef struct MQTTResponse
1025 {
1026 int version; /* the version number of this structure */
1027 enum MQTTReasonCodes reasonCode; /* the MQTT 5.0 reason code returned */
1028 int reasonCodeCount; /* the number of reason codes. Used for subscribeMany5 and unsubscribeMany5 */
1029 enum MQTTReasonCodes* reasonCodes; /* a list of reason codes. Used for subscribeMany5 and unsubscribeMany5 */
1030 MQTTProperties* properties; /* optionally, the MQTT 5.0 properties returned */
1031 } MQTTResponse;
1032
1033 #define MQTTResponse_initializer {1, MQTTREASONCODE_SUCCESS, 0, NULL, NULL}
1034
1039 LIBMQTT_API void MQTTResponse_free(MQTTResponse response);
1040
1054 LIBMQTT_API MQTTResponse MQTTClient_connect5(MQTTClient handle, MQTTClient_connectOptions* options,
1055 MQTTProperties* connectProperties, MQTTProperties* willProperties);
1056
1075 LIBMQTT_API int MQTTClient_disconnect(MQTTClient handle, int timeout);
1076
1077 LIBMQTT_API int MQTTClient_disconnect5(MQTTClient handle, int timeout, enum MQTTReasonCodes reason, MQTTProperties* props);
1078
1086 LIBMQTT_API int MQTTClient_isConnected(MQTTClient handle);
1087
1088
1089 /* Subscribe is synchronous. QoS list parameter is changed on return to granted QoSs.
1090 Returns return code, MQTTCLIENT_SUCCESS == success, non-zero some sort of error (TBD) */
1091
1105 LIBMQTT_API int MQTTClient_subscribe(MQTTClient handle, const char* topic, int qos);
1106
1120 LIBMQTT_API MQTTResponse MQTTClient_subscribe5(MQTTClient handle, const char* topic, int qos,
1121 MQTTSubscribe_options* opts, MQTTProperties* props);
1122
1139 LIBMQTT_API int MQTTClient_subscribeMany(MQTTClient handle, int count, char* const* topic, int* qos);
1140
1157 LIBMQTT_API MQTTResponse MQTTClient_subscribeMany5(MQTTClient handle, int count, char* const* topic,
1158 int* qos, MQTTSubscribe_options* opts, MQTTProperties* props);
1159
1171 LIBMQTT_API int MQTTClient_unsubscribe(MQTTClient handle, const char* topic);
1172
1183 LIBMQTT_API MQTTResponse MQTTClient_unsubscribe5(MQTTClient handle, const char* topic, MQTTProperties* props);
1184
1196 LIBMQTT_API int MQTTClient_unsubscribeMany(MQTTClient handle, int count, char* const* topic);
1197
1209 LIBMQTT_API MQTTResponse MQTTClient_unsubscribeMany5(MQTTClient handle, int count, char* const* topic, MQTTProperties* props);
1210
1232 LIBMQTT_API int MQTTClient_publish(MQTTClient handle, const char* topicName, int payloadlen, const void* payload, int qos, int retained,
1233 MQTTClient_deliveryToken* dt);
1234
1256 LIBMQTT_API MQTTResponse MQTTClient_publish5(MQTTClient handle, const char* topicName, int payloadlen, const void* payload,
1257 int qos, int retained, MQTTProperties* properties, MQTTClient_deliveryToken* dt);
1277 LIBMQTT_API int MQTTClient_publishMessage(MQTTClient handle, const char* topicName, MQTTClient_message* msg, MQTTClient_deliveryToken* dt);
1278
1279
1299 LIBMQTT_API MQTTResponse MQTTClient_publishMessage5(MQTTClient handle, const char* topicName, MQTTClient_message* msg,
1300 MQTTClient_deliveryToken* dt);
1301
1317 LIBMQTT_API int MQTTClient_waitForCompletion(MQTTClient handle, MQTTClient_deliveryToken dt, unsigned long timeout);
1318
1319
1338 LIBMQTT_API int MQTTClient_getPendingDeliveryTokens(MQTTClient handle, MQTTClient_deliveryToken **tokens);
1339
1346 LIBMQTT_API void MQTTClient_yield(void);
1347
1379 LIBMQTT_API int MQTTClient_receive(MQTTClient handle, char** topicName, int* topicLen, MQTTClient_message** message,
1380 unsigned long timeout);
1381
1392 LIBMQTT_API void MQTTClient_freeMessage(MQTTClient_message** msg);
1393
1402 LIBMQTT_API void MQTTClient_free(void* ptr);
1403
1410 LIBMQTT_API void* MQTTClient_malloc(size_t size);
1411
1419 LIBMQTT_API void MQTTClient_destroy(MQTTClient* handle);
1420
1421
1422 enum MQTTCLIENT_TRACE_LEVELS
1423 {
1424 MQTTCLIENT_TRACE_MAXIMUM = 1,
1425 MQTTCLIENT_TRACE_MEDIUM,
1426 MQTTCLIENT_TRACE_MINIMUM,
1427 MQTTCLIENT_TRACE_PROTOCOL,
1428 MQTTCLIENT_TRACE_ERROR,
1429 MQTTCLIENT_TRACE_SEVERE,
1430 MQTTCLIENT_TRACE_FATAL,
1431 };
1432
1433
1439 LIBMQTT_API void MQTTClient_setTraceLevel(enum MQTTCLIENT_TRACE_LEVELS level);
1440
1441
1451 typedef void MQTTClient_traceCallback(enum MQTTCLIENT_TRACE_LEVELS level, char* message);
1452
1459 LIBMQTT_API void MQTTClient_setTraceCallback(MQTTClient_traceCallback* callback);
1460
1468 LIBMQTT_API int MQTTClient_setCommandTimeout(MQTTClient handle, unsigned long milliSeconds);
1469
1475 LIBMQTT_API const char* MQTTClient_strerror(int code);
1476
1477 #if defined(__cplusplus)
1478 }
1479 #endif
1480
1481 #endif
1482
MQTTResponse_free
void MQTTResponse_free(MQTTResponse response)
MQTTResponse
struct MQTTResponse MQTTResponse
MQTTClient_disconnect5
int MQTTClient_disconnect5(MQTTClient handle, int timeout, enum MQTTReasonCodes reason, MQTTProperties *props)
MQTTClient_disconnect
int MQTTClient_disconnect(MQTTClient handle, int timeout)
MQTTClient_free
void MQTTClient_free(void *ptr)
MQTTClient_global_init
void MQTTClient_global_init(MQTTClient_init_options *inits)
MQTTClient_setTraceCallback
void MQTTClient_setTraceCallback(MQTTClient_traceCallback *callback)
MQTTClient_getPendingDeliveryTokens
int MQTTClient_getPendingDeliveryTokens(MQTTClient handle, MQTTClient_deliveryToken **tokens)
MQTTClient_publishMessage5
MQTTResponse MQTTClient_publishMessage5(MQTTClient handle, const char *topicName, MQTTClient_message *msg, MQTTClient_deliveryToken *dt)
MQTTClient_disconnected
void MQTTClient_disconnected(void *context, MQTTProperties *properties, enum MQTTReasonCodes reasonCode)
Definition: MQTTClient.h:446
MQTTClient_unsubscribeMany5
MQTTResponse MQTTClient_unsubscribeMany5(MQTTClient handle, int count, char *const *topic, MQTTProperties *props)
MQTTClient_receive
int MQTTClient_receive(MQTTClient handle, char **topicName, int *topicLen, MQTTClient_message **message, unsigned long timeout)
MQTTClient_setTraceLevel
void MQTTClient_setTraceLevel(enum MQTTCLIENT_TRACE_LEVELS level)
MQTTClient_unsubscribeMany
int MQTTClient_unsubscribeMany(MQTTClient handle, int count, char *const *topic)
MQTTClient_subscribeMany5
MQTTResponse MQTTClient_subscribeMany5(MQTTClient handle, int count, char *const *topic, int *qos, MQTTSubscribe_options *opts, MQTTProperties *props)
MQTTClient_unsubscribe5
MQTTResponse MQTTClient_unsubscribe5(MQTTClient handle, const char *topic, MQTTProperties *props)
MQTTClient_connectionLost
void MQTTClient_connectionLost(void *context, char *cause)
Definition: MQTTClient.h:403
MQTTClient_published
void MQTTClient_published(void *context, int dt, int packet_type, MQTTProperties *properties, enum MQTTReasonCodes reasonCode)
Definition: MQTTClient.h:487
MQTTClient_isConnected
int MQTTClient_isConnected(MQTTClient handle)
MQTTClient_deliveryToken
int MQTTClient_deliveryToken
Definition: MQTTClient.h:262
MQTTClient
void * MQTTClient
Definition: MQTTClient.h:251
MQTTClient_publish5
MQTTResponse MQTTClient_publish5(MQTTClient handle, const char *topicName, int payloadlen, const void *payload, int qos, int retained, MQTTProperties *properties, MQTTClient_deliveryToken *dt)
MQTTClient_waitForCompletion
int MQTTClient_waitForCompletion(MQTTClient handle, MQTTClient_deliveryToken dt, unsigned long timeout)
MQTTClient_yield
void MQTTClient_yield(void)
MQTTClient_setDisconnected
int MQTTClient_setDisconnected(MQTTClient handle, void *context, MQTTClient_disconnected *co)
MQTTClient_token
int MQTTClient_token
Definition: MQTTClient.h:263
MQTTClient_subscribeMany
int MQTTClient_subscribeMany(MQTTClient handle, int count, char *const *topic, int *qos)
MQTTClient_setCommandTimeout
int MQTTClient_setCommandTimeout(MQTTClient handle, unsigned long milliSeconds)
MQTTClient_create
int MQTTClient_create(MQTTClient *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context)
MQTTClient_malloc
void * MQTTClient_malloc(size_t size)
MQTTClient_subscribe
int MQTTClient_subscribe(MQTTClient handle, const char *topic, int qos)
MQTTClient_strerror
const char * MQTTClient_strerror(int code)
MQTTClient_setPublished
int MQTTClient_setPublished(MQTTClient handle, void *context, MQTTClient_published *co)
MQTTCLIENT_TRACE_LEVELS
MQTTCLIENT_TRACE_LEVELS
Definition: MQTTClient.h:1423
MQTTCLIENT_TRACE_PROTOCOL
@ MQTTCLIENT_TRACE_PROTOCOL
Definition: MQTTClient.h:1427
MQTTCLIENT_TRACE_FATAL
@ MQTTCLIENT_TRACE_FATAL
Definition: MQTTClient.h:1430
MQTTCLIENT_TRACE_MAXIMUM
@ MQTTCLIENT_TRACE_MAXIMUM
Definition: MQTTClient.h:1424
MQTTCLIENT_TRACE_MEDIUM
@ MQTTCLIENT_TRACE_MEDIUM
Definition: MQTTClient.h:1425
MQTTCLIENT_TRACE_ERROR
@ MQTTCLIENT_TRACE_ERROR
Definition: MQTTClient.h:1428
MQTTCLIENT_TRACE_MINIMUM
@ MQTTCLIENT_TRACE_MINIMUM
Definition: MQTTClient.h:1426
MQTTCLIENT_TRACE_SEVERE
@ MQTTCLIENT_TRACE_SEVERE
Definition: MQTTClient.h:1429
MQTTClient_messageArrived
int MQTTClient_messageArrived(void *context, char *topicName, int topicLen, MQTTClient_message *message)
Definition: MQTTClient.h:364
MQTTClient_connect5
MQTTResponse MQTTClient_connect5(MQTTClient handle, MQTTClient_connectOptions *options, MQTTProperties *connectProperties, MQTTProperties *willProperties)
MQTTClient_unsubscribe
int MQTTClient_unsubscribe(MQTTClient handle, const char *topic)
MQTTClient_connect
int MQTTClient_connect(MQTTClient handle, MQTTClient_connectOptions *options)
MQTTClient_setCallbacks
int MQTTClient_setCallbacks(MQTTClient handle, void *context, MQTTClient_connectionLost *cl, MQTTClient_messageArrived *ma, MQTTClient_deliveryComplete *dc)
MQTTClient_freeMessage
void MQTTClient_freeMessage(MQTTClient_message **msg)
MQTTClient_getVersionInfo
MQTTClient_nameValue * MQTTClient_getVersionInfo(void)
MQTTClient_deliveryComplete
void MQTTClient_deliveryComplete(void *context, MQTTClient_deliveryToken dt)
Definition: MQTTClient.h:386
MQTTClient_publishMessage
int MQTTClient_publishMessage(MQTTClient handle, const char *topicName, MQTTClient_message *msg, MQTTClient_deliveryToken *dt)
MQTTClient_createWithOptions
int MQTTClient_createWithOptions(MQTTClient *handle, const char *serverURI, const char *clientId, int persistence_type, void *persistence_context, MQTTClient_createOptions *options)
MQTTClient_destroy
void MQTTClient_destroy(MQTTClient *handle)
MQTTClient_subscribe5
MQTTResponse MQTTClient_subscribe5(MQTTClient handle, const char *topic, int qos, MQTTSubscribe_options *opts, MQTTProperties *props)
MQTTClient_traceCallback
void MQTTClient_traceCallback(enum MQTTCLIENT_TRACE_LEVELS level, char *message)
Definition: MQTTClient.h:1451
MQTTClient_publish
int MQTTClient_publish(MQTTClient handle, const char *topicName, int payloadlen, const void *payload, int qos, int retained, MQTTClient_deliveryToken *dt)
MQTTClientPersistence.h
This structure represents a persistent data store, used to store outbound and inbound messages,...
MQTTProperties.h
MQTTReasonCodes.h
MQTTReasonCodes
MQTTReasonCodes
Definition: MQTTReasonCodes.h:23
MQTTSubscribeOpts.h
MQTTClient_SSLOptions
Definition: MQTTClient.h:672
MQTTClient_SSLOptions::trustStore
const char * trustStore
Definition: MQTTClient.h:686
MQTTClient_SSLOptions::struct_version
int struct_version
Definition: MQTTClient.h:683
MQTTClient_SSLOptions::disableDefaultTrustStore
int disableDefaultTrustStore
Definition: MQTTClient.h:764
MQTTClient_SSLOptions::ssl_error_context
void * ssl_error_context
Definition: MQTTClient.h:744
MQTTClient_SSLOptions::protos_len
unsigned int protos_len
Definition: MQTTClient.h:779
MQTTClient_SSLOptions::CApath
const char * CApath
Definition: MQTTClient.h:732
MQTTClient_SSLOptions::keyStore
const char * keyStore
Definition: MQTTClient.h:691
MQTTClient_SSLOptions::sslVersion
int sslVersion
Definition: MQTTClient.h:718
MQTTClient_SSLOptions::protos
const unsigned char * protos
Definition: MQTTClient.h:773
MQTTClient_SSLOptions::enableServerCertAuth
int enableServerCertAuth
Definition: MQTTClient.h:712
MQTTClient_SSLOptions::privateKey
const char * privateKey
Definition: MQTTClient.h:696
MQTTClient_SSLOptions::verify
int verify
Definition: MQTTClient.h:725
MQTTClient_SSLOptions::enabledCipherSuites
const char * enabledCipherSuites
Definition: MQTTClient.h:709
MQTTClient_SSLOptions::ssl_psk_context
void * ssl_psk_context
Definition: MQTTClient.h:757
MQTTClient_SSLOptions::privateKeyPassword
const char * privateKeyPassword
Definition: MQTTClient.h:699
MQTTClient_connectOptions
Definition: MQTTClient.h:825
MQTTClient_connectOptions::httpHeaders
const MQTTClient_nameValue * httpHeaders
Definition: MQTTClient.h:970
MQTTClient_connectOptions::cleansession
int cleansession
Definition: MQTTClient.h:870
MQTTClient_connectOptions::struct_version
int struct_version
Definition: MQTTClient.h:838
MQTTClient_connectOptions::will
MQTTClient_willOptions * will
Definition: MQTTClient.h:886
MQTTClient_connectOptions::data
const void * data
Definition: MQTTClient.h:957
MQTTClient_connectOptions::MQTTVersion
int MQTTVersion
Definition: MQTTClient.h:941
MQTTClient_connectOptions::serverURI
const char * serverURI
Definition: MQTTClient.h:947
MQTTClient_connectOptions::httpsProxy
const char * httpsProxy
Definition: MQTTClient.h:978
MQTTClient_connectOptions::connectTimeout
int connectTimeout
Definition: MQTTClient.h:902
MQTTClient_connectOptions::sessionPresent
int sessionPresent
Definition: MQTTClient.h:949
MQTTClient_connectOptions::ssl
MQTTClient_SSLOptions * ssl
Definition: MQTTClient.h:915
MQTTClient_connectOptions::reliable
int reliable
Definition: MQTTClient.h:880
MQTTClient_connectOptions::password
const char * password
Definition: MQTTClient.h:898
MQTTClient_connectOptions::serverURIcount
int serverURIcount
Definition: MQTTClient.h:919
MQTTClient_connectOptions::serverURIs
char *const * serverURIs
Definition: MQTTClient.h:933
MQTTClient_connectOptions::username
const char * username
Definition: MQTTClient.h:892
MQTTClient_connectOptions::retryInterval
int retryInterval
Definition: MQTTClient.h:910
MQTTClient_connectOptions::keepAliveInterval
int keepAliveInterval
Definition: MQTTClient.h:848
MQTTClient_connectOptions::cleanstart
int cleanstart
Definition: MQTTClient.h:966
MQTTClient_connectOptions::httpProxy
const char * httpProxy
Definition: MQTTClient.h:974
MQTTClient_connectOptions::maxInflightMessages
int maxInflightMessages
Definition: MQTTClient.h:962
MQTTClient_connectOptions::len
int len
Definition: MQTTClient.h:956
MQTTClient_createOptions
Definition: MQTTClient.h:549
MQTTClient_createOptions::struct_version
int struct_version
Definition: MQTTClient.h:553
MQTTClient_createOptions::MQTTVersion
int MQTTVersion
Definition: MQTTClient.h:559
MQTTClient_init_options
Definition: MQTTClient.h:230
MQTTClient_init_options::struct_version
int struct_version
Definition: MQTTClient.h:234
MQTTClient_init_options::do_openssl_init
int do_openssl_init
Definition: MQTTClient.h:236
MQTTClient_message
Definition: MQTTClient.h:272
MQTTClient_message::struct_version
int struct_version
Definition: MQTTClient.h:277
MQTTClient_message::properties
MQTTProperties properties
Definition: MQTTClient.h:329
MQTTClient_message::qos
int qos
Definition: MQTTClient.h:295
MQTTClient_message::msgid
int msgid
Definition: MQTTClient.h:325
MQTTClient_message::retained
int retained
Definition: MQTTClient.h:314
MQTTClient_message::payload
void * payload
Definition: MQTTClient.h:281
MQTTClient_message::payloadlen
int payloadlen
Definition: MQTTClient.h:279
MQTTClient_message::dup
int dup
Definition: MQTTClient.h:321
MQTTClient_nameValue
Definition: MQTTClient.h:792
MQTTClient_nameValue::value
const char * value
Definition: MQTTClient.h:794
MQTTClient_nameValue::name
const char * name
Definition: MQTTClient.h:793
MQTTClient_willOptions
Definition: MQTTClient.h:624
MQTTClient_willOptions::struct_version
int struct_version
Definition: MQTTClient.h:630
MQTTClient_willOptions::data
const void * data
Definition: MQTTClient.h:648
MQTTClient_willOptions::topicName
const char * topicName
Definition: MQTTClient.h:632
MQTTClient_willOptions::message
const char * message
Definition: MQTTClient.h:634
MQTTClient_willOptions::qos
int qos
Definition: MQTTClient.h:643
MQTTClient_willOptions::retained
int retained
Definition: MQTTClient.h:638
MQTTClient_willOptions::len
int len
Definition: MQTTClient.h:647
MQTTProperties
Definition: MQTTProperties.h:113
MQTTResponse
Definition: MQTTClient.h:1025
MQTTResponse::reasonCodes
enum MQTTReasonCodes * reasonCodes
Definition: MQTTClient.h:1029
MQTTResponse::reasonCode
enum MQTTReasonCodes reasonCode
Definition: MQTTClient.h:1027
MQTTResponse::properties
MQTTProperties * properties
Definition: MQTTClient.h:1030
MQTTResponse::version
int version
Definition: MQTTClient.h:1026
MQTTResponse::reasonCodeCount
int reasonCodeCount
Definition: MQTTClient.h:1028
MQTTSubscribe_options
Definition: MQTTSubscribeOpts.h:22