Add is_supported() to GNativeVolumeMonitorClass so that we can avoid

2007-12-17  Alexander Larsson  <alexl@redhat.com>

        * gnativevolumemonitor.h:
        * gunionvolumemonitor.c:
        * gunixvolumemonitor.c:
	Add is_supported() to GNativeVolumeMonitorClass so
	that we can avoid having to create an object to see
	if the backend is supported at runtime.
	Also add name member and an env var to pick a specific
	volume monitor backend.
	
        * gmountprivate.h:
        * glocalfile.c:
	Add cancellable to _g_mount_get_for_mount_path()
	
        * glocaldirectorymonitor.c:
        * glocalfilemonitor.c:
	Avoid loading and unloading modules while sorting.



svn path=/trunk/; revision=6144
This commit is contained in:
Alexander Larsson
2007-12-17 16:00:33 +00:00
committed by Alexander Larsson
parent feb5258cf9
commit c4e3cfbf40
8 changed files with 118 additions and 63 deletions

View File

@@ -22,9 +22,12 @@ struct _GNativeVolumeMonitor {
struct _GNativeVolumeMonitorClass {
GVolumeMonitorClass parent_class;
GMount * (*get_mount_for_mount_path) (const char *mount_path);
int priority;
char *name;
GMount * (*get_mount_for_mount_path) (const char *mount_path,
GCancellable *cancellable);
gboolean (*is_supported) (void);
};
GType g_native_volume_monitor_get_type (void) G_GNUC_CONST;