1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* gnome-vfs-monitor.h - File Monitoring for the GNOME Virtual File System.
4 Copyright (C) 2001 Ian McKellar
6 The Gnome Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public License as
8 published by the Free Software Foundation; either version 2 of the
9 License, or (at your option) any later version.
11 The Gnome Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public
17 License along with the Gnome Library; see the file COPYING.LIB. If not,
18 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
21 Author: Ian McKellar <yakk@yakk.net>
24 #ifndef GNOME_VFS_MONITOR_H
25 #define GNOME_VFS_MONITOR_H
30 * GnomeVFSMonitorType:
31 * @GNOME_VFS_MONITOR_FILE:
32 * @GNOME_VFS_MONITOR_DIRECTORY:
34 * Type of resources that can be monitored.
38 GNOME_VFS_MONITOR_FILE,
39 GNOME_VFS_MONITOR_DIRECTORY
40 } GnomeVFSMonitorType;
43 * GnomeVFSMonitorEventType:
44 * @GNOME_VFS_MONITOR_EVENT_CHANGED: file data changed
45 * @GNOME_VFS_MONITOR_EVENT_DELETED: file deleted event
46 * @GNOME_VFS_MONITOR_EVENT_STARTEXECUTING:
47 * @GNOME_VFS_MONITOR_EVENT_STOPEXECUTING:
48 * @GNOME_VFS_MONITOR_EVENT_CREATED: file created event
49 * @GNOME_VFS_MONITOR_EVENT_METADATA_CHANGED: file metadata changed
51 * Types of events that can be monitored.
55 GNOME_VFS_MONITOR_EVENT_CHANGED,
56 GNOME_VFS_MONITOR_EVENT_DELETED,
57 GNOME_VFS_MONITOR_EVENT_STARTEXECUTING,
58 GNOME_VFS_MONITOR_EVENT_STOPEXECUTING,
59 GNOME_VFS_MONITOR_EVENT_CREATED,
60 GNOME_VFS_MONITOR_EVENT_METADATA_CHANGED
61 } GnomeVFSMonitorEventType;
63 typedef struct GnomeVFSMonitorHandle GnomeVFSMonitorHandle;
66 * GnomeVFSMonitorCallback:
67 * @handle: the handle of the monitor that created the event
68 * @monitor_uri: the URI of the monitor that was triggered
69 * @info_uri: the URI of the actual file this event is concerned with (this can be different
70 * from @monitor_uri if it was a directory monitor)
71 * @event_type: what happened to @info_uri
72 * @user_data: user data passed to gnome_vfs_monitor_add() when the monitor was created
74 * Function called when a monitor detects a change.
77 typedef void (* GnomeVFSMonitorCallback) (GnomeVFSMonitorHandle *handle,
78 const gchar *monitor_uri,
79 const gchar *info_uri,
80 GnomeVFSMonitorEventType event_type,
82 #endif /* GNOME_VFS_MONITOR_H */