From 4c84eac38e27abbedb32084b423a40fb9fabb86c Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 25 May 2018 14:45:31 +0200 Subject: [PATCH] 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 --- docs/reference/gio/gio-sections.txt | 1 + gio/gdrive.c | 4 +++- gio/gdrive.h | 9 +++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/reference/gio/gio-sections.txt b/docs/reference/gio/gio-sections.txt index 0a35f9541..b1cb4e5a3 100644 --- a/docs/reference/gio/gio-sections.txt +++ b/docs/reference/gio/gio-sections.txt @@ -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 G_DRIVE G_IS_DRIVE diff --git a/gio/gdrive.c b/gio/gdrive.c index bd42691d9..d8c286793 100644 --- a/gio/gdrive.c +++ b/gio/gdrive.c @@ -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 diff --git a/gio/gdrive.h b/gio/gdrive.h index a33704219..ec92071c7 100644 --- a/gio/gdrive.h +++ b/gio/gdrive.h @@ -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))