Blame gio/inotify/inotify-kernel.h

Packit ae235b
/*
Packit ae235b
   Copyright (C) 2005 John McCutchan
Packit ae235b
Packit ae235b
   This library is free software; you can redistribute it and/or
Packit ae235b
   modify it under the terms of the GNU Lesser General Public
Packit ae235b
   License as published by the Free Software Foundation; either
Packit ae235b
   version 2.1 of the License, or (at your option) any later version.
Packit ae235b
Packit ae235b
   This library is distributed in the hope that it will be useful,
Packit ae235b
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit ae235b
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit ae235b
   Lesser General Public License for more details.
Packit ae235b
Packit ae235b
   You should have received a copy of the GNU Lesser General Public License
Packit ae235b
   along with this library; if not, see <http://www.gnu.org/licenses/>.
Packit ae235b
Packit ae235b
   Authors:.
Packit ae235b
		John McCutchan <john@johnmccutchan.com>
Packit ae235b
*/
Packit ae235b
Packit ae235b
#ifndef __INOTIFY_KERNEL_H
Packit ae235b
#define __INOTIFY_KERNEL_H
Packit ae235b
Packit ae235b
typedef struct ik_event_s {
Packit ae235b
  gint32 wd;
Packit ae235b
  guint32 mask;
Packit ae235b
  guint32 original_mask;
Packit ae235b
  guint32 cookie;
Packit ae235b
  guint32 len;
Packit ae235b
  char *  name;
Packit ae235b
  /* TRUE if this event is the last element of a pair
Packit ae235b
   * (e.g., MOVE_TO in a pair of MOVE_FROM, MOVE_TO events) */
Packit ae235b
  gboolean is_second_in_pair;
Packit ae235b
  /* if event1 and event2 are two paired events
Packit ae235b
   * (e.g., MOVE_FROM and MOVE_TO events related to the same file move),
Packit ae235b
   * then event1->pair == event2 and event2->pair == NULL.
Packit ae235b
   * It will result also in event1->pair->is_second_in_pair == TRUE */
Packit ae235b
  struct ik_event_s *pair;
Packit ae235b
  gint64 timestamp; /* monotonic time that this was created */
Packit ae235b
} ik_event_t;
Packit ae235b
Packit ae235b
gboolean _ik_startup (gboolean (*cb) (ik_event_t *event));
Packit ae235b
Packit ae235b
ik_event_t *_ik_event_new_dummy (const char *name,
Packit ae235b
				 gint32      wd,
Packit ae235b
				 guint32     mask);
Packit ae235b
void        _ik_event_free      (ik_event_t *event);
Packit ae235b
Packit ae235b
gint32      _ik_watch           (const char *path,
Packit ae235b
				 guint32     mask,
Packit ae235b
				 int        *err);
Packit ae235b
int         _ik_ignore          (const char *path,
Packit ae235b
				 gint32      wd);
Packit ae235b
Packit ae235b
Packit ae235b
/* The miss count will probably be enflated */
Packit ae235b
void        _ik_move_stats     (guint32 *matches,
Packit ae235b
				guint32 *misses);
Packit ae235b
const char *_ik_mask_to_string (guint32  mask);
Packit ae235b
Packit ae235b
Packit ae235b
#endif