| Paho MQTT C Client Library

Loading...
Searching...
No Matches
MQTTClient.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (c) 2009, 2025 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
106
107/*
109*/
110#if !defined(MQTTCLIENT_H)
111#define MQTTCLIENT_H
112
113#if defined(__cplusplus)
114 extern "C" {
115#endif
116
117#include <stdio.h>
118/*
120*/
121
122#include "MQTTExportDeclarations.h"
123
124#include "MQTTProperties.h"
125#include "MQTTReasonCodes.h"
126#include "MQTTSubscribeOpts.h"
127#if !defined(NO_PERSISTENCE)
128#include "MQTTClientPersistence.h"
129#else
130#define MQTTCLIENT_PERSISTENCE_NONE 1
131#endif
132
137#define MQTTCLIENT_SUCCESS 0
142#define MQTTCLIENT_FAILURE -1
143
144/* error code -2 is MQTTCLIENT_PERSISTENCE_ERROR */
145
149#define MQTTCLIENT_DISCONNECTED -3
154#define MQTTCLIENT_MAX_MESSAGES_INFLIGHT -4
158#define MQTTCLIENT_BAD_UTF8_STRING -5
162#define MQTTCLIENT_NULL_PARAMETER -6
168#define MQTTCLIENT_TOPICNAME_TRUNCATED -7
173#define MQTTCLIENT_BAD_STRUCTURE -8
177#define MQTTCLIENT_BAD_QOS -9
181#define MQTTCLIENT_SSL_NOT_SUPPORTED -10
185 #define MQTTCLIENT_BAD_MQTT_VERSION -11
195#define MQTTCLIENT_BAD_PROTOCOL -14
199 #define MQTTCLIENT_BAD_MQTT_OPTION -15
203 #define MQTTCLIENT_WRONG_MQTT_VERSION -16
207 #define MQTTCLIENT_0_LEN_WILL_TOPIC -17
208
209
213#define MQTTVERSION_DEFAULT 0
217#define MQTTVERSION_3_1 3
221#define MQTTVERSION_3_1_1 4
225 #define MQTTVERSION_5 5
229#define MQTT_BAD_SUBSCRIBE 0x80
230
234 typedef struct
235{
237 char struct_id[4];
239 int struct_version;
241 int do_openssl_init;
242} MQTTClient_init_options;
243
244#define MQTTClient_init_options_initializer { {'M', 'Q', 'T', 'G'}, 0, 0 }
245
250LIBMQTT_API void MQTTClient_global_init(MQTTClient_init_options* inits);
251
256 typedef void* MQTTClient;
267 typedef int MQTTClient_deliveryToken;
268 typedef int MQTTClient_token;
269
276 typedef struct
277{
279 char struct_id[4];
282 int struct_version;
284 int payloadlen;
286 void* payload;
300 int qos;
319 int retained;
326 int dup;
330 int msgid;
334 MQTTProperties properties;
335} MQTTClient_message;
336
337#define MQTTClient_message_initializer { {'M', 'Q', 'T', 'M'}, 1, 0, NULL, 0, 0, 0, 0, MQTTProperties_initializer }
338
369 typedef int MQTTClient_messageArrived(void* context, char* topicName, int topicLen, MQTTClient_message* message);
370
391 typedef void MQTTClient_deliveryComplete(void* context, MQTTClient_deliveryToken dt);
392
408 typedef void MQTTClient_connectionLost(void* context, char* cause);
409
439LIBMQTT_API int MQTTClient_setCallbacks(MQTTClient handle, void* context, MQTTClient_connectionLost* cl,
440 MQTTClient_messageArrived* ma, MQTTClient_deliveryComplete* dc);
441
442
452 typedef void MQTTClient_disconnected(void* context, MQTTProperties* properties,
453 enum MQTTReasonCodes reasonCode);
454
468LIBMQTT_API int MQTTClient_setDisconnected(MQTTClient handle, void* context, MQTTClient_disconnected* co);
469
493 typedef void MQTTClient_published(void* context, int dt, int packet_type, MQTTProperties* properties,
494 enum MQTTReasonCodes reasonCode);
495
496LIBMQTT_API int MQTTClient_setPublished(MQTTClient handle, void* context, MQTTClient_published* co);
497
550LIBMQTT_API int MQTTClient_create(MQTTClient* handle, const char* serverURI, const char* clientId,
551 int persistence_type, void* persistence_context);
552
554 typedef struct
555{
557 char struct_id[4];
559 int struct_version;
565 int MQTTVersion;
566} MQTTClient_createOptions;
567
568#define MQTTClient_createOptions_initializer { {'M', 'Q', 'C', 'O'}, 0, MQTTVERSION_DEFAULT }
569
614LIBMQTT_API int MQTTClient_createWithOptions(MQTTClient* handle, const char* serverURI, const char* clientId,
615 int persistence_type, void* persistence_context, MQTTClient_createOptions* options);
616
629 typedef struct
630{
632 char struct_id[4];
636 int struct_version;
638 const char* topicName;
640 const char* message;
644 int retained;
649 int qos;
651 struct
652 {
653 int len;
654 const void* data;
655 } payload;
656} MQTTClient_willOptions;
657
658#define MQTTClient_willOptions_initializer { {'M', 'Q', 'T', 'W'}, 1, NULL, NULL, 0, 0, {0, NULL} }
659
660#define MQTT_SSL_VERSION_DEFAULT 0
661#define MQTT_SSL_VERSION_TLS_1_0 1
662#define MQTT_SSL_VERSION_TLS_1_1 2
663#define MQTT_SSL_VERSION_TLS_1_2 3
664
677 typedef struct
678{
680 char struct_id[4];
681
689 int struct_version;
690
692 const char* trustStore;
693
697 const char* keyStore;
698
702 const char* privateKey;
703
705 const char* privateKeyPassword;
706
715 const char* enabledCipherSuites;
716
718 int enableServerCertAuth;
719
724 int sslVersion;
725
731 int verify;
732
738 const char* CApath;
739
744 int (*ssl_error_cb) (const char *str, size_t len, void *u);
745
750 void* ssl_error_context;
751
757 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);
758
763 void* ssl_psk_context;
764
770 int disableDefaultTrustStore;
771
779 const unsigned char *protos;
780
785 unsigned int protos_len;
786} MQTTClient_SSLOptions;
787
788#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 }
789
796
797 typedef struct
798{
799 const char* name;
800 const char* value;
801} MQTTClient_nameValue;
802
808LIBMQTT_API MQTTClient_nameValue* MQTTClient_getVersionInfo(void);
809
830 typedef struct
831{
833 char struct_id[4];
844 int struct_version;
854 int keepAliveInterval;
876 int cleansession;
886 int reliable;
892 MQTTClient_willOptions* will;
898 const char* username;
904 const char* password;
908 int connectTimeout;
916 int retryInterval;
921 MQTTClient_SSLOptions* ssl;
925 int serverURIcount;
939 char* const* serverURIs;
947 int MQTTVersion;
951 struct
952 {
953 const char* serverURI;
954 int MQTTVersion;
955 int sessionPresent;
956 } returned;
960 struct
961 {
962 int len;
963 const void* data;
964 } binarypwd;
968 int maxInflightMessages;
969 /*
970 * MQTT V5 clean start flag. Only clears state at the beginning of the session.
971 */
972 int cleanstart;
976 const MQTTClient_nameValue* httpHeaders;
982 const char* httpProxy;
986 const char* httpsProxy;
987} MQTTClient_connectOptions;
988
990#define MQTTClient_connectOptions_initializer { {'M', 'Q', 'T', 'C'}, 8, 60, 1, 1, NULL, NULL, NULL, 30, 0, NULL,\
991 0, NULL, MQTTVERSION_DEFAULT, {NULL, 0, 0}, {0, NULL}, -1, 0, NULL, NULL, NULL}
992
994#define MQTTClient_connectOptions_initializer5 { {'M', 'Q', 'T', 'C'}, 8, 60, 0, 1, NULL, NULL, NULL, 30, 0, NULL,\
995 0, NULL, MQTTVERSION_5, {NULL, 0, 0}, {0, NULL}, -1, 1, NULL, NULL, NULL}
996
1000#define MQTTClient_connectOptions_initializer_ws { {'M', 'Q', 'T', 'C'}, 8, 45, 1, 1, NULL, NULL, NULL, 30, 0, NULL,\
1001 0, NULL, MQTTVERSION_DEFAULT, {NULL, 0, 0}, {0, NULL}, -1, 0, NULL, NULL, NULL}
1002
1006#define MQTTClient_connectOptions_initializer5_ws { {'M', 'Q', 'T', 'C'}, 8, 45, 0, 1, NULL, NULL, NULL, 30, 0, NULL,\
1007 0, NULL, MQTTVERSION_5, {NULL, 0, 0}, {0, NULL}, -1, 1, NULL, NULL, NULL}
1008
1029LIBMQTT_API int MQTTClient_connect(MQTTClient handle, MQTTClient_connectOptions* options);
1030
1032 typedef struct MQTTResponse
1033{
1034 int version; /* the version number of this structure */
1035 enum MQTTReasonCodes reasonCode; /* the MQTT 5.0 reason code returned */
1036 int reasonCodeCount; /* the number of reason codes. Used for subscribeMany5 and unsubscribeMany5 */
1037 enum MQTTReasonCodes* reasonCodes; /* a list of reason codes. Used for subscribeMany5 and unsubscribeMany5 */
1038 MQTTProperties* properties; /* optionally, the MQTT 5.0 properties returned */
1039} MQTTResponse;
1040
1041#define MQTTResponse_initializer {1, MQTTREASONCODE_SUCCESS, 0, NULL, NULL}
1042
1047LIBMQTT_API void MQTTResponse_free(MQTTResponse response);
1048
1062LIBMQTT_API MQTTResponse MQTTClient_connect5(MQTTClient handle, MQTTClient_connectOptions* options,
1063 MQTTProperties* connectProperties, MQTTProperties* willProperties);
1064
1083LIBMQTT_API int MQTTClient_disconnect(MQTTClient handle, int timeout);
1084
1085LIBMQTT_API int MQTTClient_disconnect5(MQTTClient handle, int timeout, enum MQTTReasonCodes reason, MQTTProperties* props);
1086
1094LIBMQTT_API int MQTTClient_isConnected(MQTTClient handle);
1095
1096
1097/* Subscribe is synchronous. QoS list parameter is changed on return to granted QoSs.
1098 Returns return code, MQTTCLIENT_SUCCESS == success, non-zero some sort of error (TBD) */
1099
1113LIBMQTT_API int MQTTClient_subscribe(MQTTClient handle, const char* topic, int qos);
1114
1128LIBMQTT_API MQTTResponse MQTTClient_subscribe5(MQTTClient handle, const char* topic, int qos,
1129 MQTTSubscribe_options* opts, MQTTProperties* props);
1130
1147LIBMQTT_API int MQTTClient_subscribeMany(MQTTClient handle, int count, char* const* topic, int* qos);
1148
1165LIBMQTT_API MQTTResponse MQTTClient_subscribeMany5(MQTTClient handle, int count, char* const* topic,
1166 int* qos, MQTTSubscribe_options* opts, MQTTProperties* props);
1167
1179LIBMQTT_API int MQTTClient_unsubscribe(MQTTClient handle, const char* topic);
1180
1191LIBMQTT_API MQTTResponse MQTTClient_unsubscribe5(MQTTClient handle, const char* topic, MQTTProperties* props);
1192
1204LIBMQTT_API int MQTTClient_unsubscribeMany(MQTTClient handle, int count, char* const* topic);
1205
1217LIBMQTT_API MQTTResponse MQTTClient_unsubscribeMany5(MQTTClient handle, int count, char* const* topic, MQTTProperties* props);
1218
1240LIBMQTT_API int MQTTClient_publish(MQTTClient handle, const char* topicName, int payloadlen, const void* payload, int qos, int retained,
1241 MQTTClient_deliveryToken* dt);
1242
1264LIBMQTT_API MQTTResponse MQTTClient_publish5(MQTTClient handle, const char* topicName, int payloadlen, const void* payload,
1265 int qos, int retained, MQTTProperties* properties, MQTTClient_deliveryToken* dt);
1285LIBMQTT_API int MQTTClient_publishMessage(MQTTClient handle, const char* topicName, MQTTClient_message* msg, MQTTClient_deliveryToken* dt);
1286
1287
1307LIBMQTT_API MQTTResponse MQTTClient_publishMessage5(MQTTClient handle, const char* topicName, MQTTClient_message* msg,
1308 MQTTClient_deliveryToken* dt);
1309
1325LIBMQTT_API int MQTTClient_waitForCompletion(MQTTClient handle, MQTTClient_deliveryToken dt, unsigned long timeout);
1326
1327
1346LIBMQTT_API int MQTTClient_getPendingDeliveryTokens(MQTTClient handle, MQTTClient_deliveryToken **tokens);
1347
1354LIBMQTT_API void MQTTClient_yield(void);
1355
1387LIBMQTT_API int MQTTClient_receive(MQTTClient handle, char** topicName, int* topicLen, MQTTClient_message** message,
1388 unsigned long timeout);
1389
1400LIBMQTT_API void MQTTClient_freeMessage(MQTTClient_message** msg);
1401
1410LIBMQTT_API void MQTTClient_free(void* ptr);
1411
1418LIBMQTT_API void* MQTTClient_malloc(size_t size);
1419
1427LIBMQTT_API void MQTTClient_destroy(MQTTClient* handle);
1428
1429
1430 enum MQTTCLIENT_TRACE_LEVELS
1431{
1432 MQTTCLIENT_TRACE_MAXIMUM = 1,
1433 MQTTCLIENT_TRACE_MEDIUM,
1434 MQTTCLIENT_TRACE_MINIMUM,
1435 MQTTCLIENT_TRACE_PROTOCOL,
1436 MQTTCLIENT_TRACE_ERROR,
1437 MQTTCLIENT_TRACE_SEVERE,
1438 MQTTCLIENT_TRACE_FATAL,
1439};
1440
1441
1447LIBMQTT_API void MQTTClient_setTraceLevel(enum MQTTCLIENT_TRACE_LEVELS level);
1448
1449
1459 typedef void MQTTClient_traceCallback(enum MQTTCLIENT_TRACE_LEVELS level, char* message);
1460
1467LIBMQTT_API void MQTTClient_setTraceCallback(MQTTClient_traceCallback* callback);
1468
1476LIBMQTT_API int MQTTClient_setCommandTimeout(MQTTClient handle, unsigned long milliSeconds);
1477
1483LIBMQTT_API const char* MQTTClient_strerror(int code);
1484
1485#if defined(__cplusplus)
1486 }
1487#endif
1488
1489#endif
1490
MQTTResponse_free
void MQTTResponse_free(MQTTResponse response)
MQTTClient_disconnect5
int MQTTClient_disconnect5(MQTTClient handle, int timeout, enum MQTTReasonCodes reason, MQTTProperties *props)
MQTTClient_disconnect
int MQTTClient_disconnect(MQTTClient handle, int timeout)
MQTTClient_malloc
void * MQTTClient_malloc(size_t size)
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:452
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_strerror
const char * MQTTClient_strerror(int code)
MQTTClient_connectionLost
void MQTTClient_connectionLost(void *context, char *cause)
Definition MQTTClient.h:408
MQTTClient_published
void MQTTClient_published(void *context, int dt, int packet_type, MQTTProperties *properties, enum MQTTReasonCodes reasonCode)
Definition MQTTClient.h:493
MQTTClient_isConnected
int MQTTClient_isConnected(MQTTClient handle)
MQTTClient_deliveryToken
int MQTTClient_deliveryToken
Definition MQTTClient.h:267
MQTTClient
void * MQTTClient
Definition MQTTClient.h:256
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:268
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_subscribe
int MQTTClient_subscribe(MQTTClient handle, const char *topic, int qos)
MQTTClient_setPublished
int MQTTClient_setPublished(MQTTClient handle, void *context, MQTTClient_published *co)
MQTTCLIENT_TRACE_LEVELS
MQTTCLIENT_TRACE_LEVELS
Definition MQTTClient.h:1431
MQTTCLIENT_TRACE_PROTOCOL
@ MQTTCLIENT_TRACE_PROTOCOL
Definition MQTTClient.h:1435
MQTTCLIENT_TRACE_FATAL
@ MQTTCLIENT_TRACE_FATAL
Definition MQTTClient.h:1438
MQTTCLIENT_TRACE_MAXIMUM
@ MQTTCLIENT_TRACE_MAXIMUM
Definition MQTTClient.h:1432
MQTTCLIENT_TRACE_MEDIUM
@ MQTTCLIENT_TRACE_MEDIUM
Definition MQTTClient.h:1433
MQTTCLIENT_TRACE_ERROR
@ MQTTCLIENT_TRACE_ERROR
Definition MQTTClient.h:1436
MQTTCLIENT_TRACE_MINIMUM
@ MQTTCLIENT_TRACE_MINIMUM
Definition MQTTClient.h:1434
MQTTCLIENT_TRACE_SEVERE
@ MQTTCLIENT_TRACE_SEVERE
Definition MQTTClient.h:1437
MQTTClient_messageArrived
int MQTTClient_messageArrived(void *context, char *topicName, int topicLen, MQTTClient_message *message)
Definition MQTTClient.h:369
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_deliveryComplete
void MQTTClient_deliveryComplete(void *context, MQTTClient_deliveryToken dt)
Definition MQTTClient.h:391
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_getVersionInfo
MQTTClient_nameValue * MQTTClient_getVersionInfo(void)
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:1459
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:678
MQTTClient_SSLOptions::trustStore
const char * trustStore
Definition MQTTClient.h:692
MQTTClient_SSLOptions::struct_version
int struct_version
Definition MQTTClient.h:689
MQTTClient_SSLOptions::disableDefaultTrustStore
int disableDefaultTrustStore
Definition MQTTClient.h:770
MQTTClient_SSLOptions::ssl_error_context
void * ssl_error_context
Definition MQTTClient.h:750
MQTTClient_SSLOptions::ssl_error_cb
int(* ssl_error_cb)(const char *str, size_t len, void *u)
Definition MQTTClient.h:744
MQTTClient_SSLOptions::protos_len
unsigned int protos_len
Definition MQTTClient.h:785
MQTTClient_SSLOptions::CApath
const char * CApath
Definition MQTTClient.h:738
MQTTClient_SSLOptions::keyStore
const char * keyStore
Definition MQTTClient.h:697
MQTTClient_SSLOptions::sslVersion
int sslVersion
Definition MQTTClient.h:724
MQTTClient_SSLOptions::protos
const unsigned char * protos
Definition MQTTClient.h:779
MQTTClient_SSLOptions::enableServerCertAuth
int enableServerCertAuth
Definition MQTTClient.h:718
MQTTClient_SSLOptions::privateKey
const char * privateKey
Definition MQTTClient.h:702
MQTTClient_SSLOptions::ssl_psk_cb
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)
Definition MQTTClient.h:757
MQTTClient_SSLOptions::verify
int verify
Definition MQTTClient.h:731
MQTTClient_SSLOptions::struct_id
char struct_id[4]
Definition MQTTClient.h:680
MQTTClient_SSLOptions::enabledCipherSuites
const char * enabledCipherSuites
Definition MQTTClient.h:715
MQTTClient_SSLOptions::ssl_psk_context
void * ssl_psk_context
Definition MQTTClient.h:763
MQTTClient_SSLOptions::privateKeyPassword
const char * privateKeyPassword
Definition MQTTClient.h:705
MQTTClient_connectOptions
Definition MQTTClient.h:831
MQTTClient_connectOptions::httpHeaders
const MQTTClient_nameValue * httpHeaders
Definition MQTTClient.h:976
MQTTClient_connectOptions::cleansession
int cleansession
Definition MQTTClient.h:876
MQTTClient_connectOptions::struct_version
int struct_version
Definition MQTTClient.h:844
MQTTClient_connectOptions::will
MQTTClient_willOptions * will
Definition MQTTClient.h:892
MQTTClient_connectOptions::data
const void * data
Definition MQTTClient.h:963
MQTTClient_connectOptions::MQTTVersion
int MQTTVersion
Definition MQTTClient.h:947
MQTTClient_connectOptions::serverURI
const char * serverURI
Definition MQTTClient.h:953
MQTTClient_connectOptions::httpsProxy
const char * httpsProxy
Definition MQTTClient.h:986
MQTTClient_connectOptions::connectTimeout
int connectTimeout
Definition MQTTClient.h:908
MQTTClient_connectOptions::sessionPresent
int sessionPresent
Definition MQTTClient.h:955
MQTTClient_connectOptions::ssl
MQTTClient_SSLOptions * ssl
Definition MQTTClient.h:921
MQTTClient_connectOptions::reliable
int reliable
Definition MQTTClient.h:886
MQTTClient_connectOptions::password
const char * password
Definition MQTTClient.h:904
MQTTClient_connectOptions::struct_id
char struct_id[4]
Definition MQTTClient.h:833
MQTTClient_connectOptions::serverURIcount
int serverURIcount
Definition MQTTClient.h:925
MQTTClient_connectOptions::serverURIs
char *const * serverURIs
Definition MQTTClient.h:939
MQTTClient_connectOptions::username
const char * username
Definition MQTTClient.h:898
MQTTClient_connectOptions::retryInterval
int retryInterval
Definition MQTTClient.h:916
MQTTClient_connectOptions::keepAliveInterval
int keepAliveInterval
Definition MQTTClient.h:854
MQTTClient_connectOptions::cleanstart
int cleanstart
Definition MQTTClient.h:972
MQTTClient_connectOptions::httpProxy
const char * httpProxy
Definition MQTTClient.h:982
MQTTClient_connectOptions::maxInflightMessages
int maxInflightMessages
Definition MQTTClient.h:968
MQTTClient_connectOptions::len
int len
Definition MQTTClient.h:962
MQTTClient_createOptions
Definition MQTTClient.h:555
MQTTClient_createOptions::struct_version
int struct_version
Definition MQTTClient.h:559
MQTTClient_createOptions::MQTTVersion
int MQTTVersion
Definition MQTTClient.h:565
MQTTClient_createOptions::struct_id
char struct_id[4]
Definition MQTTClient.h:557
MQTTClient_init_options
Definition MQTTClient.h:235
MQTTClient_init_options::struct_version
int struct_version
Definition MQTTClient.h:239
MQTTClient_init_options::do_openssl_init
int do_openssl_init
Definition MQTTClient.h:241
MQTTClient_init_options::struct_id
char struct_id[4]
Definition MQTTClient.h:237
MQTTClient_message
Definition MQTTClient.h:277
MQTTClient_message::struct_version
int struct_version
Definition MQTTClient.h:282
MQTTClient_message::properties
MQTTProperties properties
Definition MQTTClient.h:334
MQTTClient_message::qos
int qos
Definition MQTTClient.h:300
MQTTClient_message::msgid
int msgid
Definition MQTTClient.h:330
MQTTClient_message::retained
int retained
Definition MQTTClient.h:319
MQTTClient_message::payload
void * payload
Definition MQTTClient.h:286
MQTTClient_message::payloadlen
int payloadlen
Definition MQTTClient.h:284
MQTTClient_message::struct_id
char struct_id[4]
Definition MQTTClient.h:279
MQTTClient_message::dup
int dup
Definition MQTTClient.h:326
MQTTClient_nameValue
Definition MQTTClient.h:798
MQTTClient_nameValue::value
const char * value
Definition MQTTClient.h:800
MQTTClient_nameValue::name
const char * name
Definition MQTTClient.h:799
MQTTClient_willOptions
Definition MQTTClient.h:630
MQTTClient_willOptions::struct_version
int struct_version
Definition MQTTClient.h:636
MQTTClient_willOptions::data
const void * data
Definition MQTTClient.h:654
MQTTClient_willOptions::topicName
const char * topicName
Definition MQTTClient.h:638
MQTTClient_willOptions::message
const char * message
Definition MQTTClient.h:640
MQTTClient_willOptions::qos
int qos
Definition MQTTClient.h:649
MQTTClient_willOptions::retained
int retained
Definition MQTTClient.h:644
MQTTClient_willOptions::struct_id
char struct_id[4]
Definition MQTTClient.h:632
MQTTClient_willOptions::len
int len
Definition MQTTClient.h:653
MQTTProperties
Definition MQTTProperties.h:116
MQTTResponse
Definition MQTTClient.h:1033
MQTTResponse::reasonCodes
enum MQTTReasonCodes * reasonCodes
Definition MQTTClient.h:1037
MQTTResponse::reasonCode
enum MQTTReasonCodes reasonCode
Definition MQTTClient.h:1035
MQTTResponse::properties
MQTTProperties * properties
Definition MQTTClient.h:1038
MQTTResponse::version
int version
Definition MQTTClient.h:1034
MQTTResponse::reasonCodeCount
int reasonCodeCount
Definition MQTTClient.h:1036
MQTTSubscribe_options
Definition MQTTSubscribeOpts.h:22