The event callback

The event callback shall be a function with the following prototype:

void obex_event_t( obex_t *handle obex_object_t *obj gint mode gint event gint obex_cmd gint obex_rsp );

Table 1. Arguments

ArgumentDescription
handleOBEX handle
objOBEX object
modeOBEX_CLI for client event or OBEX_SRV, for server event
eventThe event. See obex_const.h for possible events.
obex_cmdCommand if any (depending on event type)
obex_rspResponse if any (depending on event type)
To this function events from the library will be passed to you, for example when an operation finishes. OBEX_SetUserData and OBEX_GetUserData are useful if you need to access your own private data from inside the event callback.