glib r6397 - trunk/gio
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r6397 - trunk/gio
- Date: Mon, 28 Jan 2008 17:21:35 +0000 (GMT)
Author: matthiasc
Date: Mon Jan 28 17:21:34 2008
New Revision: 6397
URL: http://svn.gnome.org/viewvc/glib?rev=6397&view=rev
Log:
Document new api
Modified:
trunk/gio/ChangeLog
trunk/gio/gvolume.c
trunk/gio/gvolume.h
Modified: trunk/gio/gvolume.c
==============================================================================
--- trunk/gio/gvolume.c (original)
+++ trunk/gio/gvolume.c Mon Jan 28 17:21:34 2008
@@ -420,9 +420,20 @@
return (* iface->eject_finish) (volume, result, error);
}
+/**
+ * g_volume_get_identifier:
+ * @volume: a #GVolume
+ * @kind: the kind of identifier to return
+ *
+ * Gets the identifier of the given kind for @volume.
+ *
+ * Returns: a newly allocated string containing the
+ * requested identfier, or %NULL if the #GVolume
+ * doesn't have this kind of identifier
+ */
char *
-g_volume_get_identifier (GVolume *volume,
- const char *kind)
+g_volume_get_identifier (GVolume *volume,
+ const char *kind)
{
GVolumeIface *iface;
@@ -437,6 +448,17 @@
return (* iface->get_identifier) (volume, kind);
}
+/**
+ * g_volume_enumerate_identifiers:
+ * @volume: a #GVolume
+ *
+ * Gets the kinds of identifiers that @volume has.
+ * Use g_volume_get_identifer() to obtain the identifiers
+ * themselves.
+ *
+ * Returns: a %NULL-terminated array of strings containing
+ * kinds of identifiers. Use g_strfreev() to free.
+ */
char **
g_volume_enumerate_identifiers (GVolume *volume)
{
Modified: trunk/gio/gvolume.h
==============================================================================
--- trunk/gio/gvolume.h (original)
+++ trunk/gio/gvolume.h Mon Jan 28 17:21:34 2008
@@ -62,6 +62,10 @@
* @mount_finish: Finishes a mount operation.
* @eject: Ejects a given #GVolume.
* @eject_finish: Finishes an eject operation.
+ * @get_identifier: Returns the identifier of the given kind, or %NULL if
+ * the #GVolume doesn't have one.
+ * @enumerate_identifiers: Returns an array strings listing the kinds
+ * of identifiers which the #GVolume has.
*
* Interface for implementing operations for mountable volumes.
**/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]