glib r6484 - trunk/gio
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r6484 - trunk/gio
- Date: Fri, 8 Feb 2008 16:12:55 +0000 (GMT)
Author: alexl
Date: Fri Feb 8 16:12:55 2008
New Revision: 6484
URL: http://svn.gnome.org/viewvc/glib?rev=6484&view=rev
Log:
2008-02-08 Alexander Larsson <alexl redhat com>
* gio.symbols:
* gunixvolume.c:
* gvolume.[ch]:
Add g_volume_should_automount.
Docs needed.
Modified:
trunk/gio/ChangeLog
trunk/gio/gio.symbols
trunk/gio/gunixvolume.c
trunk/gio/gvolume.c
trunk/gio/gvolume.h
Modified: trunk/gio/gio.symbols
==============================================================================
--- trunk/gio/gio.symbols (original)
+++ trunk/gio/gio.symbols Fri Feb 8 16:12:55 2008
@@ -713,6 +713,7 @@
g_volume_get_uuid
g_volume_get_drive
g_volume_get_mount
+g_volume_should_automount
g_volume_can_mount
g_volume_can_eject
g_volume_mount
Modified: trunk/gio/gunixvolume.c
==============================================================================
--- trunk/gio/gunixvolume.c (original)
+++ trunk/gio/gunixvolume.c Fri Feb 8 16:12:55 2008
@@ -244,6 +244,14 @@
return unix_volume->can_eject;
}
+static gboolean
+g_unix_volume_should_automount (GVolume *volume)
+{
+ /* We automount all local volumes because we don't even
+ make the internal stuff visible */
+ return TRUE;
+}
+
static GDrive *
g_unix_volume_get_drive (GVolume *volume)
{
@@ -462,7 +470,6 @@
return res;
}
-
static void
g_unix_volume_volume_iface_init (GVolumeIface *iface)
{
@@ -473,6 +480,7 @@
iface->get_mount = g_unix_volume_get_mount;
iface->can_mount = g_unix_volume_can_mount;
iface->can_eject = g_unix_volume_can_eject;
+ iface->should_automount = g_unix_volume_should_automount;
iface->mount_fn = g_unix_volume_mount;
iface->mount_finish = g_unix_volume_mount_finish;
iface->eject = g_unix_volume_eject;
Modified: trunk/gio/gvolume.c
==============================================================================
--- trunk/gio/gvolume.c (original)
+++ trunk/gio/gvolume.c Fri Feb 8 16:12:55 2008
@@ -288,6 +288,22 @@
return (* iface->can_eject) (volume);
}
+gboolean
+g_volume_should_automount (GVolume *volume)
+{
+ GVolumeIface *iface;
+
+ g_return_val_if_fail (G_IS_VOLUME (volume), FALSE);
+
+ iface = G_VOLUME_GET_IFACE (volume);
+
+ if (iface->should_automount == NULL)
+ return FALSE;
+
+ return (* iface->should_automount) (volume);
+}
+
+
/**
* g_volume_mount:
* @volume: a #GVolume.
Modified: trunk/gio/gvolume.h
==============================================================================
--- trunk/gio/gvolume.h (original)
+++ trunk/gio/gvolume.h Fri Feb 8 16:12:55 2008
@@ -109,6 +109,9 @@
char * (*get_identifier) (GVolume *volume,
const char *kind);
char ** (*enumerate_identifiers) (GVolume *volume);
+
+ gboolean (*should_automount) (GVolume *volume);
+
};
GType g_volume_get_type (void) G_GNUC_CONST;
@@ -120,6 +123,7 @@
GMount * g_volume_get_mount (GVolume *volume);
gboolean g_volume_can_mount (GVolume *volume);
gboolean g_volume_can_eject (GVolume *volume);
+gboolean g_volume_should_automount (GVolume *volume);
void g_volume_mount (GVolume *volume,
GMountOperation *mount_operation,
GCancellable *cancellable,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]