mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 14:36:16 +01:00
Add g_volume_should_automount. Docs needed.
2008-02-08 Alexander Larsson <alexl@redhat.com> * gio.symbols: * gunixvolume.c: * gvolume.[ch]: Add g_volume_should_automount. Docs needed. svn path=/trunk/; revision=6484
This commit is contained in:
parent
849f0b277c
commit
61411a5fc2
@ -1,3 +1,11 @@
|
||||
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
|
||||
|
@ -713,6 +713,7 @@ g_volume_get_icon
|
||||
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
|
||||
|
@ -244,6 +244,14 @@ g_unix_volume_can_eject (GVolume *volume)
|
||||
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 @@ g_unix_volume_enumerate_identifiers (GVolume *volume)
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
g_unix_volume_volume_iface_init (GVolumeIface *iface)
|
||||
{
|
||||
@ -473,6 +480,7 @@ 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;
|
||||
|
@ -288,6 +288,22 @@ g_volume_can_eject (GVolume *volume)
|
||||
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.
|
||||
|
@ -109,6 +109,9 @@ struct _GVolumeIface
|
||||
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 @@ GDrive * g_volume_get_drive (GVolume *volume);
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user