qwf_net_RegisterCallback()

Register an event handler with the QWF Network Manager service

Synopsis:

#include <qwf/qwf_net.h>
qwf_net_Results_e qwf_net_RegisterCallback(const qwf_Context_t *const pCtx,
                                           qwf_net_EventClientCallback_t eventHandler,
                                           void *pClientData)

Arguments:

pCtx
A pointer to the QWF service context
eventHandler
An event handler to be executed when a QWF Network Manager service event occurs, or NULL to deregister any previously registered handler. When not NULL, this argument must match the qwf_net_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:

NET_OK Successful result

NET_ERR_INACTIVE The QWF Network Manager service is inactive or not ready

NET_ERR_INT eventHandler is NULL but no handler is registered, eventHandler is not NULL and a handler is already registered, or memory can't be allocated for the next event

NET_ERR_PARAM pCtx is NULL or the QWF Network Manager context can't be retrieved