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:
parent
a54d020c97
commit
97d0a6dfe6
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue