summaryrefslogtreecommitdiff
path: root/gio/gfile.h
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2008-09-02 19:05:58 +0000
committerMichael Natterer <mitch@src.gnome.org>2008-09-02 19:05:58 +0000
commitf2a2d6c9ac2d98b565005d446fde01aac47f7d88 (patch)
treecab413fc45895fea6975eca1523e758b18d2d2d3 /gio/gfile.h
parent920f3bffb31a60bcb5379c40efa3f648de79e15d (diff)
big header formatting cleanup: indentation, vtable formatting, consistent
2008-09-02 Michael Natterer <mitch@imendio.com> * *.h: big header formatting cleanup: indentation, vtable formatting, consistent spacing in (* vfunc), trailing whitespace removal. Formatting should be pretty consistent in all GIO headers now. svn path=/trunk/; revision=7433
Diffstat (limited to 'gio/gfile.h')
-rw-r--r--gio/gfile.h599
1 files changed, 298 insertions, 301 deletions
diff --git a/gio/gfile.h b/gio/gfile.h
index 58b29923e..f6e17af12 100644
--- a/gio/gfile.h
+++ b/gio/gfile.h
@@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library
- *
+ *
* Copyright (C) 2006-2007 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
@@ -39,9 +39,9 @@ G_BEGIN_DECLS
#if 0
/**
* GFile:
- *
- * A handle to an object implementing the #GFileIface interface.
- * Generally stores a location within the file system. Handles do not
+ *
+ * A handle to an object implementing the #GFileIface interface.
+ * Generally stores a location within the file system. Handles do not
* necessarily represent files or directories that currently exist.
**/
typedef struct _GFile GFile; /* Dummy typedef */
@@ -59,7 +59,7 @@ typedef struct _GFileIface GFileIface;
* @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
* @get_uri_scheme: Gets the URI scheme for a #GFile.
* @get_basename: Gets the basename for a given #GFile.
- * @get_path: Gets the current path within a #GFile.
+ * @get_path: Gets the current path within a #GFile.
* @get_uri: Gets a URI for the path within a #GFile.
* @get_parse_name: Gets the parsed name for the #GFile.
* @get_parent: Gets the parent directory for the #GFile.
@@ -120,7 +120,7 @@ typedef struct _GFileIface GFileIface;
* @copy_async: Asynchronously copies a file.
* @copy_finish: Finishes an asynchronous copy operation.
* @move: Moves a file.
- * @_move_async: Asynchronously moves a file.
+ * @_move_async: Asynchronously moves a file.
* @_move_finish: Finishes an asynchronous move operation.
* @mount_mountable: Mounts a mountable object.
* @mount_mountable_finish: Finishes a mounting operation.
@@ -128,315 +128,312 @@ typedef struct _GFileIface GFileIface;
* @unmount_mountable_finish: Finishes an unmount operation.
* @eject_mountable: Ejects a mountable.
* @eject_mountable_finish: Finishes an eject operation.
- * @mount_enclosing_volume: Mounts a specified location.
+ * @mount_enclosing_volume: Mounts a specified location.
* @mount_enclosing_volume_finish: Finishes mounting a specified location.
* @monitor_dir: Creates a #GFileMonitor for the location.
* @monitor_file: Creates a #GFileMonitor for the location.
- *
- * An interface for writing VFS file handles.
- **/
+ *
+ * An interface for writing VFS file handles.
+ **/
struct _GFileIface
{
GTypeInterface g_iface;
/* Virtual Table */
- GFile * (*dup) (GFile *file);
- guint (*hash) (GFile *file);
- gboolean (*equal) (GFile *file1,
- GFile *file2);
- gboolean (*is_native) (GFile *file);
- gboolean (*has_uri_scheme) (GFile *file,
- const char *uri_scheme);
- char * (*get_uri_scheme) (GFile *file);
- char * (*get_basename) (GFile *file);
- char * (*get_path) (GFile *file);
- char * (*get_uri) (GFile *file);
- char * (*get_parse_name) (GFile *file);
- GFile * (*get_parent) (GFile *file);
- gboolean (*prefix_matches) (GFile *prefix,
- GFile *file);
- char * (*get_relative_path) (GFile *parent,
- GFile *descendant);
- GFile * (*resolve_relative_path) (GFile *file,
- const char *relative_path);
- GFile * (*get_child_for_display_name) (GFile *file,
- const char *display_name,
- GError **error);
-
- GFileEnumerator * (*enumerate_children) (GFile *file,
- const char *attributes,
- GFileQueryInfoFlags flags,
- GCancellable *cancellable,
- GError **error);
- void (*enumerate_children_async) (GFile *file,
- const char *attributes,
- GFileQueryInfoFlags flags,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- GFileEnumerator * (*enumerate_children_finish) (GFile *file,
- GAsyncResult *res,
- GError **error);
-
- GFileInfo * (*query_info) (GFile *file,
- const char *attributes,
- GFileQueryInfoFlags flags,
- GCancellable *cancellable,
- GError **error);
- void (*query_info_async) (GFile *file,
- const char *attributes,
- GFileQueryInfoFlags flags,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- GFileInfo * (*query_info_finish) (GFile *file,
- GAsyncResult *res,
- GError **error);
-
- GFileInfo * (*query_filesystem_info)(GFile *file,
- const char *attributes,
- GCancellable *cancellable,
- GError **error);
- void (*query_filesystem_info_async) (GFile *file,
- const char *attributes,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- GFileInfo * (*query_filesystem_info_finish) (GFile *file,
+ GFile * (* dup) (GFile *file);
+ guint (* hash) (GFile *file);
+ gboolean (* equal) (GFile *file1,
+ GFile *file2);
+ gboolean (* is_native) (GFile *file);
+ gboolean (* has_uri_scheme) (GFile *file,
+ const char *uri_scheme);
+ char * (* get_uri_scheme) (GFile *file);
+ char * (* get_basename) (GFile *file);
+ char * (* get_path) (GFile *file);
+ char * (* get_uri) (GFile *file);
+ char * (* get_parse_name) (GFile *file);
+ GFile * (* get_parent) (GFile *file);
+ gboolean (* prefix_matches) (GFile *prefix,
+ GFile *file);
+ char * (* get_relative_path) (GFile *parent,
+ GFile *descendant);
+ GFile * (* resolve_relative_path) (GFile *file,
+ const char *relative_path);
+ GFile * (* get_child_for_display_name) (GFile *file,
+ const char *display_name,
+ GError **error);
+
+ GFileEnumerator * (* enumerate_children) (GFile *file,
+ const char *attributes,
+ GFileQueryInfoFlags flags,
+ GCancellable *cancellable,
+ GError **error);
+ void (* enumerate_children_async) (GFile *file,
+ const char *attributes,
+ GFileQueryInfoFlags flags,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ GFileEnumerator * (* enumerate_children_finish) (GFile *file,
+ GAsyncResult *res,
+ GError **error);
+
+ GFileInfo * (* query_info) (GFile *file,
+ const char *attributes,
+ GFileQueryInfoFlags flags,
+ GCancellable *cancellable,
+ GError **error);
+ void (* query_info_async) (GFile *file,
+ const char *attributes,
+ GFileQueryInfoFlags flags,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ GFileInfo * (* query_info_finish) (GFile *file,
+ GAsyncResult *res,
+ GError **error);
+
+ GFileInfo * (* query_filesystem_info) (GFile *file,
+ const char *attributes,
+ GCancellable *cancellable,
+ GError **error);
+ void (* query_filesystem_info_async) (GFile *file,
+ const char *attributes,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ GFileInfo * (* query_filesystem_info_finish)(GFile *file,
+ GAsyncResult *res,
+ GError **error);
+
+ GMount * (* find_enclosing_mount) (GFile *file,
+ GCancellable *cancellable,
+ GError **error);
+ void (* find_enclosing_mount_async) (GFile *file,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ GMount * (* find_enclosing_mount_finish) (GFile *file,
+ GAsyncResult *res,
+ GError **error);
+
+ GFile * (* set_display_name) (GFile *file,
+ const char *display_name,
+ GCancellable *cancellable,
+ GError **error);
+ void (* set_display_name_async) (GFile *file,
+ const char *display_name,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ GFile * (* set_display_name_finish) (GFile *file,
+ GAsyncResult *res,
+ GError **error);
+
+ GFileAttributeInfoList * (* query_settable_attributes) (GFile *file,
+ GCancellable *cancellable,
+ GError **error);
+ void (* _query_settable_attributes_async) (void);
+ void (* _query_settable_attributes_finish) (void);
+
+ GFileAttributeInfoList * (* query_writable_namespaces) (GFile *file,
+ GCancellable *cancellable,
+ GError **error);
+ void (* _query_writable_namespaces_async) (void);
+ void (* _query_writable_namespaces_finish) (void);
+
+ gboolean (* set_attribute) (GFile *file,
+ const char *attribute,
+ GFileAttributeType type,
+ gpointer value_p,
+ GFileQueryInfoFlags flags,
+ GCancellable *cancellable,
+ GError **error);
+ gboolean (* set_attributes_from_info) (GFile *file,
+ GFileInfo *info,
+ GFileQueryInfoFlags flags,
+ GCancellable *cancellable,
+ GError **error);
+ void (* set_attributes_async) (GFile *file,
+ GFileInfo *info,
+ GFileQueryInfoFlags flags,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* set_attributes_finish) (GFile *file,
+ GAsyncResult *result,
+ GFileInfo **info,
+ GError **error);
+
+ GFileInputStream * (* read_fn) (GFile *file,
+ GCancellable *cancellable,
+ GError **error);
+ void (* read_async) (GFile *file,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ GFileInputStream * (* read_finish) (GFile *file,
+ GAsyncResult *res,
+ GError **error);
+
+ GFileOutputStream * (* append_to) (GFile *file,
+ GFileCreateFlags flags,
+ GCancellable *cancellable,
+ GError **error);
+ void (* append_to_async) (GFile *file,
+ GFileCreateFlags flags,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ GFileOutputStream * (* append_to_finish) (GFile *file,
+ GAsyncResult *res,
+ GError **error);
+
+ GFileOutputStream * (* create) (GFile *file,
+ GFileCreateFlags flags,
+ GCancellable *cancellable,
+ GError **error);
+ void (* create_async) (GFile *file,
+ GFileCreateFlags flags,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ GFileOutputStream * (* create_finish) (GFile *file,
+ GAsyncResult *res,
+ GError **error);
+
+ GFileOutputStream * (* replace) (GFile *file,
+ const char *etag,
+ gboolean make_backup,
+ GFileCreateFlags flags,
+ GCancellable *cancellable,
+ GError **error);
+ void (* replace_async) (GFile *file,
+ const char *etag,
+ gboolean make_backup,
+ GFileCreateFlags flags,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ GFileOutputStream * (* replace_finish) (GFile *file,
+ GAsyncResult *res,
+ GError **error);
+
+ gboolean (* delete_file) (GFile *file,
+ GCancellable *cancellable,
+ GError **error);
+ void (* _delete_file_async) (void);
+ void (* _delete_file_finish) (void);
+
+ gboolean (* trash) (GFile *file,
+ GCancellable *cancellable,
+ GError **error);
+ void (* _trash_async) (void);
+ void (* _trash_finish) (void);
+
+ gboolean (* make_directory) (GFile *file,
+ GCancellable *cancellable,
+ GError **error);
+ void (* _make_directory_async) (void);
+ void (* _make_directory_finish) (void);
+
+ gboolean (* make_symbolic_link) (GFile *file,
+ const char *symlink_value,
+ GCancellable *cancellable,
+ GError **error);
+ void (* _make_symbolic_link_async) (void);
+ void (* _make_symbolic_link_finish) (void);
+
+ gboolean (* copy) (GFile *source,
+ GFile *destination,
+ GFileCopyFlags flags,
+ GCancellable *cancellable,
+ GFileProgressCallback progress_callback,
+ gpointer progress_callback_data,
+ GError **error);
+ void (* copy_async) (GFile *source,
+ GFile *destination,
+ GFileCopyFlags flags,
+ int io_priority,
+ GCancellable *cancellable,
+ GFileProgressCallback progress_callback,
+ gpointer progress_callback_data,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* copy_finish) (GFile *file,
GAsyncResult *res,
GError **error);
-
- GMount * (*find_enclosing_mount)(GFile *file,
- GCancellable *cancellable,
- GError **error);
- void (*find_enclosing_mount_async)(GFile *file,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- GMount * (*find_enclosing_mount_finish)(GFile *file,
- GAsyncResult *res,
- GError **error);
-
- GFile * (*set_display_name) (GFile *file,
- const char *display_name,
- GCancellable *cancellable,
- GError **error);
- void (*set_display_name_async) (GFile *file,
- const char *display_name,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- GFile * (*set_display_name_finish) (GFile *file,
- GAsyncResult *res,
- GError **error);
-
- GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
- GCancellable *cancellable,
- GError **error);
- void (*_query_settable_attributes_async) (void);
- void (*_query_settable_attributes_finish) (void);
-
- GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
- GCancellable *cancellable,
- GError **error);
- void (*_query_writable_namespaces_async) (void);
- void (*_query_writable_namespaces_finish) (void);
-
- gboolean (*set_attribute) (GFile *file,
- const char *attribute,
- GFileAttributeType type,
- gpointer value_p,
- GFileQueryInfoFlags flags,
- GCancellable *cancellable,
- GError **error);
- gboolean (*set_attributes_from_info) (GFile *file,
- GFileInfo *info,
- GFileQueryInfoFlags flags,
- GCancellable *cancellable,
- GError **error);
- void (*set_attributes_async) (GFile *file,
- GFileInfo *info,
- GFileQueryInfoFlags flags,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (*set_attributes_finish) (GFile *file,
- GAsyncResult *result,
- GFileInfo **info,
- GError **error);
-
- GFileInputStream * (*read_fn) (GFile *file,
- GCancellable *cancellable,
- GError **error);
- void (*read_async) (GFile *file,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- GFileInputStream * (*read_finish) (GFile *file,
- GAsyncResult *res,
- GError **error);
-
- GFileOutputStream * (*append_to) (GFile *file,
- GFileCreateFlags flags,
- GCancellable *cancellable,
- GError **error);
- void (*append_to_async) (GFile *file,
- GFileCreateFlags flags,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- GFileOutputStream * (*append_to_finish) (GFile *file,
- GAsyncResult *res,
- GError **error);
-
- GFileOutputStream * (*create) (GFile *file,
- GFileCreateFlags flags,
- GCancellable *cancellable,
- GError **error);
- void (*create_async) (GFile *file,
- GFileCreateFlags flags,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- GFileOutputStream * (*create_finish) (GFile *file,
- GAsyncResult *res,
- GError **error);
-
- GFileOutputStream * (*replace) (GFile *file,
- const char *etag,
- gboolean make_backup,
- GFileCreateFlags flags,
- GCancellable *cancellable,
- GError **error);
- void (*replace_async) (GFile *file,
- const char *etag,
- gboolean make_backup,
- GFileCreateFlags flags,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- GFileOutputStream * (*replace_finish) (GFile *file,
- GAsyncResult *res,
- GError **error);
-
- gboolean (*delete_file) (GFile *file,
- GCancellable *cancellable,
- GError **error);
- void (*_delete_file_async) (void);
- void (*_delete_file_finish) (void);
-
- gboolean (*trash) (GFile *file,
- GCancellable *cancellable,
- GError **error);
- void (*_trash_async) (void);
- void (*_trash_finish) (void);
-
- gboolean (*make_directory) (GFile *file,
- GCancellable *cancellable,
- GError **error);
- void (*_make_directory_async) (void);
- void (*_make_directory_finish) (void);
-
- gboolean (*make_symbolic_link) (GFile *file,
- const char *symlink_value,
- GCancellable *cancellable,
- GError **error);
- void (*_make_symbolic_link_async) (void);
- void (*_make_symbolic_link_finish) (void);
-
- gboolean (*copy) (GFile *source,
- GFile *destination,
- GFileCopyFlags flags,
- GCancellable *cancellable,
- GFileProgressCallback progress_callback,
- gpointer progress_callback_data,
- GError **error);
- void (*copy_async) (GFile *source,
- GFile *destination,
- GFileCopyFlags flags,
- int io_priority,
- GCancellable *cancellable,
- GFileProgressCallback progress_callback,
- gpointer progress_callback_data,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (*copy_finish) (GFile *file,
- GAsyncResult *res,
- GError **error);
-
- gboolean (*move) (GFile *source,
- GFile *destination,
- GFileCopyFlags flags,
- GCancellable *cancellable,
- GFileProgressCallback progress_callback,
- gpointer progress_callback_data,
- GError **error);
-
- void (*_move_async) (void);
- void (*_move_finish) (void);
-
-
- void (*mount_mountable) (GFile *file,
- GMountMountFlags flags,
- GMountOperation *mount_operation,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- GFile * (*mount_mountable_finish) (GFile *file,
- GAsyncResult *result,
- GError **error);
- void (*unmount_mountable) (GFile *file,
- GMountUnmountFlags flags,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (*unmount_mountable_finish) (GFile *file,
- GAsyncResult *result,
- GError **error);
- void (*eject_mountable) (GFile *file,
- GMountUnmountFlags flags,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (*eject_mountable_finish) (GFile *file,
- GAsyncResult *result,
- GError **error);
-
-
- void (*mount_enclosing_volume) (GFile *location,
- GMountMountFlags flags,
- GMountOperation *mount_operation,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
- gboolean (*mount_enclosing_volume_finish) (GFile *location,
- GAsyncResult *result,
- GError **error);
-
- GFileMonitor* (*monitor_dir) (GFile *file,
- GFileMonitorFlags flags,
- GCancellable *cancellable,
- GError **error);
-
- GFileMonitor* (*monitor_file) (GFile *file,
- GFileMonitorFlags flags,
- GCancellable *cancellable,
- GError **error);
+ gboolean (* move) (GFile *source,
+ GFile *destination,
+ GFileCopyFlags flags,
+ GCancellable *cancellable,
+ GFileProgressCallback progress_callback,
+ gpointer progress_callback_data,
+ GError **error);
+ void (* _move_async) (void);
+ void (* _move_finish) (void);
+
+ void (* mount_mountable) (GFile *file,
+ GMountMountFlags flags,
+ GMountOperation *mount_operation,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ GFile * (* mount_mountable_finish) (GFile *file,
+ GAsyncResult *result,
+ GError **error);
+
+ void (* unmount_mountable) (GFile *file,
+ GMountUnmountFlags flags,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* unmount_mountable_finish) (GFile *file,
+ GAsyncResult *result,
+ GError **error);
+
+ void (* eject_mountable) (GFile *file,
+ GMountUnmountFlags flags,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* eject_mountable_finish) (GFile *file,
+ GAsyncResult *result,
+ GError **error);
+
+ void (* mount_enclosing_volume) (GFile *location,
+ GMountMountFlags flags,
+ GMountOperation *mount_operation,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* mount_enclosing_volume_finish) (GFile *location,
+ GAsyncResult *result,
+ GError **error);
+
+ GFileMonitor * (* monitor_dir) (GFile *file,
+ GFileMonitorFlags flags,
+ GCancellable *cancellable,
+ GError **error);
+ GFileMonitor * (* monitor_file) (GFile *file,
+ GFileMonitorFlags flags,
+ GCancellable *cancellable,
+ GError **error);
};
-GType g_file_get_type (void) G_GNUC_CONST;
+GType g_file_get_type (void) G_GNUC_CONST;
GFile * g_file_new_for_path (const char *path);
GFile * g_file_new_for_uri (const char *uri);