This function registers a callback function that is called whenever the state of the device changes. The first call to this function will also check the current state of the device, and if the state is available, the corresponding callback function will be called immediately.
|osso ||The library context as returned by osso_initialize. |
|state ||The states the application is interested in. NULL can be passed here to indicate that all signals are of interest. |
|cb ||The callback function. |
|data ||Arbitrary application specific pointer that will be passed to the callback and ignored by Libosso. |
- OSSO_OK if all goes well, OSSO_ERROR if an error occurred, or OSSO_INVALID if some parameter is invalid.