More documentation cleanup and filling in missing information, bringing

2007-12-09  A. Walton  <awalton@svn.gnome.org>

	* gdesktopappinfo.c:
	* gdrive.c:
	* gdrive.h:
	* gfile.c:
	* gfile.h:
	* gfileattribute.c:
	* gfileenumerator.c:
	* gioerror.c:
	* gioscheduler.c:
	* gioscheduler.h:
	* gloadableicon.c:
	* gmemoryinputstream.c:
	* gmemoryoutputstream.c:
	* goutputstream.h:
	* gsimpleasyncresult.c:
	More documentation cleanup and filling in missing information, 
bringing
	GIO to 99% symbol coverage.

svn path=/trunk/; revision=6077
This commit is contained in:
A. Walton
2007-12-09 15:51:12 +00:00
committed by Andrew Walton
parent b877c83cdc
commit ab69ee2945
17 changed files with 213 additions and 90 deletions

View File

@@ -1,3 +1,23 @@
2007-12-09 A. Walton <awalton@svn.gnome.org>
* gdesktopappinfo.c:
* gdrive.c:
* gdrive.h:
* gfile.c:
* gfile.h:
* gfileattribute.c:
* gfileenumerator.c:
* gioerror.c:
* gioscheduler.c:
* gioscheduler.h:
* gloadableicon.c:
* gmemoryinputstream.c:
* gmemoryoutputstream.c:
* goutputstream.h:
* gsimpleasyncresult.c:
More documentation cleanup and filling in missing information, bringing
GIO to 99% symbol coverage.
2007-12-08 Hans Breuer <hans@breuer.org> 2007-12-08 Hans Breuer <hans@breuer.org>
[gio compiles and links on win32, not sure how much already works] [gio compiles and links on win32, not sure how much already works]

View File

@@ -1572,9 +1572,13 @@ g_app_info_get_default_for_type (const char *content_type,
/** /**
* g_app_info_get_default_for_uri_scheme: * g_app_info_get_default_for_uri_scheme:
* @uri_scheme: * @uri_scheme: a string containing a URI scheme.
* *
* Returns: #GAppInfo * Gets the default application for launching applications using this URI scheme.
*
* TODO: This is currently unimplemented.
*
* Returns: %NULL.
**/ **/
GAppInfo * GAppInfo *
g_app_info_get_default_for_uri_scheme (const char *uri_scheme) g_app_info_get_default_for_uri_scheme (const char *uri_scheme)
@@ -1669,7 +1673,9 @@ collect_apps (gpointer key,
/** /**
* g_app_info_get_all: * g_app_info_get_all:
* *
* Returns: a newly allocated #GList of references to #GAppInfo s. * Gets a list of all of the applications currently registered on this system.
*
* Returns: a newly allocated #GList of references to #GAppInfo<!---->s.
**/ **/
GList * GList *
g_app_info_get_all (void) g_app_info_get_all (void)

View File

@@ -171,7 +171,7 @@ g_drive_has_volumes (GDrive *drive)
* Gets a list of volumes for a drive. * Gets a list of volumes for a drive.
* *
* Returns: #GList containing any #GVolume<!---->s on the given @drive. * Returns: #GList containing any #GVolume<!---->s on the given @drive.
* NOTE: Fact-check this. * <!-- NOTE: Fact-check this. -->
**/ **/
GList * GList *
g_drive_get_volumes (GDrive *drive) g_drive_get_volumes (GDrive *drive)
@@ -289,13 +289,17 @@ g_drive_mount (GDrive *drive,
/** /**
* g_drive_mount_finish: * g_drive_mount_finish:
* @drive: pointer to a #GDrive. * @drive: a #GDrive.
* @result: a #GAsyncResult. * @result: a #GAsyncResult.
* @error: a #GError. * @error: a #GError.
* *
* Finishes mounting a drive. * Finishes mounting a drive.
* *
* Returns: %TRUE, %FALSE if operation failed. * If the @drive's interface does not implement the mount operation, @error will
* be set to %G_IO_ERROR_NOT_SUPPORTED and %FALSE will be returned.
*
* Returns: %TRUE if the mount was finished successfully,
* %FALSE if operation failed.
**/ **/
gboolean gboolean
g_drive_mount_finish (GDrive *drive, g_drive_mount_finish (GDrive *drive,
@@ -360,6 +364,9 @@ g_drive_eject (GDrive *drive,
* *
* Finishes ejecting a drive. * Finishes ejecting a drive.
* *
* If @drive's interface does not implement the eject operation, @error will
* be set to %G_IO_ERROR_NOT_SUPPORTED and %FALSE will be returned.
*
* Returns: %TRUE if the drive has been ejected successfully, * Returns: %TRUE if the drive has been ejected successfully,
* %FALSE otherwise. * %FALSE otherwise.
**/ **/

View File

@@ -45,7 +45,7 @@ G_BEGIN_DECLS
* @is_automounted: returns %TRUE if the #GDrive was automounted. * @is_automounted: returns %TRUE if the #GDrive was automounted.
* @can_mount: Returns %TRUE if the #GDrive can be mounted. * @can_mount: Returns %TRUE if the #GDrive can be mounted.
* @can_eject: Returns %TRUE if the #GDrive can be ejected. * @can_eject: Returns %TRUE if the #GDrive can be ejected.
* @mount: Mounts a given #GDrive. * @mount_fn: Mounts a given #GDrive.
* @mount_finish: Finishes a mount operation. * @mount_finish: Finishes a mount operation.
* @eject: Ejects a #GDrive. * @eject: Ejects a #GDrive.
* @eject_finish: Finishes an eject operation. * @eject_finish: Finishes an eject operation.

View File

@@ -52,6 +52,7 @@
* To construct a #GFile, you can use: * To construct a #GFile, you can use:
* g_file_new_for_path() if you have a path. * g_file_new_for_path() if you have a path.
* g_file_new_for_uri() if you have a URI. * g_file_new_for_uri() if you have a URI.
* g_file_new_for_commandline_arg() for a command line argument.
* *
* You can move through the filesystem with #GFile handles with * You can move through the filesystem with #GFile handles with
* g_file_get_parent() to get a handle to the parent directory. * g_file_get_parent() to get a handle to the parent directory.
@@ -425,9 +426,9 @@ g_file_dup (GFile *file)
* Creates a hash value for a #GFile. * Creates a hash value for a #GFile.
* *
* Returns: 0 if @file is not a valid #GFile, otherwise an * Returns: 0 if @file is not a valid #GFile, otherwise an
* integer that can be used as hash value for the #GFile. * integer that can be used as hash value for the #GFile.
* This function is intended for easily hashing a #GFile to * This function is intended for easily hashing a #GFile to
* add to a #GHashTable or similar data structure. * add to a #GHashTable or similar data structure.
**/ **/
guint guint
g_file_hash (gconstpointer file) g_file_hash (gconstpointer file)
@@ -449,7 +450,7 @@ g_file_hash (gconstpointer file)
* Checks equality of two given #GFile<!-- -->s * Checks equality of two given #GFile<!-- -->s
* *
* Returns: %TRUE if @file1 and @file2 are equal. * Returns: %TRUE if @file1 and @file2 are equal.
* %FALSE if either is not a #GFile. * %FALSE if either is not a #GFile.
**/ **/
gboolean gboolean
g_file_equal (GFile *file1, g_file_equal (GFile *file1,
@@ -478,7 +479,7 @@ g_file_equal (GFile *file1,
* file system, then %NULL will be returned. * file system, then %NULL will be returned.
* *
* Returns: a #GFile structure to the parent of the given * Returns: a #GFile structure to the parent of the given
* #GFile or %NULL. * #GFile or %NULL.
**/ **/
GFile * GFile *
g_file_get_parent (GFile *file) g_file_get_parent (GFile *file)
@@ -501,8 +502,8 @@ g_file_get_parent (GFile *file)
* it exists. * it exists.
* *
* Returns: a #GFile to a child specified by * Returns: a #GFile to a child specified by
* @name or %NULL if @name is %NULL, or the specified * @name or %NULL if @name is %NULL, or the specified
* child doesn't exist. * child doesn't exist.
**/ **/
GFile * GFile *
g_file_get_child (GFile *file, g_file_get_child (GFile *file,
@@ -525,7 +526,7 @@ g_file_get_child (GFile *file,
* set with %G_IO_ERROR_INVALID_FILENAME. * set with %G_IO_ERROR_INVALID_FILENAME.
* *
* Returns: a #GFile to the specified child, or * Returns: a #GFile to the specified child, or
* %NULL if @display_name is %NULL. * %NULL if @display_name is %NULL.
**/ **/
GFile * GFile *
g_file_get_child_for_display_name (GFile *file, g_file_get_child_for_display_name (GFile *file,
@@ -628,9 +629,10 @@ g_file_resolve_relative_path (GFile *file,
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: #GError for error reporting. * @error: #GError for error reporting.
* *
* Gets a #GFileEnumerator for the children of @file that match @attributes, * Gets a #GFileEnumerator for the children of @file. The returned enumerator will
* automatically generate a #GFileAttributeMatcher internally that match @attributes,
* where attributes is a #GFileAttributeInfo query string (e.g. "std:type", * where attributes is a #GFileAttributeInfo query string (e.g. "std:type",
* "std:*"). * "std:*"). See g_file_enumerator_next_file() for details.
* *
* If @cancellable is not %NULL, then the operation can be cancelled by * If @cancellable is not %NULL, then the operation can be cancelled by
* triggering the cancellable object from another thread. If the operation * triggering the cancellable object from another thread. If the operation
@@ -683,10 +685,11 @@ g_file_enumerate_children (GFile *file,
* @callback: a #GAsyncReadyCallback to call when the request is satisfied * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: the data to pass to callback function * @user_data: the data to pass to callback function
* *
* Asynchronously gets a #GFileEnumerator for the children of @file that * Asynchronously gets a #GFileEnumerator for the children of @file. The returned
* match @attributes, where attributes is a #GFileAttributeInfo query * file enumerator will automatically generate a #GFileAttributeMatcher
* string (e.g. "std:type", "std:*"). For the synchronous version of this * that matches @attributes, where attributes is a #GFileAttributeInfo query
* function, see g_file_enumerate_children(). * string (e.g. "std:type", "std:*"). See g_file_enumerator_next_file() for details.
* For the synchronous version of this function, see g_file_enumerate_children().
* *
* To finish this asynchronous operation, see g_file_enumerate_children_finish(). * To finish this asynchronous operation, see g_file_enumerate_children_finish().
**/ **/
@@ -1166,8 +1169,8 @@ g_file_replace (GFile *file,
* @io_priority: the <link linkend="io-priority">I/O priority</link> * @io_priority: the <link linkend="io-priority">I/O priority</link>
* of the request. * of the request.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: a #gpointer. * @user_data: the data to pass to callback function
* *
* Asynchronously reads @file. * Asynchronously reads @file.
* *
@@ -1239,8 +1242,8 @@ g_file_read_finish (GFile *file,
* @io_priority: the <link linkend="io-priority">I/O priority</link> * @io_priority: the <link linkend="io-priority">I/O priority</link>
* of the request. * of the request.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: a #gpointer. * @user_data: the data to pass to callback function
* *
* Readies a file for appending data asynchronously. * Readies a file for appending data asynchronously.
* *
@@ -1316,8 +1319,8 @@ g_file_append_to_finish (GFile *file,
* @io_priority: the <link linkend="io-priority">I/O priority</link> * @io_priority: the <link linkend="io-priority">I/O priority</link>
* of the request. * of the request.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: a #gpointer. * @user_data: the data to pass to callback function
* *
* Creates a new file asynchronously. * Creates a new file asynchronously.
* *
@@ -1396,8 +1399,8 @@ g_file_create_finish (GFile *file,
* @io_priority: the <link linkend="io-priority">I/O priority</link> * @io_priority: the <link linkend="io-priority">I/O priority</link>
* of the request. * of the request.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: a #gpointer. * @user_data: the data to pass to callback function
* *
* Replaces a file's contents asynchronously. If @make_backup is * Replaces a file's contents asynchronously. If @make_backup is
* %TRUE, this function will attempt to make a backup of the current file. * %TRUE, this function will attempt to make a backup of the current file.
@@ -1659,6 +1662,22 @@ build_attribute_list_for_copy (GFileAttributeInfoList *attributes,
return g_string_free (s, FALSE); return g_string_free (s, FALSE);
} }
/**
* g_file_copy_attributes:
* @source: a #GFile with attributes.
* @destination: a #GFile to copy attributes to.
* @flags: a set of #GFileCopyFlags.
* @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError, %NULL to ignore.
*
* Copies the file attributes from @source to @destination.
*
* If @cancellable is not %NULL, then the operation can be cancelled by
* triggering the cancellable object from another thread. If the operation
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
*
* Returns: %TRUE if the attributes were copied successfully, %FALSE otherwise.
**/
gboolean gboolean
g_file_copy_attributes (GFile *source, g_file_copy_attributes (GFile *source,
GFile *destination, GFile *destination,
@@ -2323,8 +2342,8 @@ g_file_set_display_name (GFile *file,
* @io_priority: the <link linkend="io-priority">I/O priority</link> * @io_priority: the <link linkend="io-priority">I/O priority</link>
* of the request. * of the request.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: a #gpointer. * @user_data: the data to pass to callback function
* *
* Asynchronously sets the display name for a given #GFile. * Asynchronously sets the display name for a given #GFile.
* For the synchronous version of this function, see g_file_set_display_name(). * For the synchronous version of this function, see g_file_set_display_name().
@@ -2906,8 +2925,8 @@ g_file_set_attribute_int64 (GFile *file,
* @file: input #GFile. * @file: input #GFile.
* @mount_operation: a #GMountOperation. * @mount_operation: a #GMountOperation.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: a #gpointer. * @user_data: the data to pass to callback function
* *
* Mounts a mountable file using @mount_operation, if possible. * Mounts a mountable file using @mount_operation, if possible.
* *
@@ -2982,8 +3001,8 @@ g_file_mount_mountable_finish (GFile *file,
* g_file_unmount_mountable: * g_file_unmount_mountable:
* @file: input #GFile. * @file: input #GFile.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: a #gpointer. * @user_data: the data to pass to callback function
* *
* Starts an asynchronous unmount operation. * Starts an asynchronous unmount operation.
* *
@@ -3058,8 +3077,8 @@ g_file_unmount_mountable_finish (GFile *file,
* g_file_eject_mountable: * g_file_eject_mountable:
* @file: input #GFile. * @file: input #GFile.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: a #gpointer. * @user_data: the data to pass to callback function
* *
* Starts an asynchronous eject on a mountable. * Starts an asynchronous eject on a mountable.
* When this operation has completed, @callback will be called with * When this operation has completed, @callback will be called with
@@ -3901,8 +3920,8 @@ g_file_new_for_commandline_arg (const char *arg)
* @location: input #GFile. * @location: input #GFile.
* @mount_operation: a #GMountOperation. * @mount_operation: a #GMountOperation.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: a #gpointer. * @user_data: the data to pass to callback function
* *
* Starts the @mount_operation, mounting the volume at @location. * Starts the @mount_operation, mounting the volume at @location.
* *
@@ -4241,8 +4260,16 @@ load_contents_open_callback (GObject *obj,
* @file: input #GFile. * @file: input #GFile.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @read_more_callback: a #GFileReadMoreCallback. * @read_more_callback: a #GFileReadMoreCallback.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: a #gpointer. * @user_data: the data to pass to the callback functions.
*
* Reads the partial contents of a file. A #GFileReadMoreCallback should be
* used to stop reading from the file when appropriate, else this function
* will behave exactly as g_file_load_contents_async(). This operation
* can be finished by g_file_load_partial_contents_finish().
*
* Users of this function should be aware that @user_data is passed to
* both the @read_more_callback and the @callback.
* *
* If @cancellable is not %NULL, then the operation can be cancelled by * If @cancellable is not %NULL, then the operation can be cancelled by
* triggering the cancellable object from another thread. If the operation * triggering the cancellable object from another thread. If the operation
@@ -4348,8 +4375,8 @@ g_file_load_partial_contents_finish (GFile *file,
* g_file_load_contents_async: * g_file_load_contents_async:
* @file: input #GFile. * @file: input #GFile.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: a #gpointer. * @user_data: the data to pass to callback function
* *
* Starts an asynchronous load of the @file's contents. * Starts an asynchronous load of the @file's contents.
* When the load operation has completed, @callback will be called * When the load operation has completed, @callback will be called
@@ -4625,8 +4652,8 @@ replace_contents_open_callback (GObject *obj,
* @make_backup: a #gboolean. * @make_backup: a #gboolean.
* @flags: a set of #GFileCreateFlags. * @flags: a set of #GFileCreateFlags.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: a #gpointer. * @user_data: the data to pass to callback function
* *
* Starts an asynchronous replacement of @file with the given * Starts an asynchronous replacement of @file with the given
* @contents of @length bytes. @etag will replace the document's * @contents of @length bytes. @etag will replace the document's

View File

@@ -127,11 +127,16 @@ typedef void (*GFileProgressCallback) (goffset current_num_bytes,
/** /**
* GFileReadMoreCallback: * GFileReadMoreCallback:
* @file_contents: * @file_contents: the data as currently read.
* @file_size: * @file_size: the size of the data currently read.
* @callback_data: * @callback_data: data passed to the callback.
* *
* When loading the partial contents of a file with g_file_read_partial_contents(),
* it may become necessary to determine if any more data from the file should be loaded.
* A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data
* should be read, or %FALSE otherwise.
* *
* Returns: %TRUE if more data should be read back. %FALSE otherwise.
**/ **/
typedef gboolean (* GFileReadMoreCallback) (const char *file_contents, typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
goffset file_size, goffset file_size,
@@ -180,7 +185,7 @@ typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
* @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo. * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
* @set_attributes_async: Asynchronously sets a file's attributes. * @set_attributes_async: Asynchronously sets a file's attributes.
* @set_attributes_finish: Finishes setting a file's attributes asynchronously. * @set_attributes_finish: Finishes setting a file's attributes asynchronously.
* @read: Reads a file asynchronously. * @read_fn: Reads a file asynchronously.
* @read_async: Asynchronously reads a file. * @read_async: Asynchronously reads a file.
* @read_finish: Finishes asynchronously reading a file. * @read_finish: Finishes asynchronously reading a file.
* @append_to: Writes to the end of a file. * @append_to: Writes to the end of a file.

View File

@@ -61,7 +61,7 @@
* *
* <para> * <para>
* <table> * <table>
* <title>GFileAttributes Namespaces</title> * <title>GFileAttributes Default Namespaces</title>
* <tgroup cols='2' align='left'><thead> * <tgroup cols='2' align='left'><thead>
* <row><entry>Namspace</entry><entry>Description</entry></row> * <row><entry>Namspace</entry><entry>Description</entry></row>
* </thead> * </thead>
@@ -110,9 +110,13 @@
* </table> * </table>
* </para> * </para>
* *
* Please note that these are not all of the possible namespaces.
* More namespaces can be added from GIO modules or by individual applications. * More namespaces can be added from GIO modules or by individual applications.
* For more information about writing GIO modules, see #GIOModule. * For more information about writing GIO modules, see #GIOModule.
* *
* <!-- TODO: Implementation note about using extended attributes on supported
* file systems -->
*
* <para><table> * <para><table>
* <title>GFileAttributes Built-in Keys and Value Types</title> * <title>GFileAttributes Built-in Keys and Value Types</title>
* <tgroup cols='3' align='left'><thead> * <tgroup cols='3' align='left'><thead>

View File

@@ -33,6 +33,19 @@
* SECTION:gfileenumerator * SECTION:gfileenumerator
* @short_description: Enumerated Files Routines * @short_description: Enumerated Files Routines
* *
* #GFileEnumerator allows you to operate on a set of #GFile<!-- -->s, returning
* a #GFileInfo structure for each file enumerated (e.g. g_file_enumerate_children()
* will return a #GFileEnumerator for each of the children within a directory).
*
* To get the next file's information from a #GFileEnumerator, use
* g_file_enumerator_next_file() or its asynchronous version,
* g_file_enumerator_next_file_async(). Note that the asynchronous version will
* return a list of #GFileInfo<!---->s, whereas the synchronous will only return
* the next file in the enumerator.
*
* To close a #GFileEnumerator, use g_file_enumerator_close(), or its asynchronous
* version, g_file_enumerator_close_async(). Once a #GFileEnumerator is closed,
* no further actions may be performed on it, and it should be freed with g_object_unref().
* *
**/ **/
@@ -108,7 +121,9 @@ g_file_enumerator_init (GFileEnumerator *enumerator)
* @error: location to store the error occuring, or %NULL to ignore * @error: location to store the error occuring, or %NULL to ignore
* *
* Returns information for the next file in the enumerated object. * Returns information for the next file in the enumerated object.
* Will block until the information is available. * Will block until the information is available. The #GFileInfo
* returned from this function will contain attributes that match the
* attribute string that was passed when the #GFileEnumerator was created.
* *
* On error, returns %NULL and sets @error to the error. If the * On error, returns %NULL and sets @error to the error. If the
* enumerator is at the end, %NULL will be returned and @error will * enumerator is at the end, %NULL will be returned and @error will
@@ -234,8 +249,8 @@ next_async_callback_wrapper (GObject *source_object,
* @io_priority: the <link linkend="gioscheduler">io priority</link> * @io_priority: the <link linkend="gioscheduler">io priority</link>
* of the request. * of the request.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: callback to call when the request is satisfied * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: the user_data to pass to callback function * @user_data: the data to pass to callback function
* *
* Request information for a number of files from the enumerator asynchronously. * Request information for a number of files from the enumerator asynchronously.
* When all i/o for the operation is finished the @callback will be called with * When all i/o for the operation is finished the @callback will be called with
@@ -316,9 +331,9 @@ g_file_enumerator_next_files_async (GFileEnumerator *enumerator,
* @error: a #GError location to store the error occuring, or %NULL to * @error: a #GError location to store the error occuring, or %NULL to
* ignore. * ignore.
* *
* Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
* *
* * Returns: a #GList of #GFileInfo<!---->s.
* Returns:
**/ **/
GList * GList *
g_file_enumerator_next_files_finish (GFileEnumerator *enumerator, g_file_enumerator_next_files_finish (GFileEnumerator *enumerator,
@@ -366,9 +381,15 @@ close_async_callback_wrapper (GObject *source_object,
* @io_priority: the <link linkend="io-priority">I/O priority</link> * @io_priority: the <link linkend="io-priority">I/O priority</link>
* of the request. * of the request.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: callback to call when the request is satisfied * @callback: a #GAsyncReadyCallback to call when the request is satisfied
* @user_data: the user_data to pass to callback function * @user_data: the data to pass to callback function
* *
* Asynchronously closes the file enumerator.
*
* If @cancellable is not %NULL, then the operation can be cancelled by
* triggering the cancellable object from another thread. If the operation
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in
* g_file_enumerator_close_finish().
**/ **/
void void
g_file_enumerator_close_async (GFileEnumerator *enumerator, g_file_enumerator_close_async (GFileEnumerator *enumerator,
@@ -417,7 +438,16 @@ g_file_enumerator_close_async (GFileEnumerator *enumerator,
* @error: a #GError location to store the error occuring, or %NULL to * @error: a #GError location to store the error occuring, or %NULL to
* ignore. * ignore.
* *
* Finishes closing a file enumerator, started from g_file_enumerator_close_async().
* *
* If the file enumerator was already closed when g_file_enumerator_close_async()
* was called, then this function will report %G_IO_ERROR_CLOSED in @error, and
* return %FALSE. If the file enumerator had pending operation when the close
* operation was started, then this function will report %G_IO_ERROR_PENDING, and
* return %FALSE. If @cancellable was not %NULL, then the operation may have been
* cancelled by triggering the cancellable object from another thread. If the operation
* was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
* returned.
* *
* Returns: %TRUE if the close operation has finished successfully. * Returns: %TRUE if the close operation has finished successfully.
**/ **/
@@ -447,6 +477,8 @@ g_file_enumerator_close_finish (GFileEnumerator *enumerator,
* g_file_enumerator_is_closed: * g_file_enumerator_is_closed:
* @enumerator: a #GFileEnumerator. * @enumerator: a #GFileEnumerator.
* *
* Checks if the file enumerator has been closed.
*
* Returns: %TRUE if the @enumerator is closed. * Returns: %TRUE if the @enumerator is closed.
**/ **/
gboolean gboolean
@@ -461,6 +493,8 @@ g_file_enumerator_is_closed (GFileEnumerator *enumerator)
* g_file_enumerator_has_pending: * g_file_enumerator_has_pending:
* @enumerator: a #GFileEnumerator. * @enumerator: a #GFileEnumerator.
* *
* Checks if the file enumerator has pending operations.
*
* Returns: %TRUE if the @enumerator has pending operations. * Returns: %TRUE if the @enumerator has pending operations.
**/ **/
gboolean gboolean
@@ -476,6 +510,7 @@ g_file_enumerator_has_pending (GFileEnumerator *enumerator)
* @enumerator: a #GFileEnumerator. * @enumerator: a #GFileEnumerator.
* @pending: a boolean value. * @pending: a boolean value.
* *
* Sets the file enumerator as having pending operations.
**/ **/
void void
g_file_enumerator_set_pending (GFileEnumerator *enumerator, g_file_enumerator_set_pending (GFileEnumerator *enumerator,

View File

@@ -30,6 +30,7 @@
* SECTION:gioerror * SECTION:gioerror
* @short_description: Error helper functions * @short_description: Error helper functions
* *
* Contains helper functions for reporting errors to the user.
**/ **/
/** /**

View File

@@ -30,8 +30,8 @@
* SECTION:gioscheduler * SECTION:gioscheduler
* @short_description: I/O Scheduler * @short_description: I/O Scheduler
* *
* Schedules asynchronous I/O operations for integration into the main * Schedules asynchronous I/O operations. #GIOScheduler integrates into the main
* event loop (#GMainLoop). * event loop (#GMainLoop) and may use threads if they are available.
* *
* <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm> * <para id="io-priority"><indexterm><primary>I/O priority</primary></indexterm>
* Each I/O operation has a priority, and the scheduler uses the priorities * Each I/O operation has a priority, and the scheduler uses the priorities

View File

@@ -50,7 +50,7 @@ typedef void (*GIOJobFunc) (GIOJob *job,
/** /**
* GIODataFunc: * GIODataFunc:
* @user_data: * @user_data: data to pass to the I/O function.
* *
* I/O Data function. * I/O Data function.
* *

View File

@@ -97,7 +97,7 @@ g_loadable_icon_base_init (gpointer g_class)
* g_loadable_icon_load: * g_loadable_icon_load:
* @icon: a #GLoadableIcon. * @icon: a #GLoadableIcon.
* @size: an integer. * @size: an integer.
* @type: * @type: a location to store the type of the loaded icon, %NULL to ignore.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError location to store the error occuring, or %NULL to * @error: a #GError location to store the error occuring, or %NULL to
* ignore. * ignore.
@@ -155,7 +155,7 @@ g_loadable_icon_load_async (GLoadableIcon *icon,
* g_loadable_icon_load_finish: * g_loadable_icon_load_finish:
* @icon: a #GLoadableIcon. * @icon: a #GLoadableIcon.
* @res: a #GAsyncResult. * @res: a #GAsyncResult.
* @type: * @type: a location to store the type of the loaded icon, %NULL to ignore.
* @error: a #GError location to store the error occuring, or %NULL to * @error: a #GError location to store the error occuring, or %NULL to
* ignore. * ignore.
* *

View File

@@ -165,9 +165,11 @@ g_memory_input_stream_init (GMemoryInputStream *stream)
/** /**
* g_memory_input_stream_set_free_data: * g_memory_input_stream_set_free_data:
* @stream: * @stream: a #GMemoryInputStream.
* @free_data: * @free_data: a #gboolean. If %TRUE, frees the data within @stream.
* *
* Sets if the data within the @stream should be freed when the stream
* is freed.
**/ **/
void void
g_memory_input_stream_set_free_data (GMemoryInputStream *stream, g_memory_input_stream_set_free_data (GMemoryInputStream *stream,
@@ -183,6 +185,8 @@ g_memory_input_stream_set_free_data (GMemoryInputStream *stream,
* @data: input data. * @data: input data.
* @len: length of the data. * @len: length of the data.
* *
* Creates a new #GMemoryInputStream with data in memory of a given size.
*
* Returns: new #GInputStream read from @data of @len bytes. * Returns: new #GInputStream read from @data of @len bytes.
**/ **/
GInputStream * GInputStream *
@@ -228,9 +232,11 @@ g_memory_input_stream_read (GInputStream *stream,
/** /**
* g_memory_input_stream_get_data: * g_memory_input_stream_get_data:
* @stream: * @stream: a #GMemoryInputStream
* *
* Returns: * Gets a pointer to the data within the #GMemoryInputStream.
*
* Returns: a pointer to the memory in the @stream.
**/ **/
const void * const void *
g_memory_input_stream_get_data (GMemoryInputStream *stream) g_memory_input_stream_get_data (GMemoryInputStream *stream)
@@ -242,9 +248,12 @@ g_memory_input_stream_get_data (GMemoryInputStream *stream)
/** /**
* g_memory_input_stream_get_data_size: * g_memory_input_stream_get_data_size:
* @stream: * @stream: a #GMemoryInputStream
* *
* Returns: * Gets the size of the data within the #GMemoryInputStream.
*
* Returns: a gsize with the size of the data in @stream, or -1
* on error.
**/ **/
gsize gsize
g_memory_input_stream_get_data_size (GMemoryInputStream *stream) g_memory_input_stream_get_data_size (GMemoryInputStream *stream)

View File

@@ -213,12 +213,12 @@ g_memory_output_stream_init (GMemoryOutputStream *stream)
* Creates a new #GMemoryOutputStream. If @data is non-%NULL it will use * Creates a new #GMemoryOutputStream. If @data is non-%NULL it will use
* that for its internal storage otherwise it will create a new #GByteArray. * that for its internal storage otherwise it will create a new #GByteArray.
* In both cases the internal #GByteArray can later be accessed through the * In both cases the internal #GByteArray can later be accessed through the
* "data" property. * "data" property, or with g_memory_output_stream_get_data().
* *
* Note: The new stream will not take ownership of the supplied * Note: The new stream will not take ownership of the supplied
* @data so you have to free it yourself after use or explicitly * @data so you have to free it yourself after use or explicitly
* ask for it be freed on close by setting the "free-array" * ask for it be freed on close by setting the "free-array"
* property to $TRUE. * property to %TRUE.
* *
* Return value: A newly created #GMemoryOutputStream object. * Return value: A newly created #GMemoryOutputStream object.
**/ **/
@@ -239,9 +239,11 @@ g_memory_output_stream_new (GByteArray *data)
/** /**
* g_memory_output_stream_set_free_data: * g_memory_output_stream_set_free_data:
* @ostream: * @ostream: a #GMemoryOutputStream.
* @free_data: * @free_data: a #gboolean. If %TRUE, frees the data within @stream.
* *
* Sets if the data within the @stream should be freed when the stream
* is freed.
**/ **/
void void
g_memory_output_stream_set_free_data (GMemoryOutputStream *ostream, g_memory_output_stream_set_free_data (GMemoryOutputStream *ostream,
@@ -258,9 +260,10 @@ g_memory_output_stream_set_free_data (GMemoryOutputStream *ostream,
/** /**
* g_memory_output_stream_set_max_size: * g_memory_output_stream_set_max_size:
* @ostream: * @ostream: a #GMemoryOutputStream.
* @max_size: * @max_size: a #guint to set as the maximum stream size.
* *
* Sets a size limit on the data contained within the output stream.
**/ **/
void void
g_memory_output_stream_set_max_size (GMemoryOutputStream *ostream, g_memory_output_stream_set_max_size (GMemoryOutputStream *ostream,
@@ -372,7 +375,9 @@ g_memory_output_stream_get_property (GObject *object,
/** /**
* g_memory_output_stream_get_data: * g_memory_output_stream_get_data:
* @ostream: * @ostream: a #GMemoryOutputStream
*
* Gets any loaded data from the @ostream.
* *
* Returns: #GByteArray of the stream's data. * Returns: #GByteArray of the stream's data.
**/ **/

View File

@@ -40,11 +40,11 @@ G_BEGIN_DECLS
/** /**
* GOutputStreamSpliceFlags: * GOutputStreamSpliceFlags:
* @G_OUTPUT_STREAM_SPLICE_FLAGS_NONE: * @G_OUTPUT_STREAM_SPLICE_FLAGS_NONE: Do not close either stream.
* @G_OUTPUT_STREAM_SPLICE_FLAGS_CLOSE_SOURCE: * @G_OUTPUT_STREAM_SPLICE_FLAGS_CLOSE_SOURCE: Close the source stream after the splice.
* @G_OUTPUT_STREAM_SPLICE_FLAGS_CLOSE_TARGET: * @G_OUTPUT_STREAM_SPLICE_FLAGS_CLOSE_TARGET: Close the target stream after the splice.
*
* *
* GOutputStreamSpliceFlags determine how streams should be spliced.
**/ **/
typedef enum { typedef enum {
G_OUTPUT_STREAM_SPLICE_FLAGS_NONE = 0, G_OUTPUT_STREAM_SPLICE_FLAGS_NONE = 0,

View File

@@ -653,7 +653,9 @@ g_simple_async_result_run_in_thread (GSimpleAsyncResult *simple,
* @format: a formatted error reporting string. * @format: a formatted error reporting string.
* @...: a list of variables to fill in @format. * @...: a list of variables to fill in @format.
* *
* Reports an error in an idle function. * Reports an error in an asynchronous function in an idle function by
* directly setting the contents of the #GAsyncResult with the given error
* information.
**/ **/
void void
g_simple_async_report_error_in_idle (GObject *object, g_simple_async_report_error_in_idle (GObject *object,
@@ -683,13 +685,15 @@ g_simple_async_report_error_in_idle (GObject *object,
} }
/** /**
* g_simple_async_report_error_in_idle: * g_simple_async_report_gerror_in_idle:
* @object: a #GObject. * @object: a #GObject.
* @callback: a #GAsyncReadyCallback. * @callback: a #GAsyncReadyCallback.
* @user_data: user data passed to @callback. * @user_data: user data passed to @callback.
* @error: the #GError to report * @error: the #GError to report
* *
* Reports an error in an idle function. * Reports an error in an idle function. Similar to
* g_simple_async_report_error_in_idle(), but takes a #GError rather
* than building a new one.
**/ **/
void void
g_simple_async_report_gerror_in_idle (GObject *object, g_simple_async_report_gerror_in_idle (GObject *object,