glib r6398 - trunk/gio



Author: matthiasc
Date: Mon Jan 28 17:26:45 2008
New Revision: 6398
URL: http://svn.gnome.org/viewvc/glib?rev=6398&view=rev

Log:
Document new api


Modified:
   trunk/gio/ChangeLog
   trunk/gio/gdrive.c
   trunk/gio/gdrive.h

Modified: trunk/gio/gdrive.c
==============================================================================
--- trunk/gio/gdrive.c	(original)
+++ trunk/gio/gdrive.c	Mon Jan 28 17:26:45 2008
@@ -474,9 +474,20 @@
   return (* iface->poll_for_media_finish) (drive, result, error);
 }
 
+/**
+ * g_drive_get_identifier:
+ * @drive: a #GDrive
+ * @kind: the kind of identifier to return
+ *
+ * Gets the identifier of the given kind for @drive.
+ *
+ * Returns: a newly allocated string containing the
+ *   requested identfier, or %NULL if the #GDrive
+ *   doesn't have this kind of identifier
+ */
 char *
-g_drive_get_identifier (GDrive              *drive,
-			const char          *kind)
+g_drive_get_identifier (GDrive     *drive,
+			const char *kind)
 {
   GDriveIface *iface;
 
@@ -491,6 +502,17 @@
   return (* iface->get_identifier) (drive, kind);
 }
 
+/**
+ * g_drive_enumerate_identifiers:
+ * @drive: a #GDrive
+ *
+ * Gets the kinds of identifiers that @drive has. 
+ * Use g_drive_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_drive_enumerate_identifiers (GDrive *drive)
 {

Modified: trunk/gio/gdrive.h
==============================================================================
--- trunk/gio/gdrive.h	(original)
+++ trunk/gio/gdrive.h	Mon Jan 28 17:26:45 2008
@@ -59,6 +59,11 @@
  * @eject_finish: Finishes an eject operation.
  * @poll_for_media: Poll for media insertion/removal on a #GDrive.
  * @poll_for_media_finish: Finishes a media poll operation.
+ * @get_identifier: Returns the identifier of the given kind, or %NULL if 
+ *    the #GDrive doesn't have one.
+ * @enumerate_identifiers: Returns an array strings listing the kinds
+ *    of identifiers which the #GDrive has.
+ *
  * 
  * Interface for creating #GDrive implementations.
  */ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]