CommsChampion Ecosystem MQTT v5 Client
MQTT v5 Client Library.
Loading...
Searching...
No Matches
client.h
Go to the documentation of this file.
1//
2// Copyright 2023 - 2024 (C). Alex Robenko. All rights reserved.
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
10
11#pragma once
12
13#include "cc_mqtt5_client/common.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif // #ifdef __cplusplus
18
27
35
44
59
72unsigned cc_mqtt5_client_process_data(CC_Mqtt5ClientHandle handle, const unsigned char* buf, unsigned bufLen);
73
80
88
95
101
108CC_Mqtt5ErrorCode cc_mqtt5_client_pub_topic_alias_alloc(CC_Mqtt5ClientHandle handle, const char* topic, unsigned qos0RegsCount);
109
116
122
129
136
142
149
155
162
168
173
187
192
197
202
207
212
219
225
233
242
251
260
267
275
287
296
312 const CC_Mqtt5ConnectBasicConfig* basicConfig,
314 void* cbData);
315
337 const CC_Mqtt5ConnectBasicConfig* basicConfig,
338 const CC_Mqtt5ConnectWillConfig* willConfig,
339 const CC_Mqtt5ConnectExtraConfig* extraConfig,
340 const CC_Mqtt5AuthConfig* authConfig,
342 void* cbData);
343
348
359
364
373
380
387
394
407 const CC_Mqtt5DisconnectConfig* config);
408
418
425
431
436
441
448
456
463
476
485
501 const CC_Mqtt5SubscribeTopicConfig* topicConfig,
503 void* cbData);
504
523 const CC_Mqtt5SubscribeTopicConfig* topicConfigs,
524 unsigned topicConfigsCount,
525 const CC_Mqtt5SubscribeExtraConfig* extraConfig,
527 void* cbData);
528
538
545
551
556
563
570
583
592
608 const CC_Mqtt5UnsubscribeTopicConfig* topicConfig,
610 void* cbData);
611
628 const CC_Mqtt5UnsubscribeTopicConfig* topicConfigs,
629 unsigned topicConfigsCount,
631 void* cbData);
632
642
648
653
658
665
671
679
685
694
703
710
722
731
741
757 const CC_Mqtt5PublishBasicConfig* basicConfig,
759 void* cbData);
760
778 const CC_Mqtt5PublishBasicConfig* basicConfig,
779 const CC_Mqtt5PublishExtraConfig* extraConfig,
781 void* cbData);
782
792
798
809
814
821
827
836
843
855
864
880 const CC_Mqtt5AuthConfig* config,
882 void* cbData);
883
884// --------------------- Callbacks ---------------------
885
898 void* data);
899
913 void* data);
914
926 void* data);
927
936 void* data);
937
946 void* data);
947
956 void* data);
957
958#ifdef __cplusplus
959}
960#endif
void cc_mqtt5_client_set_cancel_next_tick_wait_callback(CC_Mqtt5ClientHandle handle, CC_Mqtt5CancelNextTickWaitCb cb, void *data)
Set callback to terminate current time measurement.
void cc_mqtt5_client_set_send_output_data_callback(CC_Mqtt5ClientHandle handle, CC_Mqtt5SendOutputDataCb cb, void *data)
Set callback to send raw data over I/O link.
void cc_mqtt5_client_set_broker_disconnect_report_callback(CC_Mqtt5ClientHandle handle, CC_Mqtt5BrokerDisconnectReportCb cb, void *data)
Set callback to report unsolicited disconnection of the broker.
void cc_mqtt5_client_set_next_tick_program_callback(CC_Mqtt5ClientHandle handle, CC_Mqtt5NextTickProgramCb cb, void *data)
Set callback to call when time measurement is required.
void cc_mqtt5_client_set_message_received_report_callback(CC_Mqtt5ClientHandle handle, CC_Mqtt5MessageReceivedReportCb cb, void *data)
Set callback to report received message from the broker.
void cc_mqtt5_client_set_error_log_callback(CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorLogCb cb, void *data)
Set callback to report error messages.
void cc_mqtt5_client_free(CC_Mqtt5ClientHandle handle)
Free previously allocated client.
void cc_mqtt5_client_notify_network_disconnected(CC_Mqtt5ClientHandle handle)
Report network disconnected.
CC_Mqtt5ErrorCode cc_mqtt5_client_pub_topic_alias_free(CC_Mqtt5ClientHandle handle, const char *topic)
Free alias for topic for another use.
unsigned cc_mqtt5_client_pub_topic_alias_count(CC_Mqtt5ClientHandle handle)
Get amount of allocated topic aliases.
bool cc_mqtt5_client_get_verify_incoming_topic_enabled(CC_Mqtt5ClientHandle handle)
Retrieve current incoming topic format verification control.
bool cc_mqtt5_client_pub_topic_alias_is_allocated(CC_Mqtt5ClientHandle handle, const char *topic)
Check if topic alias is allocated for topic.
CC_Mqtt5ErrorCode cc_mqtt5_client_pub_topic_alias_alloc(CC_Mqtt5ClientHandle handle, const char *topic, unsigned qos0RegsCount)
Allocate alias for topic.
void(* CC_Mqtt5MessageReceivedReportCb)(void *data, const CC_Mqtt5MessageInfo *info)
Callback used to report new message received of the broker.
Definition common.h:548
void(* CC_Mqtt5NextTickProgramCb)(void *data, unsigned duration)
Callback used to request time measurement.
Definition common.h:503
bool cc_mqtt5_client_get_verify_outgoing_topic_enabled(CC_Mqtt5ClientHandle handle)
Retrieve current outgoing topic format verification control.
bool cc_mqtt5_client_get_verify_incoming_msg_subscribed(CC_Mqtt5ClientHandle handle)
Retrieve current incoming message being correctly subscribed control.
CC_Mqtt5ErrorCode cc_mqtt5_client_set_verify_incoming_topic_enabled(CC_Mqtt5ClientHandle handle, bool enabled)
Control incoming topic format verification.
struct CC_Mqtt5Client * CC_Mqtt5ClientHandle
Handle used to access client specific data structures.
Definition common.h:219
bool cc_mqtt5_client_is_network_disconnected(CC_Mqtt5ClientHandle handle)
Check current network disconnected status.
CC_Mqtt5ClientHandle cc_mqtt5_client_alloc()
Allocate new client.
void cc_mqtt5_client_tick(CC_Mqtt5ClientHandle handle, unsigned ms)
Notify client about requested time expiry.
CC_Mqtt5ErrorCode cc_mqtt5_client_set_default_response_timeout(CC_Mqtt5ClientHandle handle, unsigned ms)
Configure default response timeout period.
void(* CC_Mqtt5BrokerDisconnectReportCb)(void *data, CC_Mqtt5BrokerDisconnectReason reason, const CC_Mqtt5DisconnectInfo *info)
Callback used to report unsolicited disconnection of the broker.
Definition common.h:540
void(* CC_Mqtt5SendOutputDataCb)(void *data, const unsigned char *buf, unsigned bufLen)
Callback used to request to send data to the broker.
Definition common.h:527
CC_Mqtt5ErrorCode cc_mqtt5_client_set_verify_outgoing_topic_enabled(CC_Mqtt5ClientHandle handle, bool enabled)
Control outgoing topic format verification.
CC_Mqtt5ErrorCode cc_mqtt5_client_set_verify_incoming_msg_subscribed(CC_Mqtt5ClientHandle handle, bool enabled)
Control verification of the incoming message being correctly subscribed.
unsigned cc_mqtt5_client_process_data(CC_Mqtt5ClientHandle handle, const unsigned char *buf, unsigned bufLen)
Provide data (received over I/O link), to the library for processing.
unsigned(* CC_Mqtt5CancelNextTickWaitCb)(void *data)
Callback used to request termination of existing time measurement.
Definition common.h:512
void(* CC_Mqtt5ErrorLogCb)(void *data, const char *msg)
Callback used to report discovered errors.
Definition common.h:555
unsigned cc_mqtt5_client_get_default_response_timeout(CC_Mqtt5ClientHandle handle)
Retrieved currently configured default response timeout period.
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_config_extra(CC_Mqtt5ConnectHandle handle, const CC_Mqtt5ConnectExtraConfig *config)
Perform extra properties configuration of the "connect" operation.
void cc_mqtt5_client_connect_init_auth_info(CC_Mqtt5AuthInfo *info)
Intialize the CC_Mqtt5AuthInfo configuration structure.
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_cancel(CC_Mqtt5ConnectHandle handle)
Cancel the allocated "connect" operation.
struct CC_Mqtt5Connect * CC_Mqtt5ConnectHandle
Handle for "connect" operation.
Definition common.h:228
void(* CC_Mqtt5ConnectCompleteCb)(void *data, CC_Mqtt5AsyncOpStatus status, const CC_Mqtt5ConnectResponse *response)
Callback used to report completion of the "connect" operation.
Definition common.h:565
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_full(CC_Mqtt5ClientHandle handle, const CC_Mqtt5ConnectBasicConfig *basicConfig, const CC_Mqtt5ConnectWillConfig *willConfig, const CC_Mqtt5ConnectExtraConfig *extraConfig, const CC_Mqtt5AuthConfig *authConfig, CC_Mqtt5ConnectCompleteCb cb, void *cbData)
Prepare, configure, and send "connect" request in one go (full version)
void cc_mqtt5_client_connect_init_config_basic(CC_Mqtt5ConnectBasicConfig *config)
Intialize the CC_Mqtt5ConnectBasicConfig configuration structure.
void cc_mqtt5_client_connect_init_config_auth(CC_Mqtt5AuthConfig *config)
Intialize the CC_Mqtt5AuthConfig configuration structure.
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_config_auth(CC_Mqtt5ConnectHandle handle, const CC_Mqtt5AuthConfig *config)
Perform authentication handshake configuration of the "connect" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_simple(CC_Mqtt5ClientHandle handle, const CC_Mqtt5ConnectBasicConfig *basicConfig, CC_Mqtt5ConnectCompleteCb cb, void *cbData)
Prepare, configure, and send "connect" request in one go (simple version)
unsigned cc_mqtt5_client_connect_get_response_timeout(CC_Mqtt5ConnectHandle handle)
Retrieve the configured the broker response timeout for the "connect" operation.
bool cc_mqtt5_client_is_connected(CC_Mqtt5ClientHandle handle)
Check the inner state of the library of whether it's connected to the broker.
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_add_user_prop(CC_Mqtt5ConnectHandle handle, const CC_Mqtt5UserProp *prop)
Add user property to the configuration of the "connect" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_config_will(CC_Mqtt5ConnectHandle handle, const CC_Mqtt5ConnectWillConfig *config)
Perform will configuration of the "connect" operation.
void cc_mqtt5_client_connect_init_config_will(CC_Mqtt5ConnectWillConfig *config)
Intialize the CC_Mqtt5ConnectWillConfig configuration structure.
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_add_will_user_prop(CC_Mqtt5ConnectHandle handle, const CC_Mqtt5UserProp *prop)
Add user property to the will configuration of the "connect" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_send(CC_Mqtt5ConnectHandle handle, CC_Mqtt5ConnectCompleteCb cb, void *cbData)
Send the configured "connect" operation to broker.
void cc_mqtt5_client_connect_init_config_extra(CC_Mqtt5ConnectExtraConfig *config)
Intialize the CC_Mqtt5ConnectExtraConfig configuration structure.
CC_Mqtt5ConnectHandle cc_mqtt5_client_connect_prepare(CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorCode *ec)
Prepare "connect" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_set_response_timeout(CC_Mqtt5ConnectHandle handle, unsigned ms)
Configure the broker response timeout for the "connect" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_connect_config_basic(CC_Mqtt5ConnectHandle handle, const CC_Mqtt5ConnectBasicConfig *config)
Perform basic configuration of the "connect" operation.
void cc_mqtt5_client_disconnect_init_config(CC_Mqtt5DisconnectConfig *config)
Intialize the CC_Mqtt5DisconnectConfig configuration structure.
CC_Mqtt5ErrorCode cc_mqtt5_client_disconnect_add_user_prop(CC_Mqtt5DisconnectHandle handle, const CC_Mqtt5UserProp *prop)
Add user property to the configuration of the "disconnect" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_disconnect_send(CC_Mqtt5DisconnectHandle handle)
Send the configured "disconnect" operation to broker.
CC_Mqtt5DisconnectHandle cc_mqtt5_client_disconnect_prepare(CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorCode *ec)
Prepare "disconnect" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_disconnect_cancel(CC_Mqtt5DisconnectHandle handle)
Cancel the allocated "disconnect" operation.
struct CC_Mqtt5Disconnect * CC_Mqtt5DisconnectHandle
Handle for "disconnect" operation.
Definition common.h:237
CC_Mqtt5ErrorCode cc_mqtt5_client_disconnect_config(CC_Mqtt5DisconnectHandle handle, const CC_Mqtt5DisconnectConfig *config)
Perform configuration of the "disconnect" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_disconnect(CC_Mqtt5ClientHandle handle, const CC_Mqtt5DisconnectConfig *config)
Prepare, configure, and send "disconnect" request in one go.
void cc_mqtt5_client_init_user_prop(CC_Mqtt5UserProp *prop)
Intialize the CC_Mqtt5UserProp structure.
CC_Mqtt5ErrorCode
Error code returned by various API functions.
Definition common.h:66
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_config_basic(CC_Mqtt5PublishHandle handle, const CC_Mqtt5PublishBasicConfig *config)
Perform basic configuration of the "publish" operation.
unsigned cc_mqtt5_client_publish_get_response_timeout(CC_Mqtt5PublishHandle handle)
Retrieve the configured the broker response timeout for the "publish" operation.
void cc_mqtt5_client_publish_init_config_extra(CC_Mqtt5PublishExtraConfig *config)
Intialize the CC_Mqtt5PublishExtraConfig configuration structure.
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_full(CC_Mqtt5ClientHandle handle, const CC_Mqtt5PublishBasicConfig *basicConfig, const CC_Mqtt5PublishExtraConfig *extraConfig, CC_Mqtt5PublishCompleteCb cb, void *cbData)
Prepare, configure, and send "publish" request in one go (full version)
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_simple(CC_Mqtt5ClientHandle handle, const CC_Mqtt5PublishBasicConfig *basicConfig, CC_Mqtt5PublishCompleteCb cb, void *cbData)
Prepare, configure, and send "publish" request in one go (simple version)
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_set_ordering(CC_Mqtt5ClientHandle handle, CC_Mqtt5PublishOrdering ordering)
Configure the ordering of the published messages.
CC_Mqtt5PublishOrdering cc_mqtt5_client_publish_get_ordering(CC_Mqtt5ClientHandle handle)
Retrieve the configured the publish operations ordering.
void(* CC_Mqtt5PublishCompleteCb)(void *data, CC_Mqtt5PublishHandle handle, CC_Mqtt5AsyncOpStatus status, const CC_Mqtt5PublishResponse *response)
Callback used to report completion of the "publish" operation.
Definition common.h:613
CC_Mqtt5PublishHandle cc_mqtt5_client_publish_prepare(CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorCode *ec)
Prepare "publish" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_set_response_timeout(CC_Mqtt5PublishHandle handle, unsigned ms)
Configure the broker response timeout for the "publish" operation.
unsigned cc_mqtt5_client_publish_count(CC_Mqtt5ClientHandle handle)
Get amount incomplete "publish" operations.
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_add_user_prop(CC_Mqtt5PublishHandle handle, const CC_Mqtt5UserProp *prop)
Add user property to the configuration of the "publish" operation.
void cc_mqtt5_client_publish_init_config_basic(CC_Mqtt5PublishBasicConfig *config)
Intialize the CC_Mqtt5PublishBasicConfig configuration structure.
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_config_extra(CC_Mqtt5PublishHandle handle, const CC_Mqtt5PublishExtraConfig *config)
Perform extra properties configuration of the "publish" operation.
struct CC_Mqtt5Publish * CC_Mqtt5PublishHandle
Handle for "publish" operation.
Definition common.h:264
unsigned cc_mqtt5_client_publish_get_resend_attempts(CC_Mqtt5PublishHandle handle)
Retrieve the configured the amount of resend attempts for the "publish" operation.
CC_Mqtt5PublishOrdering
Publish ordering configuration.
Definition common.h:195
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_cancel(CC_Mqtt5PublishHandle handle)
Cancel the allocated "publish" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_set_resend_attempts(CC_Mqtt5PublishHandle handle, unsigned attempts)
Configure the amount of attempts to resend "publish" operation until the acknowledgement is received.
bool cc_mqtt5_client_publish_was_initiated(CC_Mqtt5PublishHandle handle)
Check whether the "publish" operation was actually initiated (PUBLISH was sent)
CC_Mqtt5ErrorCode cc_mqtt5_client_publish_send(CC_Mqtt5PublishHandle handle, CC_Mqtt5PublishCompleteCb cb, void *cbData)
Send the configured "publish" operation to broker.
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_send(CC_Mqtt5ReauthHandle handle, CC_Mqtt5ReauthCompleteCb cb, void *cbData)
Send the configured "reauth" operation to broker.
void(* CC_Mqtt5ReauthCompleteCb)(void *data, CC_Mqtt5AsyncOpStatus status, const CC_Mqtt5AuthInfo *response)
Callback used to report completion of the "reauth" operation.
Definition common.h:623
struct CC_Mqtt5Reauth * CC_Mqtt5ReauthHandle
Handle for "reauth" operation.
Definition common.h:273
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_cancel(CC_Mqtt5ReauthHandle handle)
Cancel the allocated "reauth" operation.
CC_Mqtt5ReauthHandle cc_mqtt5_client_reauth_prepare(CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorCode *ec)
Prepare "reauth" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_add_user_prop(CC_Mqtt5ReauthHandle handle, const CC_Mqtt5UserProp *prop)
Add user property to the configuration of the "reauth" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth(CC_Mqtt5ClientHandle handle, const CC_Mqtt5AuthConfig *config, CC_Mqtt5ReauthCompleteCb cb, void *cbData)
Prepare, configure, and send "reauth" request in one go.
void cc_mqtt5_client_reauth_init_config_auth(CC_Mqtt5AuthConfig *config)
Intialize the CC_Mqtt5AuthConfig configuration structure.
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_set_response_timeout(CC_Mqtt5ReauthHandle handle, unsigned ms)
Configure the broker response timeout for the "reauth" operation.
unsigned cc_mqtt5_client_reauth_get_response_timeout(CC_Mqtt5ReauthHandle handle)
Retrieve the configured the broker response timeout for the "reauth" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_config_auth(CC_Mqtt5ReauthHandle handle, const CC_Mqtt5AuthConfig *config)
Perform authentication handshake configuration of the "reauth" operation.
CC_Mqtt5SubscribeHandle cc_mqtt5_client_subscribe_prepare(CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorCode *ec)
Prepare "subscribe" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_set_response_timeout(CC_Mqtt5SubscribeHandle handle, unsigned ms)
Configure the broker response timeout for the "subscribe" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_config_extra(CC_Mqtt5SubscribeHandle handle, const CC_Mqtt5SubscribeExtraConfig *config)
Perform extra properties configuration of the "subscribe" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_config_topic(CC_Mqtt5SubscribeHandle handle, const CC_Mqtt5SubscribeTopicConfig *config)
Add topic configuration of the "subscribe" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_add_user_prop(CC_Mqtt5SubscribeHandle handle, const CC_Mqtt5UserProp *prop)
Add user property to the configuration of the "subscribe" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_full(CC_Mqtt5ClientHandle handle, const CC_Mqtt5SubscribeTopicConfig *topicConfigs, unsigned topicConfigsCount, const CC_Mqtt5SubscribeExtraConfig *extraConfig, CC_Mqtt5SubscribeCompleteCb cb, void *cbData)
Prepare, configure, and send "subscribe" request in one go (full version)
void(* CC_Mqtt5SubscribeCompleteCb)(void *data, CC_Mqtt5SubscribeHandle handle, CC_Mqtt5AsyncOpStatus status, const CC_Mqtt5SubscribeResponse *response)
Callback used to report completion of the "subscribe" operation.
Definition common.h:585
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_cancel(CC_Mqtt5SubscribeHandle handle)
Cancel the allocated "subscribe" operation.
struct CC_Mqtt5Subscribe * CC_Mqtt5SubscribeHandle
Handle for "subscribe" operation.
Definition common.h:246
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_simple(CC_Mqtt5ClientHandle handle, const CC_Mqtt5SubscribeTopicConfig *topicConfig, CC_Mqtt5SubscribeCompleteCb cb, void *cbData)
Prepare, configure, and send "subscribe" request in one go (simple version)
unsigned cc_mqtt5_client_subscribe_get_response_timeout(CC_Mqtt5SubscribeHandle handle)
Retrieve the configured the broker response timeout for the "subscribe" operation.
void cc_mqtt5_client_subscribe_init_config_topic(CC_Mqtt5SubscribeTopicConfig *config)
Intialize the CC_Mqtt5SubscribeTopicConfig configuration structure.
CC_Mqtt5ErrorCode cc_mqtt5_client_subscribe_send(CC_Mqtt5SubscribeHandle handle, CC_Mqtt5SubscribeCompleteCb cb, void *cbData)
Send the configured "subscribe" operation to broker.
void cc_mqtt5_client_subscribe_init_config_extra(CC_Mqtt5SubscribeExtraConfig *config)
Intialize the CC_Mqtt5SubscribeExtraConfig configuration structure.
void(* CC_Mqtt5UnsubscribeCompleteCb)(void *data, CC_Mqtt5UnsubscribeHandle handle, CC_Mqtt5AsyncOpStatus status, const CC_Mqtt5UnsubscribeResponse *response)
Callback used to report completion of the "unsubscribe" operation.
Definition common.h:599
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_simple(CC_Mqtt5ClientHandle handle, const CC_Mqtt5UnsubscribeTopicConfig *topicConfig, CC_Mqtt5UnsubscribeCompleteCb cb, void *cbData)
Prepare, configure, and send "unsubscribe" request in one go (simple version)
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_full(CC_Mqtt5ClientHandle handle, const CC_Mqtt5UnsubscribeTopicConfig *topicConfigs, unsigned topicConfigsCount, CC_Mqtt5UnsubscribeCompleteCb cb, void *cbData)
Prepare, configure, and send "unsubscribe" request in one go (full version)
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_send(CC_Mqtt5UnsubscribeHandle handle, CC_Mqtt5UnsubscribeCompleteCb cb, void *cbData)
Send the configured "unsubscribe" operation to broker.
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_set_response_timeout(CC_Mqtt5UnsubscribeHandle handle, unsigned ms)
Configure the broker response timeout for the "unsubscribe" operation.
CC_Mqtt5UnsubscribeHandle cc_mqtt5_client_unsubscribe_prepare(CC_Mqtt5ClientHandle handle, CC_Mqtt5ErrorCode *ec)
Prepare "unsubscribe" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_cancel(CC_Mqtt5UnsubscribeHandle handle)
Cancel the allocated "unsubscribe" operation.
unsigned cc_mqtt5_client_unsubscribe_get_response_timeout(CC_Mqtt5UnsubscribeHandle handle)
Retrieve the configured the broker response timeout for the "unsubscribe" operation.
void cc_mqtt5_client_unsubscribe_init_config_topic(CC_Mqtt5UnsubscribeTopicConfig *config)
Intialize the CC_Mqtt5UnsubscribeTopicConfig configuration structure.
struct CC_Mqtt5Unsubscribe * CC_Mqtt5UnsubscribeHandle
Handle for "unsubscribe" operation.
Definition common.h:255
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_add_user_prop(CC_Mqtt5UnsubscribeHandle handle, const CC_Mqtt5UserProp *prop)
Add user property to the configuration of the "unsubscribe" operation.
CC_Mqtt5ErrorCode cc_mqtt5_client_unsubscribe_config_topic(CC_Mqtt5UnsubscribeHandle handle, const CC_Mqtt5UnsubscribeTopicConfig *config)
Add topic configuration of the "unsubscribe" operation.
Authentication Configuration.
Definition common.h:629
Authentication handshake information.
Definition common.h:359
Configuration structure to be passed to the cc_mqtt5_client_connect_config_basic().
Definition common.h:288
Extra properties configuration of the "connect" operation.
Definition common.h:320
Configuration structure to be passed to the cc_mqtt5_client_connect_config_will().
Definition common.h:301
Configuration structure of the "disconnect" operation.
Definition common.h:382
Configuration structure to be passed to the cc_mqtt5_client_publish_config_basic().
Definition common.h:463
Configuration structure to be passed to the cc_mqtt5_client_publish_config_extra().
Definition common.h:476
Extra subscription properties configuration structure.
Definition common.h:404
Topic filter configuration structure of the "subscribe" operation.
Definition common.h:392
Topic filter configuration structure of the "unsubscribe" operation.
Definition common.h:423
Wraping structre of the single "User Property".
Definition common.h:279