6 * fan_open() // returns file handle..
12 * ?/ jsu tdo it as a vapi?
15 * https://github.com/apmasell/vapis/blob/master/transmission-2.0.vapi
16 * https://wiki.gnome.org/Projects/Vala/ManualBindings
19 [CCode (cheader_filename = "sys/fanotify.h", lower_case_cprefix = "fanotify_", cprefix = "FAN_")]
23 [CCode (cname = "int", cprefix = "FAN_", has_type_id = false)]
25 public enum EventType {
52 [CCode (cname = "int", cprefix = "FAN_", has_type_id = false)]
54 public enum InitFlag {
66 [CCode (cname = "int", cprefix = "FAN_MARK_", has_type_id = false)]
85 [CCode (cname = "struct fanotify_event_metadata", has_destroy_function = false, has_copy_function = false, has_type_id = false)]
86 public struct EventMetadata {
87 [CCode (cname = "event_len")]
88 public uint32 event_len;
90 [CCode (cname = "vers")]
93 [CCode (cname = "reserved")]
94 public uint8 reserved;
96 [CCode (cname = "metadata_len")]
97 public uint16 metadata_len;
99 [CCode (cname = "mask")]
102 [CCode (cname = "fd")]
105 [CCode (cname = "pid")]
109 [CCode (cname = "struct kernel_fsid_t", has_destroy_function = false, has_copy_function = false, has_type_id = false)]
110 public struct KernelFsid {
111 [CCode (cname = "val")]
115 [CCode (cname = "struct fanotify_event_info_header", has_destroy_function = false, has_copy_function = false, has_type_id = false)]
116 public struct EventInfoHeader {
117 [CCode (cname = "info_type")]
118 public uint8 info_type;
120 [CCode (cname = "pad")]
123 [CCode (cname = "len")]
127 [CCode (cname = "struct fanotify_event_info_fid", has_destroy_function = false, has_copy_function = false, has_type_id = false)]
128 public struct EventInfoFid {
129 [CCode (cname = "hdr")]
130 public EventInfoHeader hdr;
131 [CCode (cname = "fsid")]
132 public KernelFsid fsid;
134 [CCode (cname = "handle")]
135 public uchar[] handle;
140 [CCode (cname = "fanotify_init")]
141 public int init (uint __flags, uint __event_f_flags);
143 [CCode (cname = "fanotify_mark")]
144 public int mark (int __fanotify_fd, uint __flags, uint64 __mask, int __dfd, string __pathname);