Re: getting the list of all gnome-vfs modules



> 	So you want to know that inside gnome-vfs ? if so it should be easy to
> add a method that groks that information. How is this data exposed to
> the real world though ? can we API compatibly export the fact that we
> handle all types easily ?

Actually, I looked more deeply into that yesterday evening, and it is not that difficult to get the list of available modules by adding one new method to gnome-vfs-configuration.c (iirc api additions aren't abi incompatible changes ?) and a new #define to one .h file (that's probably also ok with respect to abi compatibility).

Then it looks like it's possible to handle the "I handle all types" without further non internal changes (I still haven't finished working on that so I may change my mind). Indeed, the information contained in .application files is internally stored in a non public struct Application (defined in gnome-vfs-application-registry.c) to which I can add a new boolean. When an app needs the information about a given app, this internal structure is copied to a GnomeVFSMimeApplication which has a list of string corresponding to the supported uri schemes. So I just have to add the list of all gnome-vfs supported uri strings to that list when necessary. 

The only limitation will be that an app won't know that the app it's asking info about had the all_gnome_vfs_schemes_supported field set, which is not a problem imo. Anyway GnomeVFSMimeApplication has 8 bytes of padding if we need to add a field for that.

Another thing that I saw yesterday when I started hacking on that : I was wondering if methods like vfolder-desktop, preferences, ... should be filtered or not. 
Also, I was wondering if it was necessary to let apps specify which gnomevfs methods must be defined so that they can do something sensible with an uri (for example, some apps may only need open/read/close, some other open_dir/read_dir/close_dir, another app may need open/read/close but also write and so on). But maybe we can rely on gnome-vfs modules to implement enough methods and let apps handle themselves missing methods.

> 	Regards,
> 

Thanks for your answer, i was getting desperate of gettint any answer to my mails :)

Christophe



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]