mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
lib: Add fpi_poll_is_setup() sanity check
This checks whether polling was correctly setup for integration with a mainloop.
This commit is contained in:
@@ -482,6 +482,12 @@ void fpi_poll_exit(void)
|
||||
libusb_set_pollfd_notifiers(fpi_usb_ctx, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
gboolean
|
||||
fpi_poll_is_setup(void)
|
||||
{
|
||||
return (fd_added_cb != NULL && fd_removed_cb != NULL);
|
||||
}
|
||||
|
||||
void
|
||||
fpi_timeout_cancel_all_for_dev(struct fp_dev *dev)
|
||||
{
|
||||
|
||||
@@ -48,4 +48,6 @@ void fpi_timeout_set_name(fpi_timeout *timeout,
|
||||
const char *name);
|
||||
void fpi_timeout_cancel(fpi_timeout *timeout);
|
||||
|
||||
gboolean fpi_poll_is_setup(void);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user