+2008-02-08 Alexander Larsson <alexl@redhat.com>
+
+ * gio.symbols:
+ * gunixvolume.c:
+ * gvolume.[ch]:
+ Add g_volume_should_automount.
+ Docs needed.
+
2008-02-07 Tor Lillqvist <tml@novell.com>
* tests/Makefile.am (TEST_PROGS): live-g-file won't build on
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
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)
{
return res;
}
-
static void
g_unix_volume_volume_iface_init (GVolumeIface *iface)
{
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;
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.
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;
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,