CommsChampion Ecosystem MQTT v5 Client
MQTT v5 Client Library.
|
Typedefs | |
typedef void(* | CC_Mqtt5ReauthCompleteCb) (void *data, CC_Mqtt5AsyncOpStatus status, const CC_Mqtt5AuthInfo *response) |
Callback used to report completion of the "reauth" operation. | |
typedef struct CC_Mqtt5Reauth * | CC_Mqtt5ReauthHandle |
Handle for "reauth" operation. | |
typedef void(* CC_Mqtt5ReauthCompleteCb) (void *data, CC_Mqtt5AsyncOpStatus status, const CC_Mqtt5AuthInfo *response) |
Callback used to report completion of the "reauth" operation.
[in] | data | Pointer to user data object passed as last parameter to the cc_mqtt5_client_reauth_send(). |
[in] | status | Status of the "reauth" operation. |
[in] | response | Response information from the broker. Not-NULL is reported if and onfly if the "status" is equal to CC_Mqtt5AsyncOpStatus_Complete. |
typedef struct CC_Mqtt5Reauth* CC_Mqtt5ReauthHandle |
Handle for "reauth" operation.
Returned by cc_mqtt5_client_reauth_prepare() function.
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.
Abstracts away sequence of the following functions invocation:
[in] | handle | Handle returned by cc_mqtt5_client_alloc() function. |
[in] | config | Auth configuration. |
[in] | cb | Callback to be invoked when "reauth" operation is complete. |
[in] | cbData | Pointer to any user data structure. It will passed as one of the parameters in callback invocation. May be NULL. |
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.
[in] | handle | Handle returned by cc_mqtt5_client_reauth_prepare() function. |
[in] | prop | Single user property info. Must NOT be NULL. Does not need to be preserved after invocation. |
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_cancel | ( | CC_Mqtt5ReauthHandle | handle | ) |
Cancel the allocated "reauth" operation.
In case the cc_mqtt5_client_reauth_send() function was successfully called before, the operation is cancelled without callback invocation.
[in] | handle | Handle returned by cc_mqtt5_client_reauth_prepare() function. |
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_config_auth | ( | CC_Mqtt5ReauthHandle | handle, |
const CC_Mqtt5AuthConfig * | config | ||
) |
Perform authentication handshake configuration of the "reauth" operation.
[in] | handle | Handle returned by cc_mqtt5_client_reauth_prepare() function. |
[in] | config | Authentication configuration structure. Must NOT be NULL. Does not need to be preserved after invocation. |
unsigned cc_mqtt5_client_reauth_get_response_timeout | ( | CC_Mqtt5ReauthHandle | handle | ) |
Retrieve the configured the broker response timeout for the "reauth" operation.
[in] | handle | Handle returned by cc_mqtt5_client_reauth_prepare() function. |
void cc_mqtt5_client_reauth_init_config_auth | ( | CC_Mqtt5AuthConfig * | config | ) |
Intialize the CC_Mqtt5AuthConfig configuration structure.
[out] | config | Configuration structure. Must not be NULL. |
CC_Mqtt5ReauthHandle cc_mqtt5_client_reauth_prepare | ( | CC_Mqtt5ClientHandle | handle, |
CC_Mqtt5ErrorCode * | ec | ||
) |
Prepare "reauth" operation.
For successful operation the client needs to be in the "connected" state and there is no other incomplete "reauth" operation.
[in] | handle | Handle returned by cc_mqtt5_client_alloc() function. |
[out] | ec | Error code reporting result of the operation. Can be NULL. |
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_send | ( | CC_Mqtt5ReauthHandle | handle, |
CC_Mqtt5ReauthCompleteCb | cb, | ||
void * | cbData | ||
) |
Send the configured "reauth" operation to broker.
[in] | handle | Handle returned by cc_mqtt5_client_reauth_prepare() function. |
[in] | cb | Callback to be invoked when "reauth" operation is complete. |
[in] | cbData | Pointer to any user data structure. It will passed as one of the parameters in callback invocation. May be NULL. |
CC_Mqtt5ErrorCode cc_mqtt5_client_reauth_set_response_timeout | ( | CC_Mqtt5ReauthHandle | handle, |
unsigned | ms | ||
) |
Configure the broker response timeout for the "reauth" operation.
[in] | handle | Handle returned by cc_mqtt5_client_reauth_prepare() function. |
[in] | ms | Response timeout duration in milliseconds. |