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:
Alexander Larsson
2008-01-24 16:06:33 +00:00
committed by Alexander Larsson
parent 270df8d3c8
commit 753428dcf8
7 changed files with 193 additions and 24 deletions

View File

@@ -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"