diff options
author | Daniel Drake <dsd@gentoo.org> | 2008-06-26 22:47:05 -0500 |
---|---|---|
committer | Daniel Drake <dsd@gentoo.org> | 2008-06-26 22:47:05 -0500 |
commit | 819e65f880ca43526036e56c65c415042c91f58f (patch) | |
tree | ac053daba0e757793c6165858bd6bc81dc1abff7 /libusb/libusb.h | |
parent | 1df713d622ab4f0b03aad72d903ac7beb8fb3b90 (diff) | |
download | libusb-819e65f880ca43526036e56c65c415042c91f58f.tar.gz |
Allow user data pointer to be passed through pollfd notification API
Diffstat (limited to 'libusb/libusb.h')
-rw-r--r-- | libusb/libusb.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libusb/libusb.h b/libusb/libusb.h index 20d1988..685a1c8 100644 --- a/libusb/libusb.h +++ b/libusb/libusb.h @@ -1166,22 +1166,27 @@ struct libusb_pollfd { * \param fd the new file descriptor * \param events events to monitor for, see \ref libusb_pollfd for a * description + * \param user_data User data pointer specified in + * libusb_set_pollfd_notifiers() call * \see libusb_set_pollfd_notifiers() */ -typedef void (*libusb_pollfd_added_cb)(int fd, short events); +typedef void (*libusb_pollfd_added_cb)(int fd, short events, void *user_data); /** \ingroup poll * Callback function, invoked when a file descriptor should be removed from * the set of file descriptors being monitored for events. After returning * from this callback, do not use that file descriptor again. * \param fd the file descriptor to stop monitoring + * \param user_data User data pointer specified in + * libusb_set_pollfd_notifiers() call * \see libusb_set_pollfd_notifiers() */ -typedef void (*libusb_pollfd_removed_cb)(int fd); +typedef void (*libusb_pollfd_removed_cb)(int fd, void *user_data); const struct libusb_pollfd **libusb_get_pollfds(libusb_context *ctx); void libusb_set_pollfd_notifiers(libusb_context *ctx, - libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb); + libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb, + void *user_data); #ifdef __cplusplus } |