From 2fdb5a01715834d714f1be7307e4eda4772173f9 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Tue, 18 Aug 2020 21:07:03 +0000 Subject: [PATCH] docs: move _string_option with rest of client options It was grouped with the callbacks, where it didn't make a lot of sense. Signed-off-by: Karl Palsson --- lib/mosquitto.h | 67 ++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/lib/mosquitto.h b/lib/mosquitto.h index 262c523e..93793fa5 100644 --- a/lib/mosquitto.h +++ b/lib/mosquitto.h @@ -1511,6 +1511,39 @@ libmosq_EXPORT int mosquitto_int_option(struct mosquitto *mosq, enum mosq_opt_t */ libmosq_EXPORT int mosquitto_void_option(struct mosquitto *mosq, enum mosq_opt_t option, void *value); +/* + * Function: mosquitto_string_option + * + * Used to set const char* options for the client. + * + * Parameters: + * mosq - a valid mosquitto instance. + * option - the option to set. + * value - the option specific value. + * + * Options: + * MOSQ_OPT_TLS_ENGINE + * Configure the client for TLS Engine support. Pass a TLS Engine ID + * to be used when creating TLS connections. + * Must be set before . + * MOSQ_OPT_TLS_KEYFORM + * Configure the client to treat the keyfile differently depending + * on its type. Must be set before . + * Set as either "pem" or "engine", to determine from where the + * private key for a TLS connection will be obtained. Defaults to + * "pem", a normal private key file. + * MOSQ_OPT_TLS_KPASS_SHA1 + * Where the TLS Engine requires the use of a password to be + * accessed, this option allows a hex encoded SHA1 hash of the + * private key password to be passed to the engine directly. + * Must be set before . + * MOSQ_OPT_TLS_ALPN + * If the broker being connected to has multiple services available + * on a single TLS port, such as both MQTT and WebSockets, use this + * option to configure the ALPN option for the connection. + */ +libmosq_EXPORT int mosquitto_string_option(struct mosquitto *mosq, enum mosq_opt_t option, const char *value); + /* * Function: mosquitto_reconnect_delay_set @@ -2063,40 +2096,6 @@ libmosq_EXPORT void mosquitto_unsubscribe_v5_callback_set(struct mosquitto *mosq */ libmosq_EXPORT void mosquitto_log_callback_set(struct mosquitto *mosq, void (*on_log)(struct mosquitto *, void *, int, const char *)); -/* - * Function: mosquitto_string_option - * - * Used to set const char* options for the client. - * - * Parameters: - * mosq - a valid mosquitto instance. - * option - the option to set. - * value - the option specific value. - * - * Options: - * MOSQ_OPT_TLS_ENGINE - * Configure the client for TLS Engine support. Pass a TLS Engine ID - * to be used when creating TLS connections. - * Must be set before . - * MOSQ_OPT_TLS_KEYFORM - * Configure the client to treat the keyfile differently depending - * on its type. Must be set before . - * Set as either "pem" or "engine", to determine from where the - * private key for a TLS connection will be obtained. Defaults to - * "pem", a normal private key file. - * MOSQ_OPT_TLS_KPASS_SHA1 - * Where the TLS Engine requires the use of a password to be - * accessed, this option allows a hex encoded SHA1 hash of the - * private key password to be passed to the engine directly. - * Must be set before . - * MOSQ_OPT_TLS_ALPN - * If the broker being connected to has multiple services available - * on a single TLS port, such as both MQTT and WebSockets, use this - * option to configure the ALPN option for the connection. - */ -libmosq_EXPORT int mosquitto_string_option(struct mosquitto *mosq, enum mosq_opt_t option, const char *value); - - /* ============================================================================= *