Re: [RFC] Simple file monitoring API for GLib

2006-05-09 Thread Nicolas Collignon
On 5/9/06, Emmanuele Bassi <[EMAIL PROTECTED]> wrote: Hi Nicolas, On Tue, 2006-05-09 at 22:44 +0200, Nicolas Collignon wrote: > Why not simply use a flags mask. Because if you need a really fine grained check you're better of with gnome-vfs. Really, the point is a *simple* file monitoring API

Re: [RFC] Simple file monitoring API for GLib

2006-05-09 Thread Emmanuele Bassi
Hi Nicolas, On Tue, 2006-05-09 at 22:44 +0200, Nicolas Collignon wrote: > Why not simply use a flags mask. Because if you need a really fine grained check you're better of with gnome-vfs. Really, the point is a *simple* file monitoring API. Unless, of course, you want to get gnome-vfs and chec

Re: [RFC] Simple file monitoring API for GLib

2006-05-09 Thread Emmanuele Bassi
On Tue, 2006-05-09 at 13:06 -0400, Joe Shaw wrote: > Hi, > > On Mon, 2006-05-08 at 22:49 +0100, Emmanuele Bassi wrote: > > typedef enum { > > G_FILE_CREATED_EVENT, > > G_FILE_CHANGED_EVENT, > > G_FILE_REMOVED_EVENT, > > G_FILE_UNKNOWN_EVENT > > } GFileEvent; > > Would G_FILE_C

Re: [RFC] Simple file monitoring API for GLib

2006-05-09 Thread Nicolas Collignon
Why not simply use a flags mask. We could have: - an API function that tell which flags are supported on the running arch. - an API function that allow the user to modify an watcher events mask. In we have: /* the following are legal, implemented events that user-space can watch for */ #define I

Re: [RFC] Simple file monitoring API for GLib

2006-05-09 Thread Joe Shaw
Hi, On Mon, 2006-05-08 at 22:49 +0100, Emmanuele Bassi wrote: > typedef enum { > G_FILE_CREATED_EVENT, > G_FILE_CHANGED_EVENT, > G_FILE_REMOVED_EVENT, > G_FILE_UNKNOWN_EVENT > } GFileEvent; Would G_FILE_CHANGED_EVENT be fired on file attribute change (like chmod, chown, or an

Re: [RFC] Simple file monitoring API for GLib

2006-05-09 Thread Emmanuele Bassi
Hi Federico, On Tue, 2006-05-09 at 09:35 -0500, Federico Mena Quintero wrote: > On Tue, 2006-05-09 at 13:11 +0100, Emmanuele Bassi wrote: > > > This little API should be more useful that just monitoring the recent > > files storage, indeed; this task just forced me to sit down and > > implement t

Re: [RFC] Simple file monitoring API for GLib

2006-05-09 Thread Matthias Clasen
On 5/9/06, Federico Mena Quintero <[EMAIL PROTECTED]> wrote: That's the thing - people will see that gnome-vfs has a file monitoring API, and that Glib has one as well, and they'll think "the Glib one is at a lower level, so it must be BETTER!". And they'll start abusing it, they'll see that it

Re: [RFC] Simple file monitoring API for GLib

2006-05-09 Thread Federico Mena Quintero
On Tue, 2006-05-09 at 13:11 +0100, Emmanuele Bassi wrote: > This little API should be more useful that just monitoring the recent > files storage, indeed; this task just forced me to sit down and > implement this API. :-) That's the thing - people will see that gnome-vfs has a file monitoring API

Re: [RFC] Simple file monitoring API for GLib

2006-05-09 Thread Emmanuele Bassi
[forgot to Cc: the list] On Mon, 2006-05-08 at 20:06 -0500, Federico Mena Quintero wrote: > On Mon, 2006-05-08 at 22:49 +0100, Emmanuele Bassi wrote: > > > A while ago, on IRC, Christian Persch made the request[1] that the > > monitoring of the storage file used by the GtkRecentManager could be >

Re: [RFC] Simple file monitoring API for GLib

2006-05-09 Thread Michael Natterer
On Mon, 2006-05-08 at 20:06 -0500, Federico Mena Quintero wrote: > On Mon, 2006-05-08 at 22:49 +0100, Emmanuele Bassi wrote: > > > A while ago, on IRC, Christian Persch made the request[1] that the > > monitoring of the storage file used by the GtkRecentManager could be > > overridden by libgnome,

Re: [RFC] Simple file monitoring API for GLib

2006-05-09 Thread Emmanuele Bassi
Hi Matthias, On Mon, 2006-05-08 at 20:54 -0400, Matthias Clasen wrote: > On 5/8/06, Emmanuele Bassi <[EMAIL PROTECTED]> wrote: > > [...] > > > The file monitoring API is as simple as the current API for idle and > > timeout sources: > > [...] > > General comments: > > - In general, I like the

Re: [RFC] Simple file monitoring API for GLib

2006-05-08 Thread Federico Mena Quintero
On Mon, 2006-05-08 at 22:49 +0100, Emmanuele Bassi wrote: > A while ago, on IRC, Christian Persch made the request[1] that the > monitoring of the storage file used by the GtkRecentManager could be > overridden by libgnome, so that every application using the GnomeProgram > API would automagically

Re: [RFC] Simple file monitoring API for GLib

2006-05-08 Thread Matthias Clasen
On 5/8/06, Emmanuele Bassi <[EMAIL PROTECTED]> wrote: [...] The file monitoring API is as simple as the current API for idle and timeout sources: [...] General comments: - In general, I like the proposed API. - I wonder if we need the extension hooks at all. Assuming we have implementatio

[RFC] Simple file monitoring API for GLib

2006-05-08 Thread Emmanuele Bassi
Hi everyone. A while ago, on IRC, Christian Persch made the request[1] that the monitoring of the storage file used by the GtkRecentManager could be overridden by libgnome, so that every application using the GnomeProgram API would automagically have notifications of file changes using gnome-vfs,