9 typedef void* pnd_notify_handle;
11 /* must invoke this to obtain a handle; other notify functions require it of course.
12 * Returns NULL on failure.
14 pnd_notify_handle pnd_notify_init ( void );
18 void pnd_notify_shutdown ( pnd_notify_handle h );
20 /* register a path to watch
21 * Pass in a path to register it for watching; note that should you wish children
22 * directories to be watched as well you should set the recursive flag.
24 #define PND_NOTIFY_RECURSE 1
25 void pnd_notify_watch_path ( pnd_notify_handle h, char *fullpath, unsigned int flags );
27 /* rescan_p (rescan predicate) -- wil return TRUE (>0) when the notify is reporting
28 * that we should do a re-discovery against the paths.
30 * (Yes this is a little brute-forcey .. it should just collect notify events
31 * and suss-out the changes, and add/sub those from a working list of applications.)
33 unsigned char pnd_notify_rediscover_p ( pnd_notify_handle h );
35 /* wait_until_ready() will loop (up to a max of secs_timeout) until inotify seems to
36 * be responding. Returns 0 if inotify is never ready during the interval, otherwise
37 * it suggests inotify is up and going.
38 * secs_timeout may be 0 which means 'forever'
39 * NOTE: This wastes some time, always
41 unsigned char pnd_notify_wait_until_ready ( unsigned int secs_timeout );
43 int pnd_notify_fd ( pnd_notify_handle h );