mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 23:43:39 +02:00
Add g_drive_get_identifier and g_drive_enumerate_identifiers
2008-01-24 Alexander Larsson <alexl@redhat.com> * gdrive.[ch]: Add g_drive_get_identifier and g_drive_enumerate_identifiers * gvolume.[ch]: Add g_volume_get_identifier and g_volume_enumerate_identifiers * gio.symbols: Add symbols * gunixvolume.c: Implement identifiers for unix backend svn path=/trunk/; revision=6364
This commit is contained in:
committed by
Alexander Larsson
parent
270df8d3c8
commit
753428dcf8
32
gio/gdrive.c
32
gio/gdrive.c
@@ -474,5 +474,37 @@ g_drive_poll_for_media_finish (GDrive *drive,
|
||||
return (* iface->poll_for_media_finish) (drive, result, error);
|
||||
}
|
||||
|
||||
char *
|
||||
g_drive_get_identifier (GDrive *drive,
|
||||
const char *kind)
|
||||
{
|
||||
GDriveIface *iface;
|
||||
|
||||
g_return_val_if_fail (G_IS_DRIVE (drive), NULL);
|
||||
g_return_val_if_fail (kind != NULL, NULL);
|
||||
|
||||
iface = G_DRIVE_GET_IFACE (drive);
|
||||
|
||||
if (iface->get_identifier == NULL)
|
||||
return NULL;
|
||||
|
||||
return (* iface->get_identifier) (drive, kind);
|
||||
}
|
||||
|
||||
char **
|
||||
g_drive_enumerate_identifiers (GDrive *drive)
|
||||
{
|
||||
GDriveIface *iface;
|
||||
|
||||
g_return_val_if_fail (G_IS_DRIVE (drive), NULL);
|
||||
iface = G_DRIVE_GET_IFACE (drive);
|
||||
|
||||
if (iface->enumerate_identifiers == NULL)
|
||||
return NULL;
|
||||
|
||||
return (* iface->enumerate_identifiers) (drive);
|
||||
}
|
||||
|
||||
|
||||
#define __G_DRIVE_C__
|
||||
#include "gioaliasdef.c"
|
||||
|
Reference in New Issue
Block a user