gio: Add G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE

It's a synonym of G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE.
It doesn't change anything except not feeling dirty from using a wrongly
prefixed constant for the object type.

See: #182
This commit is contained in:
Bastien Nocera 2018-05-25 14:45:31 +02:00
parent bbcce75d4e
commit 4c84eac38e
3 changed files with 13 additions and 1 deletions

View File

@ -1248,6 +1248,7 @@ g_drive_stop_finish
g_drive_enumerate_identifiers
g_drive_get_identifier
g_drive_get_sort_key
G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE
<SUBSECTION Standard>
G_DRIVE
G_IS_DRIVE

View File

@ -611,7 +611,9 @@ g_drive_poll_for_media_finish (GDrive *drive,
* @drive: a #GDrive
* @kind: the kind of identifier to return
*
* Gets the identifier of the given kind for @drive.
* Gets the identifier of the given kind for @drive. The only
* identifier currently available is
* #G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE.
*
* Returns: a newly allocated string containing the
* requested identfier, or %NULL if the #GDrive

View File

@ -30,6 +30,15 @@
G_BEGIN_DECLS
/**
* G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE:
*
* The string used to obtain a Unix device path with g_drive_get_identifier().
*
* Since: 2.58
*/
#define G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE "unix-device"
#define G_TYPE_DRIVE (g_drive_get_type ())
#define G_DRIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DRIVE, GDrive))
#define G_IS_DRIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DRIVE))