The event callback

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

void obex_event_t(obex_t *handleobex_object_t *objgint modegint eventgint obex_cmdgint obex_rsp); 
 obex_t *handleobex_object_t *objgint modegint eventgint obex_cmdgint obex_rsp); 
 obex_t *handleobex_object_t *objgint modegint eventgint obex_cmdgint obex_rsp;

Table 2.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.