qwf_wifi_RegisterCallback()

Updated: April 19, 2023

Register an event handler with the QWF Wi-Fi Manager service

Synopsis:

#include <qwf/qwf_wifi.h>
qwf_wifi_Results_e qwf_wifi_RegisterCallback(const qwf_Context_t *const pCtx,
                                             qwf_wifi_EventClientCallback_t eventHandler,
                                             void *pClientData)

Arguments:

pCtx
A pointer to the QWF service context
eventHandler
An event handler to be executed when a QWF Wi-Fi Manager service event occurs, or NULL to deregister any previously registered handler. When not NULL, this argument must match the qwf_wifi_EventClientCallback_t prototype.
pClientData
An optional pointer to extra data to be passed back to the client, unchanged, as the pClientData argument to the eventHandler function when it's executed. The client is responsible for managing any memory associated with pClientData. You can specify NULL if you're not using extra data.

Library:

qwf_interface

Returns:

WIFI_OK Successful result

WIFI_ERR_INACTIVE The QWF Wi-Fi Manager service is inactive or not ready

WIFI_ERR_INT eventHandler is not NULL and a handler is already registered

WIFI_ERR_PARAM pCtx is NULL or the QWF Wi-Fi Manager context can't be retrieved