Merge branch 'wip/hadess/g-drive-identifier' into 'master'

gio: Add G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE

See merge request GNOME/glib!10
This commit is contained in:
Philip Withnall 2018-05-28 16:31:42 +00:00
commit 6730309826
5 changed files with 18 additions and 2 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: (nullable) (transfer full): 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))

View File

@ -66,7 +66,7 @@
* different kinds of identifiers, such as Hal UDIs, filesystem labels,
* traditional Unix devices (e.g. `/dev/sda2`), UUIDs. GIO uses predefined
* strings as names for the different kinds of identifiers:
* #G_VOLUME_IDENTIFIER_KIND_HAL_UDI, #G_VOLUME_IDENTIFIER_KIND_LABEL, etc.
* #G_VOLUME_IDENTIFIER_KIND_UUID, #G_VOLUME_IDENTIFIER_KIND_LABEL, etc.
* Use g_volume_get_identifier() to obtain an identifier for a volume.
*
*

View File

@ -30,12 +30,16 @@
G_BEGIN_DECLS
#ifndef G_DISABLE_DEPRECATED
/**
* G_VOLUME_IDENTIFIER_KIND_HAL_UDI:
*
* The string used to obtain a Hal UDI with g_volume_get_identifier().
*
* Deprecated: 2.58: Do not use, HAL is deprecated.
*/
#define G_VOLUME_IDENTIFIER_KIND_HAL_UDI "hal-udi"
#endif /* G_DISABLE_DEPRECATED */
/**
* G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE: