Formatting cleanups

This commit is contained in:
Matthias Clasen 2012-06-03 21:37:32 -04:00
parent eeb5140ad2
commit 3129bac14c

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -31,12 +31,12 @@
/** /**
* SECTION:gvfs * SECTION:gvfs
* @short_description: Virtual File System * @short_description: Virtual File System
* @include: gio/gio.h * @include: gio/gio.h
* *
* Entry point for using GIO functionality. * Entry point for using GIO functionality.
* *
**/ */
G_DEFINE_TYPE (GVfs, g_vfs, G_TYPE_OBJECT); G_DEFINE_TYPE (GVfs, g_vfs, G_TYPE_OBJECT);
@ -53,11 +53,12 @@ g_vfs_init (GVfs *vfs)
/** /**
* g_vfs_is_active: * g_vfs_is_active:
* @vfs: a #GVfs. * @vfs: a #GVfs.
* *
* Checks if the VFS is active. * Checks if the VFS is active.
* *
* Returns: %TRUE if construction of the @vfs was successful and it is now active. * Returns: %TRUE if construction of the @vfs was successful
**/ * and it is now active.
*/
gboolean gboolean
g_vfs_is_active (GVfs *vfs) g_vfs_is_active (GVfs *vfs)
{ {
@ -75,18 +76,18 @@ g_vfs_is_active (GVfs *vfs)
* g_vfs_get_file_for_path: * g_vfs_get_file_for_path:
* @vfs: a #GVfs. * @vfs: a #GVfs.
* @path: a string containing a VFS path. * @path: a string containing a VFS path.
* *
* Gets a #GFile for @path. * Gets a #GFile for @path.
* *
* Returns: (transfer full): a #GFile. * Returns: (transfer full): a #GFile.
* Free the returned object with g_object_unref(). * Free the returned object with g_object_unref().
**/ */
GFile * GFile *
g_vfs_get_file_for_path (GVfs *vfs, g_vfs_get_file_for_path (GVfs *vfs,
const char *path) const char *path)
{ {
GVfsClass *class; GVfsClass *class;
g_return_val_if_fail (G_IS_VFS (vfs), NULL); g_return_val_if_fail (G_IS_VFS (vfs), NULL);
g_return_val_if_fail (path != NULL, NULL); g_return_val_if_fail (path != NULL, NULL);
@ -98,32 +99,33 @@ g_vfs_get_file_for_path (GVfs *vfs,
/** /**
* g_vfs_get_file_for_uri: * g_vfs_get_file_for_uri:
* @vfs: a#GVfs. * @vfs: a#GVfs.
* @uri: a string containing a URI * @uri: a string containing a URI
* *
* Gets a #GFile for @uri. * Gets a #GFile for @uri.
* *
* This operation never fails, but the returned object * This operation never fails, but the returned object
* might not support any I/O operation if the URI * might not support any I/O operation if the URI
* is malformed or if the URI scheme is not supported. * is malformed or if the URI scheme is not supported.
* *
* Returns: (transfer full): a #GFile. * Returns: (transfer full): a #GFile.
* Free the returned object with g_object_unref(). * Free the returned object with g_object_unref().
**/ */
GFile * GFile *
g_vfs_get_file_for_uri (GVfs *vfs, g_vfs_get_file_for_uri (GVfs *vfs,
const char *uri) const char *uri)
{ {
GVfsClass *class; GVfsClass *class;
g_return_val_if_fail (G_IS_VFS (vfs), NULL); g_return_val_if_fail (G_IS_VFS (vfs), NULL);
g_return_val_if_fail (uri != NULL, NULL); g_return_val_if_fail (uri != NULL, NULL);
class = G_VFS_GET_CLASS (vfs); class = G_VFS_GET_CLASS (vfs);
/* This is an unfortunate placement, but we really /* This is an unfortunate placement, but we really
need to check this before chaining to the vfs, * need to check this before chaining to the vfs,
because we want to support resource uris for * because we want to support resource uris for
all vfs:es, even those that predate resources. */ * all vfs:es, even those that predate resources.
*/
if (g_str_has_prefix (uri, "resource:")) if (g_str_has_prefix (uri, "resource:"))
return _g_resource_file_new (uri); return _g_resource_file_new (uri);
@ -133,18 +135,18 @@ g_vfs_get_file_for_uri (GVfs *vfs,
/** /**
* g_vfs_get_supported_uri_schemes: * g_vfs_get_supported_uri_schemes:
* @vfs: a #GVfs. * @vfs: a #GVfs.
* *
* Gets a list of URI schemes supported by @vfs. * Gets a list of URI schemes supported by @vfs.
* *
* Returns: (transfer none): a %NULL-terminated array of strings. * Returns: (transfer none): a %NULL-terminated array of strings.
* The returned array belongs to GIO and must * The returned array belongs to GIO and must
* not be freed or modified. * not be freed or modified.
**/ */
const gchar * const * const gchar * const *
g_vfs_get_supported_uri_schemes (GVfs *vfs) g_vfs_get_supported_uri_schemes (GVfs *vfs)
{ {
GVfsClass *class; GVfsClass *class;
g_return_val_if_fail (G_IS_VFS (vfs), NULL); g_return_val_if_fail (G_IS_VFS (vfs), NULL);
class = G_VFS_GET_CLASS (vfs); class = G_VFS_GET_CLASS (vfs);
@ -156,20 +158,20 @@ g_vfs_get_supported_uri_schemes (GVfs *vfs)
* g_vfs_parse_name: * g_vfs_parse_name:
* @vfs: a #GVfs. * @vfs: a #GVfs.
* @parse_name: a string to be parsed by the VFS module. * @parse_name: a string to be parsed by the VFS module.
* *
* This operation never fails, but the returned object might * This operation never fails, but the returned object might
* not support any I/O operations if the @parse_name cannot * not support any I/O operations if the @parse_name cannot
* be parsed by the #GVfs module. * be parsed by the #GVfs module.
* *
* Returns: (transfer full): a #GFile for the given @parse_name. * Returns: (transfer full): a #GFile for the given @parse_name.
* Free the returned object with g_object_unref(). * Free the returned object with g_object_unref().
**/ */
GFile * GFile *
g_vfs_parse_name (GVfs *vfs, g_vfs_parse_name (GVfs *vfs,
const char *parse_name) const char *parse_name)
{ {
GVfsClass *class; GVfsClass *class;
g_return_val_if_fail (G_IS_VFS (vfs), NULL); g_return_val_if_fail (G_IS_VFS (vfs), NULL);
g_return_val_if_fail (parse_name != NULL, NULL); g_return_val_if_fail (parse_name != NULL, NULL);
@ -183,26 +185,26 @@ g_vfs_parse_name (GVfs *vfs,
/** /**
* g_vfs_get_default: * g_vfs_get_default:
* *
* Gets the default #GVfs for the system. * Gets the default #GVfs for the system.
* *
* Returns: (transfer none): a #GVfs. * Returns: (transfer none): a #GVfs.
**/ */
GVfs * GVfs *
g_vfs_get_default (void) g_vfs_get_default (void)
{ {
return _g_io_module_get_default (G_VFS_EXTENSION_POINT_NAME, return _g_io_module_get_default (G_VFS_EXTENSION_POINT_NAME,
"GIO_USE_VFS", "GIO_USE_VFS",
(GIOModuleVerifyFunc)g_vfs_is_active); (GIOModuleVerifyFunc)g_vfs_is_active);
} }
/** /**
* g_vfs_get_local: * g_vfs_get_local:
* *
* Gets the local #GVfs for the system. * Gets the local #GVfs for the system.
* *
* Returns: (transfer none): a #GVfs. * Returns: (transfer none): a #GVfs.
**/ */
GVfs * GVfs *
g_vfs_get_local (void) g_vfs_get_local (void)
{ {