2 Copyright (C) 2005 John McCutchan
4 The Gnome Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The Gnome Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the Gnome Library; see the file COPYING.LIB. If not,
16 see <http://www.gnu.org/licenses/>.
19 John McCutchan <john@johnmccutchan.com>
22 #ifndef __INOTIFY_KERNEL_H
23 #define __INOTIFY_KERNEL_H
25 typedef struct ik_event_s {
28 guint32 original_mask;
32 /* TRUE if this event is the last element of a pair
33 * (e.g., MOVE_TO in a pair of MOVE_FROM, MOVE_TO events) */
34 gboolean is_second_in_pair;
35 /* if event1 and event2 are two paired events
36 * (e.g., MOVE_FROM and MOVE_TO events related to the same file move),
37 * then event1->pair == event2 and event2->pair == NULL.
38 * It will result also in event1->pair->is_second_in_pair == TRUE */
39 struct ik_event_s *pair;
42 gboolean _ik_startup (void (*cb) (ik_event_t *event));
44 ik_event_t *_ik_event_new_dummy (const char *name,
47 void _ik_event_free (ik_event_t *event);
49 gint32 _ik_watch (const char *path,
52 int _ik_ignore (const char *path,
56 /* The miss count will probably be enflated */
57 void _ik_move_stats (guint32 *matches,
59 const char *_ik_mask_to_string (guint32 mask);