I am not sure how this function works. This is prototype:
int ALooper_addFd(ALooper*looper, int fd, int ident, int events, ALooper_callbackFunc callback, void *data);
What is this 'data' pointer? If callback is not NULL, 'data' should be custom data passed to callback. But, if callback is NULL, what is 'data' parameter used for? Or it have to be NULL also, in that case?
Is there any detailed documentation about this? Thank you in advice!