1iv_inotify(3)             ivykis programmer's manual             iv_inotify(3)
2
3
4

NAME

6       IV_INOTIFY_INIT,  iv_inotify_register,  iv_inotify_unregister,  IV_INO‐
7       TIFY_WATCH_INIT, iv_inotify_watch_register, iv_inotify_watch_unregister
8       - ivykis inotify(7) wrapper
9

SYNOPSIS

11       #include <iv_inotify.h>
12
13       struct iv_inotify {
14       };
15
16       void IV_INOTIFY_INIT(struct iv_inotify *inotify);
17       int iv_inotify_register(struct iv_inotify *inotify);
18       void iv_inotify_unregister(struct iv_inotify *inotify);
19
20       struct iv_inotify_watch {
21               struct iv_inotify       *inotify;
22               const char              *pathname;
23               uint32_t                mask;
24               void                    *cookie;
25               void                    (*handler)(void *, struct inotify_event *);
26       };
27
28       void IV_INOTIFY_WATCH_INIT(struct iv_inotify_watch *watch);
29       int iv_inotify_watch_register(struct iv_inotify_watch *watch);
30       int iv_inotify_watch_unregister(struct iv_inotify_watch *watch);
31

DESCRIPTION

33       The  iv_inotify_register function registers an iv_inotify instance with
34       the iv_inotify(3) module.  The inotify parameter is a  pointer  to  the
35       iv_inotify structure to be registered.
36
37       The  iv_inotify_unregister  function unregisters an iv_inotify instance
38       from the iv_inotify(3) module.  The inotify parameter is a  pointer  to
39       the iv_inotify structure to be unregistered.
40
41       The  iv_inotify_watch_register  function adds a watch to the registered
42       iv_inotify instance specified by the ->inotify member.
43
44       The iv_inotify_watch_unregister  function  removes  a  watch  from  the
45       iv_inotify instance specified by the ->inotify member.
46
47       In  the iv_inotify_watch structure used in these functions, the ->path‐
48       name and ->mask members  correspond  to  the  members  of  struct  ino‐
49       tify_watch  as described in inotify(7).  ->handler is the event handler
50       called when this watch triggers.  The arguments to this  handler  func‐
51       tion  are  the  pointer  stored  in  the ->cookie member of the iv_ino‐
52       tify_watch structure and a pointer to  an  inotify_event  structure  as
53       described in inotify(7).
54

RETURN VALUE

56       iv_inotify_register  and  iv_inotify_watch_register return zero on suc‐
57       cess.  On error, -1 is returned, and errno is set appropriately.
58

ERRORS

60       iv_inotify will return errors  returned  by  inotify_init(3)  and  ino‐
61       tify_add_watch(3).
62

SEE ALSO

64       ivykis(3),   inotify(7),  inotify_init(3),  inotify_add_watch(3),  ino‐
65       tify_rm_watch(3)
66
67
68
69ivykis                            2009-02-07                     iv_inotify(3)
Impressum