More trivial doc fixes

svn path=/trunk/; revision=5968
This commit is contained in:
Matthias Clasen 2007-11-28 06:01:13 +00:00
parent 82d1ac187f
commit 54e52e099e
15 changed files with 197 additions and 176 deletions

View File

@ -1,3 +1,9 @@
2007-11-27 Matthias Clasen <mclasen@redhat.com>
* gcontenttype.c: Move doc comments to the unix section.
* *.[hc]: More trivial doc corrections.
2007-11-27 Matthias Clasen <mclasen@redhat.com> 2007-11-27 Matthias Clasen <mclasen@redhat.com>
* gpollfilemonitor.c: * gpollfilemonitor.c:

View File

@ -307,7 +307,7 @@ g_app_info_add_supports_type (GAppInfo *appinfo,
/** /**
* g_app_info_can_remove_support_type: * g_app_info_can_remove_supports_type:
* @appinfo: a #GAppInfo. * @appinfo: a #GAppInfo.
* *
* Checks if a supported content type can be removed from an application. * Checks if a supported content type can be removed from an application.

View File

@ -28,11 +28,6 @@
#include "gcontenttypeprivate.h" #include "gcontenttypeprivate.h"
#include "glibintl.h" #include "glibintl.h"
/* This really sucks. GTK-Doc isn't smart enough to realize there are two
* different versions of the functions within this file, based on the platform.
* I can move the definitions out of this file, but that's ugly.
*/
/** /**
* SECTION:gcontenttype * SECTION:gcontenttype
* @short_description: platform specific content typing * @short_description: platform specific content typing
@ -82,16 +77,6 @@ get_registry_classes_key (const char *subdir,
return value_utf8; return value_utf8;
} }
/**
* g_content_type_equals:
* @type1: a content type string.
* @type2: a content type string.
*
* Compares two content types for equality.
*
* Returns: %TRUE if the two strings are identical or equivalent,
* %FALSE otherwise.
**/
gboolean gboolean
g_content_type_equals (const char *type1, g_content_type_equals (const char *type1,
const char *type2) const char *type2)
@ -117,16 +102,6 @@ g_content_type_equals (const char *type1,
return res; return res;
} }
/**
* g_content_type_is_a:
* @type: a content type string.
* @supertype: a string.
*
* Determines if @type is a subset of @supertype.
*
* Returns: %TRUE if @type is a kind of @supertype,
* %FALSE otherwise.
**/
gboolean gboolean
g_content_type_is_a (const char *type, g_content_type_is_a (const char *type,
const char *supertype) const char *supertype)
@ -149,14 +124,6 @@ g_content_type_is_a (const char *type,
return res; return res;
} }
/**
* g_content_type_is_unknown:
* @type: a content type string.
*
* Checks if the content type is known by GIO.
*
* Returns: %TRUE if the type is unknown.
**/
gboolean gboolean
g_content_type_is_unknown (const char *type) g_content_type_is_unknown (const char *type)
{ {
@ -165,14 +132,6 @@ g_content_type_is_unknown (const char *type)
return strcmp ("*", type) == 0; return strcmp ("*", type) == 0;
} }
/**
* g_content_type_get_description:
* @type: a content type string.
*
* Gets the human readable description of the content type.
*
* Returns: a short description of the content type @type.
**/
char * char *
g_content_type_get_description (const char *type) g_content_type_get_description (const char *type)
{ {
@ -196,14 +155,6 @@ g_content_type_get_description (const char *type)
return g_strdup_printf (_("%s filetype"), type); return g_strdup_printf (_("%s filetype"), type);
} }
/**
* g_content_type_get_mime_type:
* @type: a content type string.
*
* Gets the mime-type for the content type.
*
* Returns: the registered mime-type for the given @type.
**/
char * char *
g_content_type_get_mime_type (const char *type) g_content_type_get_mime_type (const char *type)
{ {
@ -223,14 +174,6 @@ g_content_type_get_mime_type (const char *type)
return g_strdup ("application/octet-stream"); return g_strdup ("application/octet-stream");
} }
/**
* g_content_type_get_icon:
* @type: a content type string.
*
* Gets the icon for a content type.
*
* Returns: #GIcon corresponding to the content type.
**/
GIcon * GIcon *
g_content_type_get_icon (const char *type) g_content_type_get_icon (const char *type)
{ {
@ -246,16 +189,6 @@ g_content_type_get_icon (const char *type)
return NULL; return NULL;
} }
/**
* g_content_type_can_be_executable:
* @type: a content type string.
*
* Checks if a content type can be executable. Note that for instance
* things like text files can be executables (i.e. scripts and batch files).
*
* Returns: %TRUE if the file type corresponds to a type that
* can be executable, %FALSE otherwise.
**/
gboolean gboolean
g_content_type_can_be_executable (const char *type) g_content_type_can_be_executable (const char *type)
{ {
@ -282,20 +215,6 @@ looks_like_text (const guchar *data, gsize data_size)
return TRUE; return TRUE;
} }
/**
* g_content_type_guess:
* @filename: a string.
* @data: a stream of data.
* @data_size: the size of @data.
* @result_uncertain: a flag indicating the certainty of the
* result.
*
* Guesses the content type based on example data. If the function is
* uncertain, @result_uncertain will be set to %TRUE.
*
* Returns: a string indicating a guessed content type for the
* given data.
**/
char * char *
g_content_type_guess (const char *filename, g_content_type_guess (const char *filename,
const guchar *data, const guchar *data,
@ -326,14 +245,6 @@ g_content_type_guess (const char *filename,
return g_strdup ("*"); return g_strdup ("*");
} }
/**
* g_content_types_get_registered:
*
* Gets a list of strings containing the registered content types on
* the system.
*
* Returns: #GList of the registered content types.
**/
GList * GList *
g_content_types_get_registered (void) g_content_types_get_registered (void)
{ {
@ -428,6 +339,16 @@ _g_unix_content_type_get_parents (const char *type)
return (char **)g_ptr_array_free (array, FALSE); return (char **)g_ptr_array_free (array, FALSE);
} }
/**
* g_content_type_equals:
* @type1: a content type string.
* @type2: a content type string.
*
* Compares two content types for equality.
*
* Returns: %TRUE if the two strings are identical or equivalent,
* %FALSE otherwise.
**/
gboolean gboolean
g_content_type_equals (const char *type1, g_content_type_equals (const char *type1,
const char *type2) const char *type2)
@ -444,6 +365,16 @@ g_content_type_equals (const char *type1,
return res; return res;
} }
/**
* g_content_type_is_a:
* @type: a content type string.
* @supertype: a string.
*
* Determines if @type is a subset of @supertype.
*
* Returns: %TRUE if @type is a kind of @supertype,
* %FALSE otherwise.
**/
gboolean gboolean
g_content_type_is_a (const char *type, g_content_type_is_a (const char *type,
const char *supertype) const char *supertype)
@ -460,6 +391,14 @@ g_content_type_is_a (const char *type,
return res; return res;
} }
/**
* g_content_type_is_unknown:
* @type: a content type string.
*
* Checks if the content type is known by GIO.
*
* Returns: %TRUE if the type is unknown.
**/
gboolean gboolean
g_content_type_is_unknown (const char *type) g_content_type_is_unknown (const char *type)
{ {
@ -624,6 +563,14 @@ load_comment_for_mime (const char *mimetype)
return g_strdup_printf (_("%s type"), mimetype); return g_strdup_printf (_("%s type"), mimetype);
} }
/**
* g_content_type_get_description:
* @type: a content type string.
*
* Gets the human readable description of the content type.
*
* Returns: a short description of the content type @type.
**/
char * char *
g_content_type_get_description (const char *type) g_content_type_get_description (const char *type)
{ {
@ -654,6 +601,14 @@ g_content_type_get_description (const char *type)
return comment; return comment;
} }
/**
* g_content_type_get_mime_type:
* @type: a content type string.
*
* Gets the mime-type for the content type.
*
* Returns: the registered mime-type for the given @type.
**/
char * char *
g_content_type_get_mime_type (const char *type) g_content_type_get_mime_type (const char *type)
{ {
@ -662,6 +617,14 @@ g_content_type_get_mime_type (const char *type)
return g_strdup (type); return g_strdup (type);
} }
/**
* g_content_type_get_icon:
* @type: a content type string.
*
* Gets the icon for a content type.
*
* Returns: #GIcon corresponding to the content type.
**/
GIcon * GIcon *
g_content_type_get_icon (const char *type) g_content_type_get_icon (const char *type)
{ {
@ -675,9 +638,11 @@ g_content_type_get_icon (const char *type)
* g_content_type_can_be_executable: * g_content_type_can_be_executable:
* @type: a content type string. * @type: a content type string.
* *
* Returns: %TRUE if the file type corresponds to something that * Checks if a content type can be executable. Note that for instance
* can be executable, %FALSE otherwise. Note that for instance * things like text files can be executables (i.e. scripts and batch files).
* things like textfiles can be executables (i.e. scripts) *
* Returns: %TRUE if the file type corresponds to a type that
* can be executable, %FALSE otherwise.
**/ **/
gboolean gboolean
g_content_type_can_be_executable (const char *type) g_content_type_can_be_executable (const char *type)
@ -703,6 +668,20 @@ looks_like_text (const guchar *data, gsize data_size)
return TRUE; return TRUE;
} }
/**
* g_content_type_guess:
* @filename: a string.
* @data: a stream of data.
* @data_size: the size of @data.
* @result_uncertain: a flag indicating the certainty of the
* result.
*
* Guesses the content type based on example data. If the function is
* uncertain, @result_uncertain will be set to %TRUE.
*
* Returns: a string indicating a guessed content type for the
* given data.
**/
char * char *
g_content_type_guess (const char *filename, g_content_type_guess (const char *filename,
const guchar *data, const guchar *data,
@ -857,6 +836,14 @@ enumerate_mimetypes_dir (const char *dir, GHashTable *mimetypes)
g_free (mimedir); g_free (mimedir);
} }
/**
* g_content_types_get_registered:
*
* Gets a list of strings containing the registered content types on
* the system.
*
* Returns: #GList of the registered content types.
**/
GList * GList *
g_content_types_get_registered (void) g_content_types_get_registered (void)
{ {

View File

@ -1336,11 +1336,13 @@ g_desktop_app_info_remove_supports_type (GAppInfo *appinfo,
/** /**
* g_app_info_create_from_commandline: * g_app_info_create_from_commandline:
* @commandline: * @commandline: the commandline to use
* @application_name: * @application_name: the application name, or %NULL to use @commandline
* @flags: * @flags: flags that can specify details of the created #GAppInfo
* @error: a #GError location to store the error occuring, or %NULL to * @error: a #GError location to store the error occuring, %NULL to ignore.
* ignore. *
* Creates a new #GAppInfo from the given information.
*
* Returns: new #GAppInfo for given command. * Returns: new #GAppInfo for given command.
**/ **/
GAppInfo * GAppInfo *
@ -1484,7 +1486,7 @@ app_info_in_list (GAppInfo *info, GList *l)
/** /**
* g_app_info_get_all_for_type: * g_app_info_get_all_for_type:
* @content_type: * @content_type: the content type to find a #GAppInfo for
* *
* Gets a list of all #GAppInfo s for a given content type. * Gets a list of all #GAppInfo s for a given content type.
* *
@ -1523,12 +1525,11 @@ g_app_info_get_all_for_type (const char *content_type)
/** /**
* g_app_info_get_default_for_type: * g_app_info_get_default_for_type:
* @content_type: * @content_type: the content type to find a #GAppInfo for
* @must_support_uris: * @must_support_uris: if %TRUE, the #GAppInfo is expected to
* support URIs
* *
* Gets the #GAppInfo that correspond to a given content type. * Gets the #GAppInfo that correspond to a given content type.
* If @must_support_uris is true, the #GAppInfo is expected to
* support URIs.
* *
* Returns: #GAppInfo for given @content_type. * Returns: #GAppInfo for given @content_type.
**/ **/

View File

@ -105,9 +105,10 @@ g_drive_base_init (gpointer g_class)
* g_drive_get_name: * g_drive_get_name:
* @drive: a #GDrive. * @drive: a #GDrive.
* *
* Returns: string containing @drive's name. * Gets the name of @drive.
* *
* The returned string should be freed when no longer needed. * Returns: a string containing @drive's name. The returned
* string should be freed when no longer needed.
**/ **/
char * char *
g_drive_get_name (GDrive *drive) g_drive_get_name (GDrive *drive)

View File

@ -354,7 +354,7 @@ g_file_get_uri (GFile *file)
} }
/** /**
* g_file_parse_name: * g_file_get_parse_name:
* @file: input #GFile. * @file: input #GFile.
* *
* Gets the parsed name for the #GFile. * Gets the parsed name for the #GFile.
@ -943,7 +943,7 @@ g_file_find_enclosing_volume (GFile *file,
* g_file_read: * g_file_read:
* @file: #GFile to read. * @file: #GFile to read.
* @cancellable: a #GCancellable * @cancellable: a #GCancellable
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Reads a whole file into a #GFileInputStream. Fails returning %NULL if * Reads a whole file into a #GFileInputStream. Fails returning %NULL if
* given #GFile points to a directory. * given #GFile points to a directory.
@ -987,6 +987,7 @@ g_file_read (GFile *file,
* @file: input #GFile. * @file: input #GFile.
* @flags: a set of #GFileCreateFlags. * @flags: a set of #GFileCreateFlags.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError, or %NULL
* *
* If the #GFileIface for @file does not support appending to files, then * If the #GFileIface for @file does not support appending to files, then
* @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will be returned. * @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will be returned.
@ -1028,7 +1029,7 @@ g_file_append_to (GFile *file,
* @file: input #GFile. * @file: input #GFile.
* @flags: a set of #GFileCreateFlags. * @flags: a set of #GFileCreateFlags.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* If the #GFileIface for @file does not support creating files, then * If the #GFileIface for @file does not support creating files, then
* @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will be returned. * @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will be returned.
@ -1073,6 +1074,7 @@ g_file_create (GFile *file,
* @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.
* @error: a #GError, or %NULL
* *
* If the #GFileIface for @file does not support streaming operations, then * If the #GFileIface for @file does not support streaming operations, then
* @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will be returned. * @error will be set to %G_IO_ERROR_NOT_SUPPORTED and %NULL will be returned.
@ -1154,7 +1156,7 @@ g_file_read_async (GFile *file,
* g_file_read_finish: * g_file_read_finish:
* @file: input #GFile. * @file: input #GFile.
* @res: a #GAsyncResult. * @res: a #GAsyncResult.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Finishes an asynchronous file read operation started with * Finishes an asynchronous file read operation started with
* g_file_read_async(). * g_file_read_async().
@ -1232,7 +1234,7 @@ g_file_append_to_async (GFile *file,
* g_file_append_to_finish: * g_file_append_to_finish:
* @file: input #GFile. * @file: input #GFile.
* @res: #GAsyncResult * @res: #GAsyncResult
* @error: a #GError. * @error: a #GError, or #NULL
* *
* Finishes appending to a file started with g_file_append_to_async(). * Finishes appending to a file started with g_file_append_to_async().
* *
@ -1301,7 +1303,7 @@ g_file_create_async (GFile *file,
* g_file_create_finish: * g_file_create_finish:
* @file: input #GFile. * @file: input #GFile.
* @res: a #GAsyncResult. * @res: a #GAsyncResult.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Finishes creating a file started with g_file_create_async(). * Finishes creating a file started with g_file_create_async().
* *
@ -1377,7 +1379,7 @@ g_file_replace_async (GFile *file,
* g_file_replace_finish: * g_file_replace_finish:
* @file: input #GFile. * @file: input #GFile.
* @res: a #GAsyncResult. * @res: a #GAsyncResult.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Finishes replacing the contents of the file started by * Finishes replacing the contents of the file started by
* g_file_replace_async(). This is typically called within * g_file_replace_async(). This is typically called within
@ -1811,7 +1813,7 @@ file_copy_fallback (GFile *source,
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @progress_callback: function to callback with progress information * @progress_callback: function to callback with progress information
* @progress_callback_data: userdata to pass to @progress_callback * @progress_callback_data: userdata to pass to @progress_callback
* @error: #GError to set on error * @error: #GError to set on error, or %NULL
* *
* <!-- Source Friendly Version * <!-- Source Friendly Version
* List of possible errors resulting from g_file_copy(): * List of possible errors resulting from g_file_copy():
@ -1914,7 +1916,7 @@ g_file_copy (GFile *source,
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @progress_callback: GFileProgressCallback function for updates. * @progress_callback: GFileProgressCallback function for updates.
* @progress_callback_data: gpointer to user data for the callback function. * @progress_callback_data: gpointer to user data for the callback function.
* @error: #GError for returning error conditions. * @error: #GError for returning error conditions, or %NULL
* *
* List of possible returns from g_file_move() with given source, * List of possible returns from g_file_move() with given source,
* destination, and flags: * destination, and flags:
@ -2012,7 +2014,7 @@ g_file_move (GFile *source,
* g_file_make_directory * g_file_make_directory
* @file: input #GFile. * @file: input #GFile.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* 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
@ -2097,7 +2099,7 @@ g_file_make_symbolic_link (GFile *file,
* g_file_delete: * g_file_delete:
* @file: input #GFile. * @file: input #GFile.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Deletes a file. * Deletes a file.
* *
@ -2136,7 +2138,7 @@ g_file_delete (GFile *file,
* g_file_trash: * g_file_trash:
* @file: #GFile to send to trash. * @file: #GFile to send to trash.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Sends @file to the virtual file system "Trash" location. If the * Sends @file to the virtual file system "Trash" location. If the
* virtual file system does not have support having a "Trash" location, * virtual file system does not have support having a "Trash" location,
@ -2178,7 +2180,7 @@ g_file_trash (GFile *file,
* @file: input #GFile. * @file: input #GFile.
* @display_name: a string. * @display_name: a string.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Sets the display name for @file. If the display name contains invalid * Sets the display name for @file. If the display name contains invalid
* characters, @error will be set to %G_IO_ERROR_INVALID_ARGUMENT. For the * characters, @error will be set to %G_IO_ERROR_INVALID_ARGUMENT. For the
@ -2262,7 +2264,7 @@ g_file_set_display_name_async (GFile *file,
* g_file_set_display_name_finish: * g_file_set_display_name_finish:
* @file: input #GFile. * @file: input #GFile.
* @res: a #GAsyncResult. * @res: a #GAsyncResult.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Finishes setting a display name started with g_file_set_display_name_async(). * Finishes setting a display name started with g_file_set_display_name_async().
* *
@ -2293,7 +2295,7 @@ g_file_set_display_name_finish (GFile *file,
* g_file_query_settable_attributes: * g_file_query_settable_attributes:
* @file: input #GFile. * @file: input #GFile.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* 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
@ -2344,7 +2346,7 @@ g_file_query_settable_attributes (GFile *file,
* g_file_query_writable_namespaces: * g_file_query_writable_namespaces:
* @file: input #GFile. * @file: input #GFile.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* 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
@ -2397,7 +2399,7 @@ g_file_query_writable_namespaces (GFile *file,
* @value: a set of #GFileAttributeValue. * @value: a set of #GFileAttributeValue.
* @flags: a set of #GFileQueryInfoFlags. * @flags: a set of #GFileQueryInfoFlags.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Sets an attribute in the file with attribute name @attribute to @value. * Sets an attribute in the file with attribute name @attribute to @value.
* If setting attributes is not suppored by the #GFileIface for @file, * If setting attributes is not suppored by the #GFileIface for @file,
@ -2444,7 +2446,7 @@ g_file_set_attribute (GFile *file,
* @info: a #GFileInfo. * @info: a #GFileInfo.
* @flags: #GFileQueryInfoFlags * @flags: #GFileQueryInfoFlags
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Tries to set all attributes in the #GFileInfo on the target values, not stopping * Tries to set all attributes in the #GFileInfo on the target values, not stopping
* on the first error. * on the first error.
@ -2561,7 +2563,7 @@ g_file_set_attributes_async (GFile *file,
* @file: input #GFile. * @file: input #GFile.
* @result: a #GAsyncResult. * @result: a #GAsyncResult.
* @info: a #GFileInfo. * @info: a #GFileInfo.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Finishes setting an attribute started in g_file_set_attributes_async(). * Finishes setting an attribute started in g_file_set_attributes_async().
* *
@ -2592,7 +2594,7 @@ g_file_set_attributes_finish (GFile *file,
* @value: a string containing the attribute's value. * @value: a string containing the attribute's value.
* @flags: #GFileQueryInfoFlags. * @flags: #GFileQueryInfoFlags.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value. If * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value. If
* @attribute is of a different type, this operation will fail. * @attribute is of a different type, this operation will fail.
@ -2625,7 +2627,7 @@ g_file_set_attribute_string (GFile *file,
* @value: a string containing the attribute's new value. * @value: a string containing the attribute's new value.
* @flags: a #GFileQueryInfoFlags. * @flags: a #GFileQueryInfoFlags.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value. If * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value. If
* @attribute is of a different type, this operation will fail, returning %FALSE. * @attribute is of a different type, this operation will fail, returning %FALSE.
@ -2659,7 +2661,7 @@ g_file_set_attribute_byte_string (GFile *file,
* @value: a #guint32 containing the attribute's new value. * @value: a #guint32 containing the attribute's new value.
* @flags: a #GFileQueryInfoFlags. * @flags: a #GFileQueryInfoFlags.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value. If * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value. If
* @attribute is of a different type, this operation will fail. * @attribute is of a different type, this operation will fail.
@ -2693,7 +2695,7 @@ g_file_set_attribute_uint32 (GFile *file,
* @value: a #gint32 containing the attribute's new value. * @value: a #gint32 containing the attribute's new value.
* @flags: a #GFileQueryInfoFlags. * @flags: a #GFileQueryInfoFlags.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value. If * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value. If
* @attribute is of a different type, this operation will fail. * @attribute is of a different type, this operation will fail.
@ -2727,7 +2729,7 @@ g_file_set_attribute_int32 (GFile *file,
* @value: a #guint64 containing the attribute's new value. * @value: a #guint64 containing the attribute's new value.
* @flags: a #GFileQueryInfoFlags. * @flags: a #GFileQueryInfoFlags.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value. If * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value. If
* @attribute is of a different type, this operation will fail. * @attribute is of a different type, this operation will fail.
@ -2761,7 +2763,7 @@ g_file_set_attribute_uint64 (GFile *file,
* @value: a #guint64 containing the attribute's new value. * @value: a #guint64 containing the attribute's new value.
* @flags: a #GFileQueryInfoFlags. * @flags: a #GFileQueryInfoFlags.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value. If * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value. If
* @attribute is of a different type, this operation will fail. * @attribute is of a different type, this operation will fail.
@ -2838,7 +2840,7 @@ g_file_mount_mountable (GFile *file,
* g_file_mount_mountable_finish: * g_file_mount_mountable_finish:
* @file: input #GFile. * @file: input #GFile.
* @result: a #GAsyncResult. * @result: a #GAsyncResult.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Returns: a #GFile or %NULL on error. * Returns: a #GFile or %NULL on error.
**/ **/
@ -2907,7 +2909,7 @@ g_file_unmount_mountable (GFile *file,
* g_file_unmount_mountable_finish: * g_file_unmount_mountable_finish:
* @file: input #GFile. * @file: input #GFile.
* @result: a #GAsyncResult. * @result: a #GAsyncResult.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Returns: %TRUE if the operation finished successfully. %FALSE * Returns: %TRUE if the operation finished successfully. %FALSE
* otherwise. * otherwise.
@ -2982,7 +2984,7 @@ g_file_eject_mountable (GFile *file,
* g_file_eject_mountable_finish: * g_file_eject_mountable_finish:
* @file: input #GFile. * @file: input #GFile.
* @result: a #GAsyncResult. * @result: a #GAsyncResult.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Finishes an asynchronous eject operation started by * Finishes an asynchronous eject operation started by
* g_file_eject_mountable(). * g_file_eject_mountable().
@ -3828,7 +3830,7 @@ g_mount_for_location (GFile *location,
* g_mount_for_location_finish: * g_mount_for_location_finish:
* @location: input #GFile. * @location: input #GFile.
* @result: a #GAsyncResult. * @result: a #GAsyncResult.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Finishes a mount operation started by g_mount_for_location(). * Finishes a mount operation started by g_mount_for_location().
* *
@ -3871,7 +3873,7 @@ g_mount_for_location_finish (GFile *location,
* @contents: a location to place the contents of the file. * @contents: a location to place the contents of the file.
* @length: a location to place the length of the contents of the file. * @length: a location to place the length of the contents of the file.
* @etag_out: a location to place the current entity tag for the file. * @etag_out: a location to place the current entity tag for the file.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* 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
@ -4168,7 +4170,7 @@ g_file_load_partial_contents_async (GFile *file,
* @contents: a location to place the contents of the file. * @contents: a location to place the contents of the file.
* @length: a location to place the length of the contents of the file. * @length: a location to place the length of the contents of the file.
* @etag_out: a location to place the current entity tag for the file. * @etag_out: a location to place the current entity tag for the file.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Returns: %TRUE if the load was successful. If %FALSE and @error is * Returns: %TRUE if the load was successful. If %FALSE and @error is
* present, it will be set appropriately. * present, it will be set appropriately.
@ -4264,7 +4266,7 @@ g_file_load_contents_async (GFile *file,
* @contents: a location to place the contents of the file. * @contents: a location to place the contents of the file.
* @length: a location to place the length of the contents of the file. * @length: a location to place the length of the contents of the file.
* @etag_out: a location to place the current entity tag for the file. * @etag_out: a location to place the current entity tag for the file.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Finishes an asynchronous load of the @file's contents. The contents * Finishes an asynchronous load of the @file's contents. The contents
* are placed in @contents, and @length is set to the size of the @contents * are placed in @contents, and @length is set to the size of the @contents
@ -4301,7 +4303,7 @@ g_file_load_contents_finish (GFile *file,
* @flags: a set of #GFileCreateFlags. * @flags: a set of #GFileCreateFlags.
* @new_etag: a location to a new entity tag for the document. * @new_etag: a location to a new entity tag for the document.
* @cancellable: optional #GCancellable object, %NULL to ignore. * @cancellable: optional #GCancellable object, %NULL to ignore.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Replaces the contents of @file with @contents of @length bytes. The old * Replaces the contents of @file with @contents of @length bytes. The old
* @etag will be replaced with the @new_etag. If @make_backup is %TRUE, * @etag will be replaced with the @new_etag. If @make_backup is %TRUE,
@ -4333,12 +4335,7 @@ g_file_replace_contents (GFile *file,
g_return_val_if_fail (G_IS_FILE (file), FALSE); g_return_val_if_fail (G_IS_FILE (file), FALSE);
g_return_val_if_fail (contents != NULL, FALSE); g_return_val_if_fail (contents != NULL, FALSE);
out = g_file_replace (file, out = g_file_replace (file, etag, make_backup, flags, cancellable, error);
etag,
make_backup,
flags,
cancellable,
error);
if (out == NULL) if (out == NULL)
return FALSE; return FALSE;
@ -4568,7 +4565,7 @@ g_file_replace_contents_async (GFile *file,
* @file: input #GFile. * @file: input #GFile.
* @res: a #GAsyncResult. * @res: a #GAsyncResult.
* @new_etag: a location of a new entity tag for the document. * @new_etag: a location of a new entity tag for the document.
* @error: a #GError. * @error: a #GError, or %NULL
* *
* Finishes an asynchronous replace of the given @file. Sets * Finishes an asynchronous replace of the given @file. Sets
* @new_etag to the new entity tag for the document, if present. * @new_etag to the new entity tag for the document, if present.

View File

@ -846,6 +846,8 @@ g_file_attribute_info_list_bsearch (GFileAttributeInfoList *list,
* @list: a #GFileAttributeInfoList. * @list: a #GFileAttributeInfoList.
* @name: the name of the attribute to lookup. * @name: the name of the attribute to lookup.
* *
* Gets the file attribute with the name @name from @list.
*
* Returns: a #GFileAttributeInfo for the @name, or %NULL if an * Returns: a #GFileAttributeInfo for the @name, or %NULL if an
* attribute isn't found. * attribute isn't found.
**/ **/
@ -875,7 +877,6 @@ g_file_attribute_info_list_lookup (GFileAttributeInfoList *list,
* *
* Adds a new attribute with @name to the @list, setting * Adds a new attribute with @name to the @list, setting
* its @type and @flags. * its @type and @flags.
*
**/ **/
void void
g_file_attribute_info_list_add (GFileAttributeInfoList *list, g_file_attribute_info_list_add (GFileAttributeInfoList *list,

View File

@ -590,7 +590,7 @@ typedef enum {
**/ **/
#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail:path" /* bytestring */ #define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail:path" /* bytestring */
/** /**
* G_FILE_ATTRIBUTE_THUMBNAIL_THUMNAILING_FAILED: * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
* *
* A key in the "thumbnail" namespace for checking if thumbnailing failed. * A key in the "thumbnail" namespace for checking if thumbnailing failed.
* This attribute is %TRUE if thumbnailing failed. Corresponding * This attribute is %TRUE if thumbnailing failed. Corresponding

View File

@ -145,7 +145,9 @@ g_file_monitor_init (GFileMonitor *monitor)
/** /**
* g_file_monitor_is_cancelled: * g_file_monitor_is_cancelled:
* @monitor: * @monitor: a #GFileMonitor
*
* Returns whether the monitor is canceled.
* *
* Returns: %TRUE if monitor is canceled. %FALSE otherwise. * Returns: %TRUE if monitor is canceled. %FALSE otherwise.
**/ **/

View File

@ -404,8 +404,11 @@ init_completion (GFilenameCompleter *completer,
* @completer: the filename completer. * @completer: the filename completer.
* @initial_text: text to be completed. * @initial_text: text to be completed.
* *
* Returns: a completed string. This string is not owned by GIO, so * Obtains a completion for @initial_text from @completer.
* remember to g_free() it when finished. *
* Returns: a completed string, or %NULL if no completion exists.
* This string is not owned by GIO, so remember to g_free() it
* when finished.
**/ **/
char * char *
g_filename_completer_get_completion_suffix (GFilenameCompleter *completer, g_filename_completer_get_completion_suffix (GFilenameCompleter *completer,

View File

@ -196,6 +196,8 @@ g_filter_input_stream_init (GFilterInputStream *stream)
* g_filter_input_stream_get_base_stream: * g_filter_input_stream_get_base_stream:
* @stream: a #GFilterInputStream. * @stream: a #GFilterInputStream.
* *
* Gets the base stream for the filter stream.
*
* Returns: a #GInputStream. * Returns: a #GInputStream.
**/ **/
GInputStream * GInputStream *

View File

@ -195,6 +195,14 @@ g_filter_output_stream_init (GFilterOutputStream *stream)
{ {
} }
/**
* g_filter_output_stream_get_base_stream:
* @stream: a #GFilterOutputStream.
*
* Gets the base stream for the filter stream.
*
* Returns: a #GOutputStream.
**/
GOutputStream * GOutputStream *
g_filter_output_stream_get_base_stream (GFilterOutputStream *stream) g_filter_output_stream_get_base_stream (GFilterOutputStream *stream)
{ {

View File

@ -968,11 +968,12 @@ g_output_stream_flush_finish (GOutputStream *stream,
/** /**
* g_output_stream_close_async: * g_output_stream_close_async:
* @stream: A #GOutputStream. * @stream: A #GOutputStream.
* @io_priority: the io priority of the request.
* @callback: callback to call when the request is satisfied * @callback: callback 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
* @cancellable: optional cancellable object * @cancellable: optional cancellable object
* *
* Requests an asynchronous closes of the stream, releasing resources related to it. * Requests an asynchronous close of the stream, releasing resources related to it.
* When the operation is finished @callback will be called, giving the results. * When the operation is finished @callback will be called, giving the results.
* *
* For behaviour details see g_output_stream_close(). * For behaviour details see g_output_stream_close().

View File

@ -53,37 +53,46 @@
* by the operation; all of the simple return cases are covered. * by the operation; all of the simple return cases are covered.
* *
* Most of the time, an application will not need to know of the details * Most of the time, an application will not need to know of the details
* of this API; it is handled transparently, and any necessary operations are handled by * of this API; it is handled transparently, and any necessary operations are
* #GAsyncResult's interface. However, if implementing a new GIO module, for writing * handled by #GAsyncResult's interface. However, if implementing a new GIO
* language bindings, or for complex applications that need better control of how * module, for writing language bindings, or for complex applications that
* asynchronous operations are completed, it is important to understand this functionality. * need better control of how asynchronous operations are completed, it is
* important to understand this functionality.
* *
* To create a new #GSimpleAsyncResult, call g_simple_async_result_new(). If the * To create a new #GSimpleAsyncResult, call g_simple_async_result_new(). If
* result needs to be created for a #GError, use g_simple_async_result_new_from_error(). * the result needs to be created for a #GError, use
* If a #GError is not available (e.g. the asynchronous operation's doesn't take a #GError * g_simple_async_result_new_from_error(). If a #GError is not available (e.g.
* argument), but the result still needs to be created for an error condition, use * the asynchronous operation's doesn't take a #GError argument), but the result
* still needs to be created for an error condition, use
* g_simple_async_result_new_error() (or g_simple_async_result_set_error_va() * g_simple_async_result_new_error() (or g_simple_async_result_set_error_va()
* if your application or binding requires passing a variable argument list directly), * if your application or binding requires passing a variable argument list
* and the error can then be propegated through the use of g_simple_async_result_propagate_error(). * directly), and the error can then be propegated through the use of
* g_simple_async_result_propagate_error().
* *
* An asynchronous operation can be made to ignore a cancellation event by calling * An asynchronous operation can be made to ignore a cancellation event by calling
* g_simple_async_result_set_handle_cancellation() with a #GSimpleAsyncResult for the operation * g_simple_async_result_set_handle_cancellation() with a #GSimpleAsyncResult
* and %FALSE. * for the operation and %FALSE.
* *
* GSimpleAsyncResult can integrate into GLib's Main Event Loop <!-- TODO: Crosslink -->, * GSimpleAsyncResult can integrate into GLib's Main Event Loop <!-- TODO: Crosslink -->,
* or it can use #GThread<!-- -->s if available. g_simple_async_result_complete() will finish an * or it can use #GThread<!-- -->s if available. g_simple_async_result_complete()
* I/O task directly within the main event loop. g_simple_async_result_complete_in_idle() will integrate * will finish an I/O task directly within the main event loop.
* the I/O task into the main event loop as an idle function and g_simple_async_result_run_in_thread() * g_simple_async_result_complete_in_idle() will integrate the I/O task into the
* main event loop as an idle function and g_simple_async_result_run_in_thread()
* will run the job in a separate thread. * will run the job in a separate thread.
* *
* To set the results of an asynchronous function, g_simple_async_result_set_op_res_gpointer(), * To set the results of an asynchronous function,
* g_simple_async_result_set_op_res_gboolean(), and g_simple_async_result_set_op_res_gssize() * g_simple_async_result_set_op_res_gpointer(),
* are provided, setting the operation's result to a gpointer, gboolean, or gssize, respectively. * g_simple_async_result_set_op_res_gboolean(), and
* * g_simple_async_result_set_op_res_gssize()
* Likewise, to get the result of an asynchronous function, g_simple_async_result_get_op_res_gpointer(), * are provided, setting the operation's result to a gpointer, gboolean, or
* g_simple_async_result_get_op_res_gboolean(), and g_simple_async_result_get_op_res_gssize() are * gssize, respectively.
* provided, getting the operation's result as a gpointer, gboolean, and gssize, respectively.
* *
* Likewise, to get the result of an asynchronous function,
* g_simple_async_result_get_op_res_gpointer(),
* g_simple_async_result_get_op_res_gboolean(), and
* g_simple_async_result_get_op_res_gssize() are
* provided, getting the operation's result as a gpointer, gboolean, and
* gssize, respectively.
**/ **/
static void g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface); static void g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface);

View File

@ -340,7 +340,10 @@ g_union_volume_monitor_new (void)
/** /**
* g_volume_monitor_get: * g_volume_monitor_get:
* *
* Returns: a #GVolumeMonitor. * Gets the volume monitor used by gio.
*
* Returns: a reference to the #GVolumeMonitor used by gio. Call
* g_object_unref() when done with it.
**/ **/
GVolumeMonitor * GVolumeMonitor *
g_volume_monitor_get (void) g_volume_monitor_get (void)
@ -349,7 +352,7 @@ g_volume_monitor_get (void)
G_LOCK (the_volume_monitor); G_LOCK (the_volume_monitor);
if (the_volume_monitor ) if (the_volume_monitor)
vm = G_VOLUME_MONITOR (g_object_ref (the_volume_monitor)); vm = G_VOLUME_MONITOR (g_object_ref (the_volume_monitor));
else else
{ {