[glib] [Gio] Merge in introspection annotations from gobject-introspection gio-2.0.c



commit 7c36619d269284597d5df4f366b6389df9bcf617
Author: Colin Walters <walters verbum org>
Date:   Thu Jun 10 14:02:15 2010 -0400

    [Gio] Merge in introspection annotations from gobject-introspection gio-2.0.c
    
    This is not an exhaustive set, but covers everything we have so far.

 gio/gappinfo.c            |   10 +++++-----
 gio/gdesktopappinfo.c     |    6 +++---
 gio/gdrive.c              |    2 +-
 gio/gfile.c               |   34 +++++++++++++++++-----------------
 gio/gfileenumerator.c     |    2 +-
 gio/gfileinfo.c           |   14 +++++++-------
 gio/gfilenamecompleter.c  |    2 +-
 gio/gfilterinputstream.c  |    2 +-
 gio/gfilteroutputstream.c |    2 +-
 gio/goutputstream.c       |    6 +++---
 gio/gvolume.c             |    8 ++++----
 gio/gvolumemonitor.c      |    6 +++---
 12 files changed, 47 insertions(+), 47 deletions(-)
---
diff --git a/gio/gappinfo.c b/gio/gappinfo.c
index 38e3063..0689553 100644
--- a/gio/gappinfo.c
+++ b/gio/gappinfo.c
@@ -439,7 +439,7 @@ g_app_info_remove_supports_type (GAppInfo    *appinfo,
  * 
  * Gets the icon for the application.
  *
- * Returns: the default #GIcon for @appinfo.
+ * Returns: (transfer none): the default #GIcon for @appinfo.
  **/
 GIcon *
 g_app_info_get_icon (GAppInfo *appinfo)
@@ -457,8 +457,8 @@ g_app_info_get_icon (GAppInfo *appinfo)
 /**
  * g_app_info_launch:
  * @appinfo: a #GAppInfo
- * @files: a #GList of #GFile objects
- * @launch_context: a #GAppLaunchContext or %NULL
+ * @files: (element-type GFile): a #GList of #GFile objects
+ * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
  * @error: a #GError
  * 
  * Launches the application. Passes @files to the launched application
@@ -549,8 +549,8 @@ g_app_info_supports_files (GAppInfo *appinfo)
 /**
  * g_app_info_launch_uris:
  * @appinfo: a #GAppInfo
- * @uris: a #GList containing URIs to launch.
- * @launch_context: a #GAppLaunchContext or %NULL
+ * @uris: (element-type char*): a #GList containing URIs to launch.
+ * @launch_context: (allow-none): a #GAppLaunchContext or %NULL
  * @error: a #GError
  * 
  * Launches the application. Passes @uris to the launched application
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 493a3cd..4db17c4 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -1620,7 +1620,7 @@ g_desktop_app_info_delete (GAppInfo *appinfo)
 /**
  * g_app_info_create_from_commandline:
  * @commandline: the commandline to use
- * @application_name: the application name, or %NULL to use @commandline
+ * @application_name: (allow-none): the application name, or %NULL to use @commandline
  * @flags: flags that can specify details of the created #GAppInfo
  * @error: a #GError location to store the error occuring, %NULL to ignore.
  *
@@ -1718,7 +1718,7 @@ app_info_in_list (GAppInfo *info,
  * 
  * Gets a list of all #GAppInfo<!-- -->s for a given content type.
  *
- * Returns: #GList of #GAppInfo<!-- -->s for given @content_type
+ * Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfo<!-- -->s for given @content_type
  *    or %NULL on error.
  **/
 GList *
@@ -1957,7 +1957,7 @@ get_apps_from_dir (GHashTable *apps,
  * The returned list does not include applications which have
  * the <literal>Hidden</literal> key set. 
  * 
- * Returns: a newly allocated #GList of references to #GAppInfo<!---->s.
+ * Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfo<!---->s.
  **/
 GList *
 g_app_info_get_all (void)
diff --git a/gio/gdrive.c b/gio/gdrive.c
index 4a45dff..2147b79 100644
--- a/gio/gdrive.c
+++ b/gio/gdrive.c
@@ -204,7 +204,7 @@ g_drive_has_volumes (GDrive *drive)
  * The returned list should be freed with g_list_free(), after
  * its elements have been unreffed with g_object_unref().
  * 
- * Returns: #GList containing any #GVolume objects on the given @drive.
+ * Returns: (element-type GVolume) (transfer full): #GList containing any #GVolume objects on the given @drive.
  **/
 GList *
 g_drive_get_volumes (GDrive *drive)
diff --git a/gio/gfile.c b/gio/gfile.c
index 2a0f678..1e03735 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -1590,7 +1590,7 @@ g_file_create (GFile             *file,
 /**
  * g_file_replace:
  * @file: input #GFile.
- * @etag: an optional <link linkend="gfile-etag">entity tag</link> for the 
+ * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the 
  *     current #GFile, or #NULL to ignore.
  * @make_backup: %TRUE if a backup should be created.
  * @flags: a set of #GFileCreateFlags.
@@ -1788,7 +1788,7 @@ g_file_create_readwrite (GFile             *file,
 /**
  * g_file_replace_readwrite:
  * @file: a #GFile
- * @etag: an optional <link linkend="gfile-etag">entity tag</link> for the
+ * @etag: (allow-none): an optional <link linkend="gfile-etag">entity tag</link> for the
  *     current #GFile, or #NULL to ignore
  * @make_backup: %TRUE if a backup should be created
  * @flags: a set of #GFileCreateFlags
@@ -2056,7 +2056,7 @@ g_file_create_finish (GFile         *file,
 /**
  * g_file_replace_async:
  * @file: input #GFile.
- * @etag: an <link linkend="gfile-etag">entity tag</link> for the 
+ * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the 
  *     current #GFile, or NULL to ignore.
  * @make_backup: %TRUE if a backup should be created.
  * @flags: a set of #GFileCreateFlags.
@@ -2288,7 +2288,7 @@ g_file_create_readwrite_finish (GFile         *file,
 /**
  * g_file_replace_readwrite_async:
  * @file: input #GFile.
- * @etag: an <link linkend="gfile-etag">entity tag</link> for the
+ * @etag: (allow-none): an <link linkend="gfile-etag">entity tag</link> for the
  *     current #GFile, or NULL to ignore.
  * @make_backup: %TRUE if a backup should be created.
  * @flags: a set of #GFileCreateFlags.
@@ -3999,7 +3999,7 @@ g_file_set_attributes_async (GFile               *file,
  * g_file_set_attributes_finish:
  * @file: input #GFile.
  * @result: a #GAsyncResult.
- * @info: a #GFileInfo.
+ * @info: (out) (transfer full): a #GFileInfo.
  * @error: a #GError, or %NULL
  * 
  * Finishes setting an attribute started in g_file_set_attributes_async().
@@ -6159,10 +6159,10 @@ g_file_query_default_handler (GFile                  *file,
  * g_file_load_contents:
  * @file: input #GFile.
  * @cancellable: optional #GCancellable object, %NULL to ignore.
- * @contents: a location to place the contents of the file.
- * @length: a location to place the length of the contents of the file,
+ * @contents: (out) (transfer full): a location to place the contents of the file.
+ * @length: (out) (allow-none): a location to place the length of the contents of the file,
  *    or %NULL if the length is not needed
- * @etag_out: a location to place the current entity tag for the file,
+ * @etag_out: (out) (allow-none): a location to place the current entity tag for the file,
  *    or %NULL if the entity tag is not needed
  * @error: a #GError, or %NULL
  *
@@ -6467,10 +6467,10 @@ g_file_load_partial_contents_async (GFile                 *file,
  * g_file_load_partial_contents_finish:
  * @file: input #GFile.
  * @res: a #GAsyncResult. 
- * @contents: a location to place the contents of the file.
- * @length: a location to place the length of the contents of the file,
+ * @contents: (out) (transfer full): a location to place the contents of the file.
+ * @length: (out) (allow-none): a location to place the length of the contents of the file,
  *     or %NULL if the length is not needed
- * @etag_out: a location to place the current entity tag for the file,
+ * @etag_out: (out) (allow-none): a location to place the current entity tag for the file,
  *     or %NULL if the entity tag is not needed
  * @error: a #GError, or %NULL
  * 
@@ -6573,10 +6573,10 @@ g_file_load_contents_async (GFile               *file,
  * g_file_load_contents_finish:
  * @file: input #GFile.
  * @res: a #GAsyncResult. 
- * @contents: a location to place the contents of the file.
- * @length: a location to place the length of the contents of the file,
+ * @contents: (out) (transfer full): a location to place the contents of the file.
+ * @length: (out) (allow-none): a location to place the length of the contents of the file,
  *     or %NULL if the length is not needed
- * @etag_out: a location to place the current entity tag for the file,
+ * @etag_out: (out) (allow-none): a location to place the current entity tag for the file,
  *     or %NULL if the entity tag is not needed
  * @error: a #GError, or %NULL
  * 
@@ -6610,7 +6610,7 @@ g_file_load_contents_finish (GFile         *file,
  * @file: input #GFile.
  * @contents: a string containing the new contents for @file.
  * @length: the length of @contents in bytes.
- * @etag: the old <link linkend="gfile-etag">entity tag</link> 
+ * @etag: (allow-none): the old <link linkend="gfile-etag">entity tag</link> 
  *     for the document, or %NULL
  * @make_backup: %TRUE if a backup should be created.
  * @flags: a set of #GFileCreateFlags.
@@ -6824,7 +6824,7 @@ replace_contents_open_callback (GObject      *obj,
  * @file: input #GFile.
  * @contents: string of contents to replace the file with.
  * @length: the length of @contents in bytes.
- * @etag: a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
+ * @etag: (allow-none): a new <link linkend="gfile-etag">entity tag</link> for the @file, or %NULL
  * @make_backup: %TRUE if a backup should be created.
  * @flags: a set of #GFileCreateFlags.
  * @cancellable: optional #GCancellable object, %NULL to ignore.
@@ -6887,7 +6887,7 @@ g_file_replace_contents_async  (GFile               *file,
  * g_file_replace_contents_finish:
  * @file: input #GFile.
  * @res: a #GAsyncResult. 
- * @new_etag: a location of a new <link linkend="gfile-etag">entity tag</link> 
+ * @new_etag: (out) (allow-none): a location of a new <link linkend="gfile-etag">entity tag</link> 
  *     for the document. This should be freed with g_free() when it is no 
  *     longer needed, or %NULL
  * @error: a #GError, or %NULL 
diff --git a/gio/gfileenumerator.c b/gio/gfileenumerator.c
index f97ce91..f9439d2 100644
--- a/gio/gfileenumerator.c
+++ b/gio/gfileenumerator.c
@@ -391,7 +391,7 @@ g_file_enumerator_next_files_async (GFileEnumerator     *enumerator,
  * 
  * Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
  * 
- * Returns: a #GList of #GFileInfo<!---->s. You must free the list with 
+ * Returns: (transfer full) (element-type FileInfo): a #GList of #GFileInfo<!---->s. You must free the list with 
  *     g_list_free() and unref the infos with g_object_unref() when you're 
  *     done with them.
  **/
diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c
index b9722a3..b101af4 100644
--- a/gio/gfileinfo.c
+++ b/gio/gfileinfo.c
@@ -618,7 +618,7 @@ g_file_info_has_namespace (GFileInfo  *info,
  * 
  * Lists the file info structure's attributes.
  * 
- * Returns: a null-terminated array of strings of all of the 
+ * Returns: (array zero-terminated=1) (transfer full): a null-terminated array of strings of all of the 
  * possible attribute types for the given @name_space, or 
  * %NULL on error.
  **/
@@ -709,13 +709,13 @@ g_file_info_remove_attribute (GFileInfo  *info,
  * g_file_info_get_attribute_data:
  * @info: a #GFileInfo
  * @attribute: a file attribute key
- * @type: return location for the attribute type, or %NULL
- * @value_pp: return location for the attribute value, or %NULL
- * @status: return location for the attribute status, or %NULL
+ * @type: (out) (allow-none): return location for the attribute type, or %NULL
+ * @value_pp: (out) (allow-none): return location for the attribute value, or %NULL
+ * @status: (out) (allow-none): return location for the attribute status, or %NULL
  *
  * Gets the attribute type, value and status for an attribute key.
  *
- * Returns: %TRUE if @info has an attribute named @attribute, 
+ * Returns: (transfer none): %TRUE if @info has an attribute named @attribute, 
  *      %FALSE otherwise.
  */
 gboolean
@@ -850,7 +850,7 @@ g_file_info_get_attribute_as_string (GFileInfo  *info,
  * Gets the value of a #GObject attribute. If the attribute does 
  * not contain a #GObject, %NULL will be returned.
  * 
- * Returns: a #GObject associated with the given @attribute, or
+ * Returns: (transfer none): a #GObject associated with the given @attribute, or
  * %NULL otherwise.
  **/
 GObject *
@@ -1604,7 +1604,7 @@ g_file_info_get_edit_name (GFileInfo *info)
  * 
  * Gets the icon for a file.
  * 
- * Returns: #GIcon for the given @info.
+ * Returns: (transfer none): #GIcon for the given @info.
  **/
 GIcon *
 g_file_info_get_icon (GFileInfo *info)
diff --git a/gio/gfilenamecompleter.c b/gio/gfilenamecompleter.c
index 5247677..19a8f16 100644
--- a/gio/gfilenamecompleter.c
+++ b/gio/gfilenamecompleter.c
@@ -465,7 +465,7 @@ g_filename_completer_get_completion_suffix (GFilenameCompleter *completer,
  * 
  * Gets an array of completion strings for a given initial text.
  * 
- * Returns: array of strings with possible completions for @initial_text.
+ * Returns: (array zero-terminated=1) (transfer full): array of strings with possible completions for @initial_text.
  * This array must be freed by g_strfreev() when finished. 
  **/
 char **
diff --git a/gio/gfilterinputstream.c b/gio/gfilterinputstream.c
index 53e305a..2cb8b29 100644
--- a/gio/gfilterinputstream.c
+++ b/gio/gfilterinputstream.c
@@ -195,7 +195,7 @@ g_filter_input_stream_init (GFilterInputStream *stream)
  * 
  * Gets the base stream for the filter stream.
  *
- * Returns: a #GInputStream.
+ * Returns: (transfer none): a #GInputStream.
  **/
 GInputStream *
 g_filter_input_stream_get_base_stream (GFilterInputStream *stream)
diff --git a/gio/gfilteroutputstream.c b/gio/gfilteroutputstream.c
index 606f669..aa76500 100644
--- a/gio/gfilteroutputstream.c
+++ b/gio/gfilteroutputstream.c
@@ -196,7 +196,7 @@ g_filter_output_stream_init (GFilterOutputStream *stream)
  * 
  * Gets the base stream for the filter stream.
  *
- * Returns: a #GOutputStream.
+ * Returns: (transfer none): a #GOutputStream.
  **/
 GOutputStream *
 g_filter_output_stream_get_base_stream (GFilterOutputStream *stream)
diff --git a/gio/goutputstream.c b/gio/goutputstream.c
index 82edb5f..d79d93d 100644
--- a/gio/goutputstream.c
+++ b/gio/goutputstream.c
@@ -149,7 +149,7 @@ g_output_stream_init (GOutputStream *stream)
 /**
  * g_output_stream_write:
  * @stream: a #GOutputStream.
- * @buffer: the buffer containing the data to write. 
+ * @buffer: (array length=count) (element-type uint8): the buffer containing the data to write. 
  * @count: the number of bytes to write
  * @cancellable: optional cancellable object
  * @error: location to store the error occuring, or %NULL to ignore
@@ -227,7 +227,7 @@ g_output_stream_write (GOutputStream  *stream,
 /**
  * g_output_stream_write_all:
  * @stream: a #GOutputStream.
- * @buffer: the buffer containing the data to write. 
+ * @buffer: (array length=count) (element-type uint8): the buffer containing the data to write. 
  * @count: the number of bytes to write
  * @bytes_written: location to store the number of bytes that was 
  *     written to the stream
@@ -651,7 +651,7 @@ async_ready_close_flushed_callback_wrapper (GObject      *source_object,
 /**
  * g_output_stream_write_async:
  * @stream: A #GOutputStream.
- * @buffer: the buffer containing the data to write. 
+ * @buffer: (array length=count) (element-type uint8): the buffer containing the data to write. 
  * @count: the number of bytes to write
  * @io_priority: the io priority of the request.
  * @cancellable: optional #GCancellable object, %NULL to ignore.
diff --git a/gio/gvolume.c b/gio/gvolume.c
index b2b85bb..3768b69 100644
--- a/gio/gvolume.c
+++ b/gio/gvolume.c
@@ -141,7 +141,7 @@ g_volume_get_name (GVolume *volume)
  * 
  * Gets the icon for @volume.
  * 
- * Returns: a #GIcon.
+ * Returns: (transfer full): a #GIcon.
  *     The returned object should be unreffed with g_object_unref()
  *     when no longer needed.
  **/
@@ -188,7 +188,7 @@ g_volume_get_uuid (GVolume *volume)
  * 
  * Gets the drive for the @volume.
  * 
- * Returns: a #GDrive or %NULL if @volume is not associated with a drive.
+ * Returns: (transfer full): a #GDrive or %NULL if @volume is not associated with a drive.
  *     The returned object should be unreffed with g_object_unref()
  *     when no longer needed.
  **/
@@ -210,7 +210,7 @@ g_volume_get_drive (GVolume *volume)
  * 
  * Gets the mount for the @volume.
  * 
- * Returns: a #GMount or %NULL if @volume isn't mounted.
+ * Returns: (transfer full): a #GMount or %NULL if @volume isn't mounted.
  *     The returned object should be unreffed with g_object_unref()
  *     when no longer needed.
  **/
@@ -301,7 +301,7 @@ g_volume_should_automount (GVolume *volume)
  * g_volume_mount:
  * @volume: a #GVolume.
  * @flags: flags affecting the operation
- * @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
+ * @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
  * @cancellable: optional #GCancellable object, %NULL to ignore.
  * @callback: a #GAsyncReadyCallback, or %NULL.
  * @user_data: user data that gets passed to @callback
diff --git a/gio/gvolumemonitor.c b/gio/gvolumemonitor.c
index c01162b..ec00d5a 100644
--- a/gio/gvolumemonitor.c
+++ b/gio/gvolumemonitor.c
@@ -283,7 +283,7 @@ g_volume_monitor_init (GVolumeMonitor *monitor)
  * The returned list should be freed with g_list_free(), after
  * its elements have been unreffed with g_object_unref().
  *
- * Returns: a #GList of connected #GDrive objects.
+ * Returns: (element-type GDrive) (transfer full): a #GList of connected #GDrive objects.
  **/
 GList *
 g_volume_monitor_get_connected_drives (GVolumeMonitor *volume_monitor)
@@ -306,7 +306,7 @@ g_volume_monitor_get_connected_drives (GVolumeMonitor *volume_monitor)
  * The returned list should be freed with g_list_free(), after
  * its elements have been unreffed with g_object_unref().
  *
- * Returns: a #GList of #GVolume objects.
+ * Returns: (element-type GVolume) (transfer full): a #GList of #GVolume objects.
  **/
 GList *
 g_volume_monitor_get_volumes (GVolumeMonitor *volume_monitor)
@@ -329,7 +329,7 @@ g_volume_monitor_get_volumes (GVolumeMonitor *volume_monitor)
  * The returned list should be freed with g_list_free(), after
  * its elements have been unreffed with g_object_unref().
  * 
- * Returns: a #GList of #GMount objects.
+ * Returns: (element-type GMount) (transfer full): a #GList of #GMount objects.
  **/
 GList *
 g_volume_monitor_get_mounts (GVolumeMonitor *volume_monitor)



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