From 3d93bf6968884d75dd2706ef85e2014305eb92f2 Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Tue, 1 Jul 2008 06:32:35 +0000 Subject: [PATCH] Moved all relevant typedefs into these files. 2008-07-01 Cody Russell * gio/gioenums.h: * gio/giotypes.h: Moved all relevant typedefs into these files. * gio/*.[ch]: Updated wrt added files. Split types into separate file for easier maintainership. (#538564) svn path=/trunk/; revision=7127 --- ChangeLog | 11 + gio/Makefile.am | 3 + gio/gappinfo.h | 19 +- gio/gasynchelper.h | 3 +- gio/gasyncresult.h | 15 +- gio/gbufferedinputstream.c | 3 + gio/gbufferedinputstream.h | 2 - gio/gbufferedoutputstream.h | 2 - gio/gcancellable.h | 3 +- gio/gcontenttype.h | 2 +- gio/gdatainputstream.c | 1 + gio/gdatainputstream.h | 34 --- gio/gdataoutputstream.h | 2 - gio/gdesktopappinfo.c | 2 + gio/gdrive.c | 2 + gio/gdrive.h | 5 +- gio/gdummyfile.c | 1 + gio/gdummyfile.h | 2 +- gio/gfile.c | 6 + gio/gfile.h | 128 +--------- gio/gfileattribute.h | 64 +---- gio/gfileenumerator.c | 3 + gio/gfileenumerator.h | 19 +- gio/gfileicon.c | 4 + gio/gfileicon.h | 4 +- gio/gfileinfo.c | 1 + gio/gfileinfo.h | 51 +--- gio/gfileinputstream.c | 3 + gio/gfileinputstream.h | 2 - gio/gfilemonitor.c | 1 + gio/gfilemonitor.h | 27 +-- gio/gfilenamecompleter.c | 4 + gio/gfilenamecompleter.h | 3 +- gio/gfileoutputstream.c | 3 + gio/gfileoutputstream.h | 2 - gio/gfilterinputstream.h | 2 - gio/gfilteroutputstream.h | 2 - gio/gicon.h | 3 +- gio/ginputstream.c | 3 + gio/ginputstream.h | 6 +- gio/gio.h | 40 +++- gio/gioenums.h | 443 +++++++++++++++++++++++++++++++++++ gio/gioerror.h | 79 +------ gio/giomodule.h | 6 +- gio/gioscheduler.c | 1 + gio/gioscheduler.h | 30 +-- gio/giotypes.h | 197 ++++++++++++++++ gio/gloadableicon.c | 2 + gio/gloadableicon.h | 5 +- gio/glocaldirectorymonitor.c | 2 + gio/glocaldirectorymonitor.h | 1 - gio/glocalfile.c | 3 + gio/glocalfile.h | 2 +- gio/glocalfileenumerator.c | 1 + gio/glocalfileenumerator.h | 2 - gio/glocalfileinputstream.c | 1 + gio/glocalfilemonitor.c | 1 + gio/glocalfilemonitor.h | 1 - gio/glocalfileoutputstream.c | 1 + gio/glocalfileoutputstream.h | 1 - gio/glocalvfs.c | 1 + gio/glocalvfs.h | 2 +- gio/gmemoryinputstream.c | 1 + gio/gmemoryinputstream.h | 2 - gio/gmemoryoutputstream.c | 1 + gio/gmemoryoutputstream.h | 2 - gio/gmount.c | 2 + gio/gmount.h | 18 +- gio/gmountoperation.h | 58 +---- gio/gnativevolumemonitor.h | 3 +- gio/goutputstream.c | 4 + gio/goutputstream.h | 21 +- gio/gpollfilemonitor.c | 2 + gio/gpollfilemonitor.h | 1 - gio/gseekable.h | 4 +- gio/gsimpleasyncresult.c | 2 + gio/gsimpleasyncresult.h | 17 +- gio/gthemedicon.c | 1 + gio/gthemedicon.h | 3 +- gio/gunionvolumemonitor.h | 4 +- gio/gunixmount.c | 4 + gio/gunixmount.h | 7 +- gio/gunixmounts.h | 2 +- gio/gunixvolume.c | 3 + gio/gunixvolume.h | 5 +- gio/gunixvolumemonitor.c | 2 + gio/gunixvolumemonitor.h | 3 +- gio/gvfs.h | 4 +- gio/gvolume.c | 2 + gio/gvolume.h | 4 +- gio/gvolumemonitor.c | 3 + gio/gvolumemonitor.h | 6 +- gio/gwin32appinfo.h | 2 +- gio/gwin32mount.h | 4 +- gio/gwin32volumemonitor.h | 69 +----- gio/inotify/inotify-helper.c | 1 + gio/tests/live-g-file.c | 2 +- 97 files changed, 809 insertions(+), 735 deletions(-) create mode 100644 gio/gioenums.h create mode 100644 gio/giotypes.h diff --git a/ChangeLog b/ChangeLog index b5bc37e7..34a841fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-07-01 Cody Russell + + * gio/gioenums.h: + * gio/giotypes.h: + Moved all relevant typedefs into these files. + + * gio/*.[ch]: + Updated wrt added files. + + Split types into separate file for easier maintainership. (#538564) + 2008-06-30 Matthias Clasen * glib/pcre/pcre_compile.c: Apply fix for CVE-2008-2371 to diff --git a/gio/Makefile.am b/gio/Makefile.am index f667d5d1..ced7571d 100644 --- a/gio/Makefile.am +++ b/gio/Makefile.am @@ -188,6 +188,7 @@ libgio_2_0_la_SOURCES = \ gfilteroutputstream.c \ gicon.c \ ginputstream.c \ + gioenums.h \ gioerror.c \ giomodule.c \ giomodule-priv.h \ @@ -288,6 +289,8 @@ gio_headers = \ gicon.h \ ginputstream.h \ gio.h \ + giotypes.h \ + gioenums.h \ gioerror.h \ giomodule.h \ gioscheduler.h \ diff --git a/gio/gappinfo.h b/gio/gappinfo.h index d0fddf75..eef3ab21 100644 --- a/gio/gappinfo.h +++ b/gio/gappinfo.h @@ -27,8 +27,7 @@ #ifndef __G_APP_INFO_H__ #define __G_APP_INFO_H__ -#include -#include +#include G_BEGIN_DECLS @@ -44,21 +43,6 @@ G_BEGIN_DECLS #define G_IS_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_APP_LAUNCH_CONTEXT)) #define G_APP_LAUNCH_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_APP_LAUNCH_CONTEXT, GAppLaunchContextClass)) -/** - * GAppInfoCreateFlags: - * @G_APP_INFO_CREATE_NONE: No flags. - * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window. - * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments. - * - * Flags used when creating a #GAppInfo. - */ -typedef enum { - G_APP_INFO_CREATE_NONE = 0, /*< nick=none >*/ - G_APP_INFO_CREATE_NEEDS_TERMINAL = (1<<0), /*< nick=needs-terminal >*/ - G_APP_INFO_CREATE_SUPPORTS_URIS = (1<<1) /*< nick=supports-uris >*/ -} GAppInfoCreateFlags; - -typedef struct _GAppLaunchContext GAppLaunchContext; typedef struct _GAppLaunchContextClass GAppLaunchContextClass; typedef struct _GAppLaunchContextPrivate GAppLaunchContextPrivate; @@ -68,7 +52,6 @@ typedef struct _GAppLaunchContextPrivate GAppLaunchContextPrivate; * Information about an installed application and methods to launch * it (with file arguments). */ -typedef struct _GAppInfo GAppInfo; /* Dummy typedef */ /** * GAppInfoIface: diff --git a/gio/gasynchelper.h b/gio/gasynchelper.h index 0f57a409..891adb4f 100644 --- a/gio/gasynchelper.h +++ b/gio/gasynchelper.h @@ -23,8 +23,7 @@ #ifndef __G_ASYNC_HELPER_H__ #define __G_ASYNC_HELPER_H__ -#include -#include "gcancellable.h" +#include G_BEGIN_DECLS diff --git a/gio/gasyncresult.h b/gio/gasyncresult.h index 640d6111..1066a29d 100644 --- a/gio/gasyncresult.h +++ b/gio/gasyncresult.h @@ -27,7 +27,7 @@ #ifndef __G_ASYNC_RESULT_H__ #define __G_ASYNC_RESULT_H__ -#include +#include G_BEGIN_DECLS @@ -42,21 +42,8 @@ G_BEGIN_DECLS * Holds results information for an asynchronous operation, * usually passed directly to a asynchronous _finish() operation. **/ -typedef struct _GAsyncResult GAsyncResult; /* Dummy typedef */ typedef struct _GAsyncResultIface GAsyncResultIface; -/** - * GAsyncReadyCallback: - * @source_object: the object the asynchronous operation was started with. - * @res: a #GAsyncResult. - * @user_data: user data passed to the callback. - * - * Type definition for a function that will be called back when an asynchronous - * operation within GIO has been completed. - **/ -typedef void (*GAsyncReadyCallback) (GObject *source_object, - GAsyncResult *res, - gpointer user_data); /** * GAsyncResultIface: diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c index 1c27b87f..040ce3b3 100644 --- a/gio/gbufferedinputstream.c +++ b/gio/gbufferedinputstream.c @@ -24,7 +24,10 @@ #include "config.h" #include "gbufferedinputstream.h" #include "ginputstream.h" +#include "gcancellable.h" +#include "gasyncresult.h" #include "gsimpleasyncresult.h" +#include "gioerror.h" #include #include "glibintl.h" diff --git a/gio/gbufferedinputstream.h b/gio/gbufferedinputstream.h index 3eea4f9b..039093fa 100644 --- a/gio/gbufferedinputstream.h +++ b/gio/gbufferedinputstream.h @@ -27,7 +27,6 @@ #ifndef __G_BUFFERED_INPUT_STREAM_H__ #define __G_BUFFERED_INPUT_STREAM_H__ -#include #include G_BEGIN_DECLS @@ -44,7 +43,6 @@ G_BEGIN_DECLS * * Implements #GFilterInputStream with a sized input buffer. **/ -typedef struct _GBufferedInputStream GBufferedInputStream; typedef struct _GBufferedInputStreamClass GBufferedInputStreamClass; typedef struct _GBufferedInputStreamPrivate GBufferedInputStreamPrivate; diff --git a/gio/gbufferedoutputstream.h b/gio/gbufferedoutputstream.h index 5adce9e1..492259d3 100644 --- a/gio/gbufferedoutputstream.h +++ b/gio/gbufferedoutputstream.h @@ -27,7 +27,6 @@ #ifndef __G_BUFFERED_OUTPUT_STREAM_H__ #define __G_BUFFERED_OUTPUT_STREAM_H__ -#include #include G_BEGIN_DECLS @@ -45,7 +44,6 @@ G_BEGIN_DECLS * * An implementation of #GFilterOutputStream with a sized buffer. **/ -typedef struct _GBufferedOutputStream GBufferedOutputStream; typedef struct _GBufferedOutputStreamClass GBufferedOutputStreamClass; typedef struct _GBufferedOutputStreamPrivate GBufferedOutputStreamPrivate; diff --git a/gio/gcancellable.h b/gio/gcancellable.h index 7c890be9..11440797 100644 --- a/gio/gcancellable.h +++ b/gio/gcancellable.h @@ -27,7 +27,7 @@ #ifndef __G_CANCELLABLE_H__ #define __G_CANCELLABLE_H__ -#include +#include G_BEGIN_DECLS @@ -43,7 +43,6 @@ G_BEGIN_DECLS * * Allows actions to be cancelled. */ -typedef struct _GCancellable GCancellable; typedef struct _GCancellableClass GCancellableClass; struct _GCancellableClass diff --git a/gio/gcontenttype.h b/gio/gcontenttype.h index df03fa81..58f96936 100644 --- a/gio/gcontenttype.h +++ b/gio/gcontenttype.h @@ -28,7 +28,7 @@ #define __G_CONTENT_TYPE_H__ #include -#include +#include G_BEGIN_DECLS diff --git a/gio/gdatainputstream.c b/gio/gdatainputstream.c index fa511bcf..0bf716f8 100644 --- a/gio/gdatainputstream.c +++ b/gio/gdatainputstream.c @@ -24,6 +24,7 @@ #include "config.h" #include "gdatainputstream.h" #include "gioenumtypes.h" +#include "gioerror.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gdatainputstream.h b/gio/gdatainputstream.h index 0ecd14f5..4025454a 100644 --- a/gio/gdatainputstream.h +++ b/gio/gdatainputstream.h @@ -27,7 +27,6 @@ #ifndef __G_DATA_INPUT_STREAM_H__ #define __G_DATA_INPUT_STREAM_H__ -#include #include G_BEGIN_DECLS @@ -46,7 +45,6 @@ G_BEGIN_DECLS * An implementation of #GBufferedInputStream that allows for high-level * data manipulation of arbitrary data (including binary operations). **/ -typedef struct _GDataInputStream GDataInputStream; typedef struct _GDataInputStreamClass GDataInputStreamClass; typedef struct _GDataInputStreamPrivate GDataInputStreamPrivate; @@ -70,38 +68,6 @@ struct _GDataInputStreamClass void (*_g_reserved5) (void); }; -/** - * GDataStreamByteOrder: - * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order. - * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order. - * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture. - * - * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources - * across various machine architectures. - * - **/ -typedef enum { - G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN, - G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN, - G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN -} GDataStreamByteOrder; - -/** - * GDataStreamNewlineType: - * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms. - * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings. - * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows. - * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type. - * - * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file. - **/ -typedef enum { - G_DATA_STREAM_NEWLINE_TYPE_LF, - G_DATA_STREAM_NEWLINE_TYPE_CR, - G_DATA_STREAM_NEWLINE_TYPE_CR_LF, - G_DATA_STREAM_NEWLINE_TYPE_ANY -} GDataStreamNewlineType; - GType g_data_input_stream_get_type (void) G_GNUC_CONST; GDataInputStream* g_data_input_stream_new (GInputStream *base_stream); diff --git a/gio/gdataoutputstream.h b/gio/gdataoutputstream.h index 7a4e4055..3d7c4182 100644 --- a/gio/gdataoutputstream.h +++ b/gio/gdataoutputstream.h @@ -27,9 +27,7 @@ #ifndef __G_DATA_OUTPUT_STREAM_H__ #define __G_DATA_OUTPUT_STREAM_H__ -#include #include -#include G_BEGIN_DECLS diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c index f76dc03e..3ca79f46 100644 --- a/gio/gdesktopappinfo.c +++ b/gio/gdesktopappinfo.c @@ -34,12 +34,14 @@ #include "gcontenttypeprivate.h" #include "gdesktopappinfo.h" +#include "gfile.h" #include "gioerror.h" #include "gthemedicon.h" #include "gfileicon.h" #include #include "glibintl.h" #include "giomodule-priv.h" +#include "gappinfo.h" #include "gioalias.h" diff --git a/gio/gdrive.c b/gio/gdrive.c index bfdbee1a..9d912042 100644 --- a/gio/gdrive.c +++ b/gio/gdrive.c @@ -24,6 +24,8 @@ #include "config.h" #include "gdrive.h" #include "gsimpleasyncresult.h" +#include "gasyncresult.h" +#include "gioerror.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gdrive.h b/gio/gdrive.h index 26671b91..ed9bfac0 100644 --- a/gio/gdrive.h +++ b/gio/gdrive.h @@ -28,10 +28,7 @@ #ifndef __G_DRIVE_H__ #define __G_DRIVE_H__ -#include -#include -#include -#include +#include G_BEGIN_DECLS diff --git a/gio/gdummyfile.c b/gio/gdummyfile.c index afcd9317..6a5883fa 100644 --- a/gio/gdummyfile.c +++ b/gio/gdummyfile.c @@ -33,6 +33,7 @@ #include #include "gdummyfile.h" +#include "gfile.h" #include "gioalias.h" diff --git a/gio/gdummyfile.h b/gio/gdummyfile.h index eb69d928..1f8bd132 100644 --- a/gio/gdummyfile.h +++ b/gio/gdummyfile.h @@ -23,7 +23,7 @@ #ifndef __G_DUMMY_FILE_H__ #define __G_DUMMY_FILE_H__ -#include +#include G_BEGIN_DECLS diff --git a/gio/gfile.c b/gio/gfile.c index 4194f6c6..da793d0b 100644 --- a/gio/gfile.c +++ b/gio/gfile.c @@ -35,6 +35,12 @@ #include "gsimpleasyncresult.h" #include "gfileattribute-priv.h" #include "gpollfilemonitor.h" +#include "gappinfo.h" +#include "gfileinputstream.h" +#include "gfileoutputstream.h" +#include "gcancellable.h" +#include "gasyncresult.h" +#include "gioerror.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gfile.h b/gio/gfile.h index 711b01a5..9bb5b446 100644 --- a/gio/gfile.h +++ b/gio/gfile.h @@ -27,13 +27,7 @@ #ifndef __G_FILE_H__ #define __G_FILE_H__ -#include -#include -#include -#include -#include -#include -#include +#include G_BEGIN_DECLS @@ -42,88 +36,6 @@ G_BEGIN_DECLS #define G_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_FILE)) #define G_FILE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_FILE, GFileIface)) -/** - * GFileQueryInfoFlags: - * @G_FILE_QUERY_INFO_NONE: No flags set. - * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks. - * - * Flags used when querying a #GFileInfo. - */ -typedef enum { - G_FILE_QUERY_INFO_NONE = 0, - G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1<<0) /*< nick=nofollow-symlinks >*/ -} GFileQueryInfoFlags; - -/** - * GFileCreateFlags: - * @G_FILE_CREATE_NONE: No flags set. - * @G_FILE_CREATE_PRIVATE: Create a file that can only be - * accessed by the current user. - * - * Flags used when an operation may create a file. - */ -typedef enum { - G_FILE_CREATE_NONE = 0, - G_FILE_CREATE_PRIVATE = (1<<0) -} GFileCreateFlags; - - -/** - * GMountMountFlags: - * @G_MOUNT_MOUNT_NONE: No flags set. - * - * Flags used when mounting a mount. - */ -typedef enum { - G_MOUNT_MOUNT_NONE = 0 -} GMountMountFlags; - - -/** - * GMountUnmountFlags: - * @G_MOUNT_UNMOUNT_NONE: No flags set. - * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding - * file operations on the mount. - * - * Flags used when an unmounting a mount. - */ -typedef enum { - G_MOUNT_UNMOUNT_NONE = 0, - G_MOUNT_UNMOUNT_FORCE = (1<<0) -} GMountUnmountFlags; - -/** - * GFileCopyFlags: - * @G_FILE_COPY_NONE: No flags set. - * @G_FILE_COPY_OVERWRITE: Overwrite any existing files - * @G_FILE_COPY_BACKUP: Make a backup of any existing files. - * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks. - * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo). - * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported. - * - * Flags used when copying or moving files. - */ -typedef enum { - G_FILE_COPY_NONE = 0, /*< nick=none >*/ - G_FILE_COPY_OVERWRITE = (1<<0), - G_FILE_COPY_BACKUP = (1<<1), - G_FILE_COPY_NOFOLLOW_SYMLINKS = (1<<2), - G_FILE_COPY_ALL_METADATA = (1<<3), - G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1<<4) -} GFileCopyFlags; - -/** - * GFileMonitorFlags: - * @G_FILE_MONITOR_NONE: No flags set. - * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events. - * - * Flags used to set what a #GFileMonitor will watch for. - */ -typedef enum { - G_FILE_MONITOR_NONE = 0, - G_FILE_MONITOR_WATCH_MOUNTS = (1<<0) -} GFileMonitorFlags; - #if 0 /** * GFile: @@ -135,45 +47,7 @@ typedef enum { typedef struct _GFile GFile; /* Dummy typedef */ #endif typedef struct _GFileIface GFileIface; -typedef struct _GFileMonitor GFileMonitor; -/** - * GMount: - * - * A handle to an object implementing the #GMountIface interface. - **/ -typedef struct _GMount GMount; /* Dummy typedef */ - -/** - * GFileProgressCallback: - * @current_num_bytes: the current number of bytes in the operation. - * @total_num_bytes: the total number of bytes in the operation. - * @user_data: user data passed to the callback. - * - * When doing file operations that may take a while, such as moving - * a file or copying a file, a progress callback is used to pass how - * far along that operation is to the application. - **/ -typedef void (*GFileProgressCallback) (goffset current_num_bytes, - goffset total_num_bytes, - gpointer user_data); - -/** - * GFileReadMoreCallback: - * @file_contents: the data as currently read. - * @file_size: the size of the data currently read. - * @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, - goffset file_size, - gpointer callback_data); /** * GFileIface: diff --git a/gio/gfileattribute.h b/gio/gfileattribute.h index 758fe9b6..d574b41c 100644 --- a/gio/gfileattribute.h +++ b/gio/gfileattribute.h @@ -27,64 +27,10 @@ #ifndef __G_FILE_ATTRIBUTE_H__ #define __G_FILE_ATTRIBUTE_H__ -#include +#include G_BEGIN_DECLS -/** - * GFileAttributeType: - * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type. - * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string. - * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes. - * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value. - * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer. - * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer. - * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer. - * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer. - * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject. - * - * The data types for file attributes. - **/ -typedef enum { - G_FILE_ATTRIBUTE_TYPE_INVALID = 0, - G_FILE_ATTRIBUTE_TYPE_STRING, - G_FILE_ATTRIBUTE_TYPE_BYTE_STRING, /* zero terminated string of non-zero bytes */ - G_FILE_ATTRIBUTE_TYPE_BOOLEAN, - G_FILE_ATTRIBUTE_TYPE_UINT32, - G_FILE_ATTRIBUTE_TYPE_INT32, - G_FILE_ATTRIBUTE_TYPE_UINT64, - G_FILE_ATTRIBUTE_TYPE_INT64, - G_FILE_ATTRIBUTE_TYPE_OBJECT -} GFileAttributeType; - -/** - * GFileAttributeInfoFlags: - * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set. - * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied. - * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved. - * - * Flags specifying the behaviour of an attribute. - **/ -typedef enum { - G_FILE_ATTRIBUTE_INFO_NONE = 0, - G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE = 1 << 0, - G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED = 1 << 1 -} GFileAttributeInfoFlags; - -/** - * GFileAttributeStatus: - * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty). - * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set. - * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value. - * - * Used by g_file_set_attributes_from_info() when setting file attributes. - **/ -typedef enum { - G_FILE_ATTRIBUTE_STATUS_UNSET = 0, - G_FILE_ATTRIBUTE_STATUS_SET, - G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING -} GFileAttributeStatus; - /** * GFileAttributeInfo: * @name: the name of the attribute. @@ -93,11 +39,11 @@ typedef enum { * * Information about a specific attribute. **/ -typedef struct { +struct _GFileAttributeInfo { char *name; GFileAttributeType type; GFileAttributeInfoFlags flags; -} GFileAttributeInfo; +}; /** * GFileAttributeInfoList: @@ -107,10 +53,10 @@ typedef struct { * Acts as a lightweight registry for possible valid file attributes. * The registry stores Key-Value pair formats as #GFileAttributeInfos. **/ -typedef struct { +struct _GFileAttributeInfoList { GFileAttributeInfo *infos; int n_infos; -} GFileAttributeInfoList; +}; GFileAttributeInfoList * g_file_attribute_info_list_new (void); GFileAttributeInfoList * g_file_attribute_info_list_ref (GFileAttributeInfoList *list); diff --git a/gio/gfileenumerator.c b/gio/gfileenumerator.c index bb8fd8f9..07acc60c 100644 --- a/gio/gfileenumerator.c +++ b/gio/gfileenumerator.c @@ -22,9 +22,12 @@ #include "config.h" #include "gfileenumerator.h" +#include "gfile.h" #include "gioscheduler.h" +#include "gasyncresult.h" #include "gasynchelper.h" #include "gsimpleasyncresult.h" +#include "gioerror.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gfileenumerator.h b/gio/gfileenumerator.h index af030c1e..7634d6bb 100644 --- a/gio/gfileenumerator.h +++ b/gio/gfileenumerator.h @@ -27,11 +27,7 @@ #ifndef __G_FILE_ENUMERATOR_H__ #define __G_FILE_ENUMERATOR_H__ -#include -#include -#include -#include -#include +#include G_BEGIN_DECLS @@ -49,22 +45,9 @@ G_BEGIN_DECLS * * A per matched file iterator. **/ -typedef struct _GFileEnumerator GFileEnumerator; typedef struct _GFileEnumeratorClass GFileEnumeratorClass; typedef struct _GFileEnumeratorPrivate GFileEnumeratorPrivate; -/* Nasty */ -GType g_file_get_type (void) G_GNUC_CONST; -#define G_TYPE_FILE (g_file_get_type ()) -/** - * GFile: - * - * 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 */ - struct _GFileEnumerator { GObject parent_instance; diff --git a/gio/gfileicon.c b/gio/gfileicon.c index cf4e9252..0bd3a524 100644 --- a/gio/gfileicon.c +++ b/gio/gfileicon.c @@ -23,6 +23,10 @@ #include "config.h" #include "gfileicon.h" +#include "gfile.h" +#include "gicon.h" +#include "gloadableicon.h" +#include "ginputstream.h" #include "gsimpleasyncresult.h" #include "gioalias.h" diff --git a/gio/gfileicon.h b/gio/gfileicon.h index 18d73d0d..58b04719 100644 --- a/gio/gfileicon.h +++ b/gio/gfileicon.h @@ -27,8 +27,7 @@ #ifndef __G_FILE_ICON_H__ #define __G_FILE_ICON_H__ -#include -#include +#include G_BEGIN_DECLS @@ -44,7 +43,6 @@ G_BEGIN_DECLS * * Gets an icon for a #GFile. Implements #GLoadableIcon. **/ -typedef struct _GFileIcon GFileIcon; typedef struct _GFileIconClass GFileIconClass; GType g_file_icon_get_type (void) G_GNUC_CONST; diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c index b6269152..7fe6b64a 100644 --- a/gio/gfileinfo.c +++ b/gio/gfileinfo.c @@ -58,6 +58,7 @@ #include "gfileinfo.h" #include "gfileattribute-priv.h" +#include "gicon.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gfileinfo.h b/gio/gfileinfo.h index 7743c165..60ccfa89 100644 --- a/gio/gfileinfo.h +++ b/gio/gfileinfo.h @@ -27,9 +27,7 @@ #ifndef __G_FILE_INFO_H__ #define __G_FILE_INFO_H__ -#include -#include -#include +#include G_BEGIN_DECLS @@ -45,55 +43,8 @@ G_BEGIN_DECLS * * Stores information about a file system object referenced by a #GFile. **/ -typedef struct _GFileInfo GFileInfo; typedef struct _GFileInfoClass GFileInfoClass; -/** - * GFileAttributeMatcher: - * - * Determines if a string matches a file attribute. - **/ -typedef struct _GFileAttributeMatcher GFileAttributeMatcher; - -/** - * GFileType: - * @G_FILE_TYPE_UNKNOWN: File's type is unknown. - * @G_FILE_TYPE_REGULAR: File handle represents a regular file. - * @G_FILE_TYPE_DIRECTORY: File handle represents a directory. - * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link - * (Unix systems). - * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, - * block device, or character device. - * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems). - * @G_FILE_TYPE_MOUNTABLE: File is a mountable location. - * - * Indicates the file's on-disk type. - **/ -typedef enum { - G_FILE_TYPE_UNKNOWN = 0, - G_FILE_TYPE_REGULAR, - G_FILE_TYPE_DIRECTORY, - G_FILE_TYPE_SYMBOLIC_LINK, - G_FILE_TYPE_SPECIAL, /* socket, fifo, blockdev, chardev */ - G_FILE_TYPE_SHORTCUT, - G_FILE_TYPE_MOUNTABLE -} GFileType; - -/** - * GFilesystemPreviewType: - * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it. - * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files. - * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files. - * - * Indicates a hint from the file system whether files should be - * previewed in a file manager. Returned as the value of the key - * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW. - **/ -typedef enum { - G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS = 0, - G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL, - G_FILESYSTEM_PREVIEW_TYPE_NEVER -} GFilesystemPreviewType; /* Common Attributes: */ /** diff --git a/gio/gfileinputstream.c b/gio/gfileinputstream.c index d68b684d..c3afd005 100644 --- a/gio/gfileinputstream.c +++ b/gio/gfileinputstream.c @@ -26,6 +26,9 @@ #include #include #include "gsimpleasyncresult.h" +#include "gcancellable.h" +#include "gasyncresult.h" +#include "gioerror.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gfileinputstream.h b/gio/gfileinputstream.h index 1abc46eb..3b204317 100644 --- a/gio/gfileinputstream.h +++ b/gio/gfileinputstream.h @@ -28,7 +28,6 @@ #define __G_FILE_INPUT_STREAM_H__ #include -#include G_BEGIN_DECLS @@ -47,7 +46,6 @@ G_BEGIN_DECLS * * #GFileInputStream implements #GSeekable. **/ -typedef struct _GFileInputStream GFileInputStream; typedef struct _GFileInputStreamClass GFileInputStreamClass; typedef struct _GFileInputStreamPrivate GFileInputStreamPrivate; diff --git a/gio/gfilemonitor.c b/gio/gfilemonitor.c index ec2fe463..4e529322 100644 --- a/gio/gfilemonitor.c +++ b/gio/gfilemonitor.c @@ -26,6 +26,7 @@ #include "gfilemonitor.h" #include "gio-marshal.h" #include "gioenumtypes.h" +#include "gfile.h" #include "gvfs.h" #include "glibintl.h" diff --git a/gio/gfilemonitor.h b/gio/gfilemonitor.h index dfc3e26d..da7bed34 100644 --- a/gio/gfilemonitor.h +++ b/gio/gfilemonitor.h @@ -27,8 +27,7 @@ #ifndef __G_FILE_MONITOR_H__ #define __G_FILE_MONITOR_H__ -#include -#include +#include G_BEGIN_DECLS @@ -39,29 +38,7 @@ G_BEGIN_DECLS #define G_IS_FILE_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_MONITOR)) #define G_FILE_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_MONITOR, GFileMonitorClass)) -/** - * GFileMonitorEvent: - * @G_FILE_MONITOR_EVENT_CHANGED: a file changed. - * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes. - * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted. - * @G_FILE_MONITOR_EVENT_CREATED: a file was created. - * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed. - * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted. - * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted. - * - * Specifies what type of event a monitor event is. - **/ -typedef enum { - G_FILE_MONITOR_EVENT_CHANGED, - G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT, - G_FILE_MONITOR_EVENT_DELETED, - G_FILE_MONITOR_EVENT_CREATED, - G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED, - G_FILE_MONITOR_EVENT_PRE_UNMOUNT, - G_FILE_MONITOR_EVENT_UNMOUNTED -} GFileMonitorEvent; - -typedef struct _GFileMonitorClass GFileMonitorClass; +typedef struct _GFileMonitorClass GFileMonitorClass; typedef struct _GFileMonitorPrivate GFileMonitorPrivate; /** diff --git a/gio/gfilenamecompleter.c b/gio/gfilenamecompleter.c index 21774076..4c38fd8b 100644 --- a/gio/gfilenamecompleter.c +++ b/gio/gfilenamecompleter.c @@ -22,7 +22,11 @@ #include "config.h" #include "gfilenamecompleter.h" +#include "gfileenumerator.h" +#include "gfileattribute.h" #include "gfile.h" +#include "gfileinfo.h" +#include "gcancellable.h" #include #include "glibintl.h" diff --git a/gio/gfilenamecompleter.h b/gio/gfilenamecompleter.h index c7fd3835..c294574d 100644 --- a/gio/gfilenamecompleter.h +++ b/gio/gfilenamecompleter.h @@ -27,7 +27,7 @@ #ifndef __G_FILENAME_COMPLETER_H__ #define __G_FILENAME_COMPLETER_H__ -#include +#include G_BEGIN_DECLS @@ -43,7 +43,6 @@ G_BEGIN_DECLS * * Completes filenames based on files that exist within the file system. **/ -typedef struct _GFilenameCompleter GFilenameCompleter; typedef struct _GFilenameCompleterClass GFilenameCompleterClass; struct _GFilenameCompleterClass { diff --git a/gio/gfileoutputstream.c b/gio/gfileoutputstream.c index ee1cd78b..7dea32cd 100644 --- a/gio/gfileoutputstream.c +++ b/gio/gfileoutputstream.c @@ -26,6 +26,9 @@ #include #include #include "gsimpleasyncresult.h" +#include "gasyncresult.h" +#include "gcancellable.h" +#include "gioerror.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gfileoutputstream.h b/gio/gfileoutputstream.h index aebb3c24..a3fe4441 100644 --- a/gio/gfileoutputstream.h +++ b/gio/gfileoutputstream.h @@ -28,7 +28,6 @@ #define __G_FILE_OUTPUT_STREAM_H__ #include -#include G_BEGIN_DECLS @@ -47,7 +46,6 @@ G_BEGIN_DECLS * * #GFileOutputStream implements GSeekable. **/ -typedef struct _GFileOutputStream GFileOutputStream; typedef struct _GFileOutputStreamClass GFileOutputStreamClass; typedef struct _GFileOutputStreamPrivate GFileOutputStreamPrivate; diff --git a/gio/gfilterinputstream.h b/gio/gfilterinputstream.h index ee6d9152..01b066cd 100644 --- a/gio/gfilterinputstream.h +++ b/gio/gfilterinputstream.h @@ -27,7 +27,6 @@ #ifndef __G_FILTER_INPUT_STREAM_H__ #define __G_FILTER_INPUT_STREAM_H__ -#include #include G_BEGIN_DECLS @@ -44,7 +43,6 @@ G_BEGIN_DECLS * * A base class for all input streams that work on an underlying stream. **/ -typedef struct _GFilterInputStream GFilterInputStream; typedef struct _GFilterInputStreamClass GFilterInputStreamClass; typedef struct _GFilterInputStreamPrivate GFilterInputStreamPrivate; diff --git a/gio/gfilteroutputstream.h b/gio/gfilteroutputstream.h index ba2d968e..be8bc451 100644 --- a/gio/gfilteroutputstream.h +++ b/gio/gfilteroutputstream.h @@ -27,7 +27,6 @@ #ifndef __G_FILTER_OUTPUT_STREAM_H__ #define __G_FILTER_OUTPUT_STREAM_H__ -#include #include G_BEGIN_DECLS @@ -44,7 +43,6 @@ G_BEGIN_DECLS * * A base class for all output streams that work on an underlying stream. **/ -typedef struct _GFilterOutputStream GFilterOutputStream; typedef struct _GFilterOutputStreamClass GFilterOutputStreamClass; typedef struct _GFilterOutputStreamPrivate GFilterOutputStreamPrivate; diff --git a/gio/gicon.h b/gio/gicon.h index dd028899..7b7344e7 100644 --- a/gio/gicon.h +++ b/gio/gicon.h @@ -27,7 +27,7 @@ #ifndef __G_ICON_H__ #define __G_ICON_H__ -#include +#include G_BEGIN_DECLS @@ -41,7 +41,6 @@ G_BEGIN_DECLS * * An abstract type that specifies an icon. **/ -typedef struct _GIcon GIcon; /* Dummy typedef */ typedef struct _GIconIface GIconIface; /** diff --git a/gio/ginputstream.c b/gio/ginputstream.c index 44ddc48f..740de34e 100644 --- a/gio/ginputstream.c +++ b/gio/ginputstream.c @@ -26,7 +26,10 @@ #include "ginputstream.h" #include "gseekable.h" +#include "gcancellable.h" +#include "gasyncresult.h" #include "gsimpleasyncresult.h" +#include "gioerror.h" #include "gioalias.h" diff --git a/gio/ginputstream.h b/gio/ginputstream.h index 3759fec7..0257e3d5 100644 --- a/gio/ginputstream.h +++ b/gio/ginputstream.h @@ -27,10 +27,7 @@ #ifndef __G_INPUT_STREAM_H__ #define __G_INPUT_STREAM_H__ -#include -#include -#include -#include +#include G_BEGIN_DECLS @@ -46,7 +43,6 @@ G_BEGIN_DECLS * * Base class for streaming input operations. **/ -typedef struct _GInputStream GInputStream; typedef struct _GInputStreamClass GInputStreamClass; typedef struct _GInputStreamPrivate GInputStreamPrivate; diff --git a/gio/gio.h b/gio/gio.h index a81e17fe..bc2daee5 100644 --- a/gio/gio.h +++ b/gio/gio.h @@ -25,31 +25,47 @@ #define __GIO_GIO_H_INSIDE__ -#include -#include -#include -#include +#include + #include -#include -#include -#include -#include -#include -#include +#include #include #include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include #include +#include +#include +#include +#include #include #include +#include #include #include -#include -#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #undef __GIO_GIO_H_INSIDE__ diff --git a/gio/gioenums.h b/gio/gioenums.h new file mode 100644 index 00000000..cab54a7d --- /dev/null +++ b/gio/gioenums.h @@ -0,0 +1,443 @@ +/* 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 + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Alexander Larsson + */ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __GIO_ENUMS_H__ +#define __GIO_ENUMS_H__ + +#include + +G_BEGIN_DECLS + + +/** + * GAppInfoCreateFlags: + * @G_APP_INFO_CREATE_NONE: No flags. + * @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window. + * @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments. + * + * Flags used when creating a #GAppInfo. + */ +typedef enum { + G_APP_INFO_CREATE_NONE = 0, /*< nick=none >*/ + G_APP_INFO_CREATE_NEEDS_TERMINAL = (1 << 0), /*< nick=needs-terminal >*/ + G_APP_INFO_CREATE_SUPPORTS_URIS = (1 << 1) /*< nick=supports-uris >*/ +} GAppInfoCreateFlags; + + +/** + * GDataStreamByteOrder: + * @G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN: Selects Big Endian byte order. + * @G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN: Selects Little Endian byte order. + * @G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN: Selects endianness based on host machine's architecture. + * + * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources + * across various machine architectures. + * + **/ +typedef enum { + G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN, + G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN, + G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN +} GDataStreamByteOrder; + + +/** + * GDataStreamNewlineType: + * @G_DATA_STREAM_NEWLINE_TYPE_LF: Selects "LF" line endings, common on most modern UNIX platforms. + * @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings. + * @G_DATA_STREAM_NEWLINE_TYPE_CR_LF: Selects "CR, LF" line ending, common on Microsoft Windows. + * @G_DATA_STREAM_NEWLINE_TYPE_ANY: Automatically try to handle any line ending type. + * + * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file. + **/ +typedef enum { + G_DATA_STREAM_NEWLINE_TYPE_LF, + G_DATA_STREAM_NEWLINE_TYPE_CR, + G_DATA_STREAM_NEWLINE_TYPE_CR_LF, + G_DATA_STREAM_NEWLINE_TYPE_ANY +} GDataStreamNewlineType; + + +/** + * GFileAttributeType: + * @G_FILE_ATTRIBUTE_TYPE_INVALID: indicates an invalid or uninitalized type. + * @G_FILE_ATTRIBUTE_TYPE_STRING: a null terminated UTF8 string. + * @G_FILE_ATTRIBUTE_TYPE_BYTE_STRING: a zero terminated string of non-zero bytes. + * @G_FILE_ATTRIBUTE_TYPE_BOOLEAN: a boolean value. + * @G_FILE_ATTRIBUTE_TYPE_UINT32: an unsigned 4-byte/32-bit integer. + * @G_FILE_ATTRIBUTE_TYPE_INT32: a signed 4-byte/32-bit integer. + * @G_FILE_ATTRIBUTE_TYPE_UINT64: an unsigned 8-byte/64-bit integer. + * @G_FILE_ATTRIBUTE_TYPE_INT64: a signed 8-byte/64-bit integer. + * @G_FILE_ATTRIBUTE_TYPE_OBJECT: a #GObject. + * + * The data types for file attributes. + **/ +typedef enum { + G_FILE_ATTRIBUTE_TYPE_INVALID = 0, + G_FILE_ATTRIBUTE_TYPE_STRING, + G_FILE_ATTRIBUTE_TYPE_BYTE_STRING, /* zero terminated string of non-zero bytes */ + G_FILE_ATTRIBUTE_TYPE_BOOLEAN, + G_FILE_ATTRIBUTE_TYPE_UINT32, + G_FILE_ATTRIBUTE_TYPE_INT32, + G_FILE_ATTRIBUTE_TYPE_UINT64, + G_FILE_ATTRIBUTE_TYPE_INT64, + G_FILE_ATTRIBUTE_TYPE_OBJECT +} GFileAttributeType; + + +/** + * GFileAttributeInfoFlags: + * @G_FILE_ATTRIBUTE_INFO_NONE: no flags set. + * @G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE: copy the attribute values when the file is copied. + * @G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED: copy the attribute values when the file is moved. + * + * Flags specifying the behaviour of an attribute. + **/ +typedef enum { + G_FILE_ATTRIBUTE_INFO_NONE = 0, + G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE = (1 << 0), + G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED = (1 << 1) +} GFileAttributeInfoFlags; + + +/** + * GFileAttributeStatus: + * @G_FILE_ATTRIBUTE_STATUS_UNSET: Attribute value is unset (empty). + * @G_FILE_ATTRIBUTE_STATUS_SET: Attribute value is set. + * @G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING: Indicates an error in setting the value. + * + * Used by g_file_set_attributes_from_info() when setting file attributes. + **/ +typedef enum { + G_FILE_ATTRIBUTE_STATUS_UNSET = 0, + G_FILE_ATTRIBUTE_STATUS_SET, + G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING +} GFileAttributeStatus; + + +/** + * GFileQueryInfoFlags: + * @G_FILE_QUERY_INFO_NONE: No flags set. + * @G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS: Don't follow symlinks. + * + * Flags used when querying a #GFileInfo. + */ +typedef enum { + G_FILE_QUERY_INFO_NONE = 0, + G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS = (1 << 0) /*< nick=nofollow-symlinks >*/ +} GFileQueryInfoFlags; + + +/** + * GFileCreateFlags: + * @G_FILE_CREATE_NONE: No flags set. + * @G_FILE_CREATE_PRIVATE: Create a file that can only be + * accessed by the current user. + * + * Flags used when an operation may create a file. + */ +typedef enum { + G_FILE_CREATE_NONE = 0, + G_FILE_CREATE_PRIVATE = (1 << 0) +} GFileCreateFlags; + + +/** + * GMountMountFlags: + * @G_MOUNT_MOUNT_NONE: No flags set. + * + * Flags used when mounting a mount. + */ +typedef enum { + G_MOUNT_MOUNT_NONE = 0 +} GMountMountFlags; + + +/** + * GMountUnmountFlags: + * @G_MOUNT_UNMOUNT_NONE: No flags set. + * @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding + * file operations on the mount. + * + * Flags used when an unmounting a mount. + */ +typedef enum { + G_MOUNT_UNMOUNT_NONE = 0, + G_MOUNT_UNMOUNT_FORCE = (1 << 0) +} GMountUnmountFlags; + + +/** + * GFileCopyFlags: + * @G_FILE_COPY_NONE: No flags set. + * @G_FILE_COPY_OVERWRITE: Overwrite any existing files + * @G_FILE_COPY_BACKUP: Make a backup of any existing files. + * @G_FILE_COPY_NOFOLLOW_SYMLINKS: Don't follow symlinks. + * @G_FILE_COPY_ALL_METADATA: Copy all file metadata instead of just default set used for copy (see #GFileInfo). + * @G_FILE_COPY_NO_FALLBACK_FOR_MOVE: Don't use copy and delete fallback if native move not supported. + * + * Flags used when copying or moving files. + */ +typedef enum { + G_FILE_COPY_NONE = 0, /*< nick=none >*/ + G_FILE_COPY_OVERWRITE = (1 << 0), + G_FILE_COPY_BACKUP = (1 << 1), + G_FILE_COPY_NOFOLLOW_SYMLINKS = (1 << 2), + G_FILE_COPY_ALL_METADATA = (1 << 3), + G_FILE_COPY_NO_FALLBACK_FOR_MOVE = (1 << 4) +} GFileCopyFlags; + + +/** + * GFileMonitorFlags: + * @G_FILE_MONITOR_NONE: No flags set. + * @G_FILE_MONITOR_WATCH_MOUNTS: Watch for mount events. + * + * Flags used to set what a #GFileMonitor will watch for. + */ +typedef enum { + G_FILE_MONITOR_NONE = 0, + G_FILE_MONITOR_WATCH_MOUNTS = (1 << 0) +} GFileMonitorFlags; + + +/** + * GFileType: + * @G_FILE_TYPE_UNKNOWN: File's type is unknown. + * @G_FILE_TYPE_REGULAR: File handle represents a regular file. + * @G_FILE_TYPE_DIRECTORY: File handle represents a directory. + * @G_FILE_TYPE_SYMBOLIC_LINK: File handle represents a symbolic link + * (Unix systems). + * @G_FILE_TYPE_SPECIAL: File is a "special" file, such as a socket, fifo, + * block device, or character device. + * @G_FILE_TYPE_SHORTCUT: File is a shortcut (Windows systems). + * @G_FILE_TYPE_MOUNTABLE: File is a mountable location. + * + * Indicates the file's on-disk type. + **/ +typedef enum { + G_FILE_TYPE_UNKNOWN = 0, + G_FILE_TYPE_REGULAR, + G_FILE_TYPE_DIRECTORY, + G_FILE_TYPE_SYMBOLIC_LINK, + G_FILE_TYPE_SPECIAL, /* socket, fifo, blockdev, chardev */ + G_FILE_TYPE_SHORTCUT, + G_FILE_TYPE_MOUNTABLE +} GFileType; + + +/** + * GFilesystemPreviewType: + * @G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS: Only preview files if user has explicitly requested it. + * @G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL: Preview files if user has requested preview of "local" files. + * @G_FILESYSTEM_PREVIEW_TYPE_NEVER: Never preview files. + * + * Indicates a hint from the file system whether files should be + * previewed in a file manager. Returned as the value of the key + * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW. + **/ +typedef enum { + G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS = 0, + G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL, + G_FILESYSTEM_PREVIEW_TYPE_NEVER +} GFilesystemPreviewType; + + +/** + * GFileMonitorEvent: + * @G_FILE_MONITOR_EVENT_CHANGED: a file changed. + * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes. + * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted. + * @G_FILE_MONITOR_EVENT_CREATED: a file was created. + * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed. + * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted. + * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted. + * + * Specifies what type of event a monitor event is. + **/ +typedef enum { + G_FILE_MONITOR_EVENT_CHANGED, + G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT, + G_FILE_MONITOR_EVENT_DELETED, + G_FILE_MONITOR_EVENT_CREATED, + G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED, + G_FILE_MONITOR_EVENT_PRE_UNMOUNT, + G_FILE_MONITOR_EVENT_UNMOUNTED +} GFileMonitorEvent; + + +/* This enumeration conflicts with GIOError in giochannel.h. However, + * that is only used as a return value in some deprecated functions. + * So, we reuse the same prefix for the enumeration values, but call + * the actual enumeration (which is rarely used) GIOErrorEnum. + */ +/** + * GIOErrorEnum: + * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails. + * @G_IO_ERROR_NOT_FOUND: File not found error. + * @G_IO_ERROR_EXISTS: File already exists error. + * @G_IO_ERROR_IS_DIRECTORY: File is a directory error. + * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory. + * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty. + * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file. + * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link. + * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted. + * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters. + * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters. + * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links. + * @G_IO_ERROR_NO_SPACE: No space left on drive. + * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument. + * @G_IO_ERROR_PERMISSION_DENIED: Permission denied. + * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend. + * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted. + * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted. + * @G_IO_ERROR_CLOSED: File was closed. + * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable. + * @G_IO_ERROR_PENDING: Operations are still pending. + * @G_IO_ERROR_READ_ONLY: File is read only. + * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created. + * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect. + * @G_IO_ERROR_TIMED_OUT: Operation timed out. + * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive. + * @G_IO_ERROR_BUSY: File is busy. + * @G_IO_ERROR_WOULD_BLOCK: Operation would block. + * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations). + * @G_IO_ERROR_WOULD_MERGE: Operation would merge files. + * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog. + * + * Error codes returned by GIO functions. + * + **/ +typedef enum { + G_IO_ERROR_FAILED, + G_IO_ERROR_NOT_FOUND, + G_IO_ERROR_EXISTS, + G_IO_ERROR_IS_DIRECTORY, + G_IO_ERROR_NOT_DIRECTORY, + G_IO_ERROR_NOT_EMPTY, + G_IO_ERROR_NOT_REGULAR_FILE, + G_IO_ERROR_NOT_SYMBOLIC_LINK, + G_IO_ERROR_NOT_MOUNTABLE_FILE, + G_IO_ERROR_FILENAME_TOO_LONG, + G_IO_ERROR_INVALID_FILENAME, + G_IO_ERROR_TOO_MANY_LINKS, + G_IO_ERROR_NO_SPACE, + G_IO_ERROR_INVALID_ARGUMENT, + G_IO_ERROR_PERMISSION_DENIED, + G_IO_ERROR_NOT_SUPPORTED, + G_IO_ERROR_NOT_MOUNTED, + G_IO_ERROR_ALREADY_MOUNTED, + G_IO_ERROR_CLOSED, + G_IO_ERROR_CANCELLED, + G_IO_ERROR_PENDING, + G_IO_ERROR_READ_ONLY, + G_IO_ERROR_CANT_CREATE_BACKUP, + G_IO_ERROR_WRONG_ETAG, + G_IO_ERROR_TIMED_OUT, + G_IO_ERROR_WOULD_RECURSE, + G_IO_ERROR_BUSY, + G_IO_ERROR_WOULD_BLOCK, + G_IO_ERROR_HOST_NOT_FOUND, + G_IO_ERROR_WOULD_MERGE, + G_IO_ERROR_FAILED_HANDLED +} GIOErrorEnum; + + +/** + * GAskPasswordFlags: + * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password. + * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username. + * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain. + * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings. + * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users. + * + * #GAskPasswordFlags are used to request specific information from the + * user, or to notify the user of their choices in an authentication + * situation. + * + **/ +typedef enum { + G_ASK_PASSWORD_NEED_PASSWORD = (1 << 0), + G_ASK_PASSWORD_NEED_USERNAME = (1 << 1), + G_ASK_PASSWORD_NEED_DOMAIN = (1 << 2), + G_ASK_PASSWORD_SAVING_SUPPORTED = (1 << 3), + G_ASK_PASSWORD_ANONYMOUS_SUPPORTED = (1 << 4) +} GAskPasswordFlags; + + +/** + * GPasswordSave: + * @G_PASSWORD_SAVE_NEVER: never save a password. + * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session. + * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently. + * + * #GPasswordSave is used to indicate the lifespan of a saved password. + * + * #Gvfs stores passwords in the Gnome keyring when this flag allows it + * to, and later retrieves it again from there. + **/ +typedef enum { + G_PASSWORD_SAVE_NEVER, + G_PASSWORD_SAVE_FOR_SESSION, + G_PASSWORD_SAVE_PERMANENTLY +} GPasswordSave; + + +/** + * GMountOperationResult: + * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the user specified data is now availible + * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation to be aborted + * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not implemented) + * + * #GMountOperationResult is returned as a result when a request for information + * is send by the mounting operation. + **/ +typedef enum { + G_MOUNT_OPERATION_HANDLED, + G_MOUNT_OPERATION_ABORTED, + G_MOUNT_OPERATION_UNHANDLED +} GMountOperationResult; + + +/** + * GOutputStreamSpliceFlags: + * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream. + * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after the splice. + * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after the splice. + * + * GOutputStreamSpliceFlags determine how streams should be spliced. + **/ +typedef enum { + G_OUTPUT_STREAM_SPLICE_NONE = 0, + G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE = (1 << 0), + G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET = (1 << 1) +} GOutputStreamSpliceFlags; + + + +G_END_DECLS + +#endif /* __GIO_ENUMS_H__ */ diff --git a/gio/gioerror.h b/gio/gioerror.h index 74757065..81a30173 100644 --- a/gio/gioerror.h +++ b/gio/gioerror.h @@ -28,6 +28,7 @@ #define __G_IO_ERROR_H__ #include +#include G_BEGIN_DECLS @@ -41,84 +42,6 @@ GQuark g_io_error_quark (void); **/ #define G_IO_ERROR g_io_error_quark() -/* This enumeration conflicts with GIOError in giochannel.h. However, - * that is only used as a return value in some deprecated functions. - * So, we reuse the same prefix for the enumeration values, but call - * the actual enumeration (which is rarely used) GIOErrorEnum. - */ - -/** - * GIOErrorEnum: - * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails. - * @G_IO_ERROR_NOT_FOUND: File not found error. - * @G_IO_ERROR_EXISTS: File already exists error. - * @G_IO_ERROR_IS_DIRECTORY: File is a directory error. - * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory. - * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty. - * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file. - * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link. - * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted. - * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters. - * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters. - * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links. - * @G_IO_ERROR_NO_SPACE: No space left on drive. - * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument. - * @G_IO_ERROR_PERMISSION_DENIED: Permission denied. - * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend. - * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted. - * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted. - * @G_IO_ERROR_CLOSED: File was closed. - * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable. - * @G_IO_ERROR_PENDING: Operations are still pending. - * @G_IO_ERROR_READ_ONLY: File is read only. - * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created. - * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect. - * @G_IO_ERROR_TIMED_OUT: Operation timed out. - * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive. - * @G_IO_ERROR_BUSY: File is busy. - * @G_IO_ERROR_WOULD_BLOCK: Operation would block. - * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations). - * @G_IO_ERROR_WOULD_MERGE: Operation would merge files. - * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog. - * - * Error codes returned by GIO functions. - * - **/ -typedef enum -{ - G_IO_ERROR_FAILED, - G_IO_ERROR_NOT_FOUND, - G_IO_ERROR_EXISTS, - G_IO_ERROR_IS_DIRECTORY, - G_IO_ERROR_NOT_DIRECTORY, - G_IO_ERROR_NOT_EMPTY, - G_IO_ERROR_NOT_REGULAR_FILE, - G_IO_ERROR_NOT_SYMBOLIC_LINK, - G_IO_ERROR_NOT_MOUNTABLE_FILE, - G_IO_ERROR_FILENAME_TOO_LONG, - G_IO_ERROR_INVALID_FILENAME, - G_IO_ERROR_TOO_MANY_LINKS, - G_IO_ERROR_NO_SPACE, - G_IO_ERROR_INVALID_ARGUMENT, - G_IO_ERROR_PERMISSION_DENIED, - G_IO_ERROR_NOT_SUPPORTED, - G_IO_ERROR_NOT_MOUNTED, - G_IO_ERROR_ALREADY_MOUNTED, - G_IO_ERROR_CLOSED, - G_IO_ERROR_CANCELLED, - G_IO_ERROR_PENDING, - G_IO_ERROR_READ_ONLY, - G_IO_ERROR_CANT_CREATE_BACKUP, - G_IO_ERROR_WRONG_ETAG, - G_IO_ERROR_TIMED_OUT, - G_IO_ERROR_WOULD_RECURSE, - G_IO_ERROR_BUSY, - G_IO_ERROR_WOULD_BLOCK, - G_IO_ERROR_HOST_NOT_FOUND, - G_IO_ERROR_WOULD_MERGE, - G_IO_ERROR_FAILED_HANDLED -} GIOErrorEnum; - GIOErrorEnum g_io_error_from_errno (gint err_no); G_END_DECLS diff --git a/gio/giomodule.h b/gio/giomodule.h index 2801d773..0d8c5ab6 100644 --- a/gio/giomodule.h +++ b/gio/giomodule.h @@ -27,7 +27,7 @@ #ifndef __G_IO_MODULE_H__ #define __G_IO_MODULE_H__ -#include +#include #include G_BEGIN_DECLS @@ -44,12 +44,8 @@ G_BEGIN_DECLS * * Opaque module base class for extending GIO. **/ -typedef struct _GIOModule GIOModule; typedef struct _GIOModuleClass GIOModuleClass; -typedef struct _GIOExtensionPoint GIOExtensionPoint; -typedef struct _GIOExtension GIOExtension; - GType g_io_module_get_type (void) G_GNUC_CONST; GIOModule *g_io_module_new (const gchar *filename); diff --git a/gio/gioscheduler.c b/gio/gioscheduler.c index 58218003..aa0d910c 100644 --- a/gio/gioscheduler.c +++ b/gio/gioscheduler.c @@ -23,6 +23,7 @@ #include "config.h" #include "gioscheduler.h" +#include "gcancellable.h" #include "gioalias.h" diff --git a/gio/gioscheduler.h b/gio/gioscheduler.h index 03c7f94f..d522608c 100644 --- a/gio/gioscheduler.h +++ b/gio/gioscheduler.h @@ -28,38 +28,10 @@ #define __G_IO_SCHEDULER_H__ #include -#include +#include G_BEGIN_DECLS -/** - * GIOSchedulerJob: - * - * Opaque class for definining and scheduling IO jobs. - **/ -typedef struct _GIOSchedulerJob GIOSchedulerJob; - -/** - * GIOSchedulerJobFunc: - * @job: a #GIOSchedulerJob. - * @cancellable: optional #GCancellable object, %NULL to ignore. - * @user_data: the data to pass to callback function - * - * I/O Job function. - * - * Note that depending on whether threads are available, the - * #GIOScheduler may run jobs in separate threads or in an idle - * in the mainloop. - * - * Long-running jobs should periodically check the @cancellable - * to see if they have been cancelled. - * - * Returns: %TRUE if this function should be called again to - * complete the job, %FALSE if the job is complete (or cancelled) - **/ -typedef gboolean (*GIOSchedulerJobFunc) (GIOSchedulerJob *job, - GCancellable *cancellable, - gpointer user_data); void g_io_scheduler_push_job (GIOSchedulerJobFunc job_func, gpointer user_data, diff --git a/gio/giotypes.h b/gio/giotypes.h new file mode 100644 index 00000000..e19628fb --- /dev/null +++ b/gio/giotypes.h @@ -0,0 +1,197 @@ +/* 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 + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Alexander Larsson + */ + +#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __GIO_TYPES_H__ +#define __GIO_TYPES_H__ + +#include +#include + +G_BEGIN_DECLS + +typedef struct _GAppLaunchContext GAppLaunchContext; +typedef struct _GAppInfo GAppInfo; /* Dummy typedef */ +typedef struct _GAsyncResult GAsyncResult; /* Dummy typedef */ +typedef struct _GBufferedInputStream GBufferedInputStream; +typedef struct _GBufferedOutputStream GBufferedOutputStream; +typedef struct _GCancellable GCancellable; +typedef struct _GDataInputStream GDataInputStream; + +/** + * GDrive: + * + * Opaque drive object. + **/ +typedef struct _GDrive GDrive; /* Dummy typedef */ +typedef struct _GFileEnumerator GFileEnumerator; +typedef struct _GFileMonitor GFileMonitor; +typedef struct _GFilterInputStream GFilterInputStream; +typedef struct _GFilterOutputStream GFilterOutputStream; + +/** + * GFile: + * + * 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 */ +typedef struct _GFileInfo GFileInfo; + +/** + * GFileAttributeMatcher: + * + * Determines if a string matches a file attribute. + **/ +typedef struct _GFileAttributeMatcher GFileAttributeMatcher; +typedef struct _GFileAttributeInfo GFileAttributeInfo; +typedef struct _GFileAttributeInfoList GFileAttributeInfoList; +typedef struct _GFileInputStream GFileInputStream; +typedef struct _GFileOutputStream GFileOutputStream; +typedef struct _GFileIcon GFileIcon; +typedef struct _GFilenameCompleter GFilenameCompleter; + + +typedef struct _GIcon GIcon; /* Dummy typedef */ +typedef struct _GInputStream GInputStream; +typedef struct _GIOModule GIOModule; +typedef struct _GIOExtensionPoint GIOExtensionPoint; +typedef struct _GIOExtension GIOExtension; + +/** + * GIOSchedulerJob: + * + * Opaque class for definining and scheduling IO jobs. + **/ +typedef struct _GIOSchedulerJob GIOSchedulerJob; +typedef struct _GLoadableIcon GLoadableIcon; /* Dummy typedef */ +typedef struct _GMemoryInputStream GMemoryInputStream; +typedef struct _GMemoryOutputStream GMemoryOutputStream; + +/** + * GMount: + * + * A handle to an object implementing the #GMountIface interface. + **/ +typedef struct _GMount GMount; /* Dummy typedef */ +typedef struct _GMountOperation GMountOperation; +typedef struct _GOutputStream GOutputStream; +typedef struct _GSeekable GSeekable; +typedef struct _GSimpleAsyncResult GSimpleAsyncResult; +typedef struct _GThemedIcon GThemedIcon; +typedef struct _GVfs GVfs; /* Dummy typedef */ + +/** + * GVolume: + * + * Opaque mountable volume object. + **/ +typedef struct _GVolume GVolume; /* Dummy typedef */ +typedef struct _GVolumeMonitor GVolumeMonitor; + +/** + * GAsyncReadyCallback: + * @source_object: the object the asynchronous operation was started with. + * @res: a #GAsyncResult. + * @user_data: user data passed to the callback. + * + * Type definition for a function that will be called back when an asynchronous + * operation within GIO has been completed. + **/ +typedef void (*GAsyncReadyCallback) (GObject *source_object, + GAsyncResult *res, + gpointer user_data); + +/** + * GFileProgressCallback: + * @current_num_bytes: the current number of bytes in the operation. + * @total_num_bytes: the total number of bytes in the operation. + * @user_data: user data passed to the callback. + * + * When doing file operations that may take a while, such as moving + * a file or copying a file, a progress callback is used to pass how + * far along that operation is to the application. + **/ +typedef void (*GFileProgressCallback) (goffset current_num_bytes, + goffset total_num_bytes, + gpointer user_data); + +/** + * GFileReadMoreCallback: + * @file_contents: the data as currently read. + * @file_size: the size of the data currently read. + * @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, + goffset file_size, + gpointer callback_data); + + +/** + * GIOSchedulerJobFunc: + * @job: a #GIOSchedulerJob. + * @cancellable: optional #GCancellable object, %NULL to ignore. + * @user_data: the data to pass to callback function + * + * I/O Job function. + * + * Note that depending on whether threads are available, the + * #GIOScheduler may run jobs in separate threads or in an idle + * in the mainloop. + * + * Long-running jobs should periodically check the @cancellable + * to see if they have been cancelled. + * + * Returns: %TRUE if this function should be called again to + * complete the job, %FALSE if the job is complete (or cancelled) + **/ +typedef gboolean (*GIOSchedulerJobFunc) (GIOSchedulerJob *job, + GCancellable *cancellable, + gpointer user_data); + +/** + * GSimpleAsyncThreadFunc: + * @res: a #GSimpleAsyncResult. + * @object: a #GObject. + * @cancellable: optional #GCancellable object, %NULL to ignore. + * + * Simple thread function that runs an asynchronous operation and + * checks for cancellation. + **/ +typedef void (*GSimpleAsyncThreadFunc) (GSimpleAsyncResult *res, + GObject *object, + GCancellable *cancellable); + +G_END_DECLS + +#endif /* __GIO_TYPES_H__ */ diff --git a/gio/gloadableicon.c b/gio/gloadableicon.c index 8735a9e9..dd6e4781 100644 --- a/gio/gloadableicon.c +++ b/gio/gloadableicon.c @@ -21,7 +21,9 @@ */ #include "config.h" +#include "gasyncresult.h" #include "gsimpleasyncresult.h" +#include "gicon.h" #include "gloadableicon.h" #include "glibintl.h" diff --git a/gio/gloadableicon.h b/gio/gloadableicon.h index 3973f74d..b8f45705 100644 --- a/gio/gloadableicon.h +++ b/gio/gloadableicon.h @@ -27,9 +27,7 @@ #ifndef __G_LOADABLE_ICON_H__ #define __G_LOADABLE_ICON_H__ -#include -#include -#include +#include G_BEGIN_DECLS @@ -44,7 +42,6 @@ G_BEGIN_DECLS * Generic type for all kinds of icons that can be loaded * as a stream. **/ -typedef struct _GLoadableIcon GLoadableIcon; /* Dummy typedef */ typedef struct _GLoadableIconIface GLoadableIconIface; /** diff --git a/gio/glocaldirectorymonitor.c b/gio/glocaldirectorymonitor.c index 11720b33..c5d6c8b7 100644 --- a/gio/glocaldirectorymonitor.c +++ b/gio/glocaldirectorymonitor.c @@ -25,6 +25,8 @@ #include "glocaldirectorymonitor.h" #include "gunixmounts.h" #include "giomodule-priv.h" +#include "gfile.h" +#include "gioerror.h" #include "glibintl.h" #include diff --git a/gio/glocaldirectorymonitor.h b/gio/glocaldirectorymonitor.h index 7265ce44..620f56ab 100644 --- a/gio/glocaldirectorymonitor.h +++ b/gio/glocaldirectorymonitor.h @@ -23,7 +23,6 @@ #ifndef __G_LOCAL_DIRECTORY_MONITOR_H__ #define __G_LOCAL_DIRECTORY_MONITOR_H__ -#include #include #include "gunixmounts.h" diff --git a/gio/glocalfile.c b/gio/glocalfile.c index b8031edc..e0bee8d8 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -72,6 +72,7 @@ #endif +#include "gfileattribute.h" #include "glocalfile.h" #include "glocalfileinfo.h" #include "glocalfileenumerator.h" @@ -80,6 +81,8 @@ #include "glocaldirectorymonitor.h" #include "glocalfilemonitor.h" #include "gmountprivate.h" +#include "gunixmounts.h" +#include "gioerror.h" #include #include "glibintl.h" diff --git a/gio/glocalfile.h b/gio/glocalfile.h index 4ce25448..cfb1fb83 100644 --- a/gio/glocalfile.h +++ b/gio/glocalfile.h @@ -23,7 +23,7 @@ #ifndef __G_LOCAL_FILE_H__ #define __G_LOCAL_FILE_H__ -#include +#include G_BEGIN_DECLS diff --git a/gio/glocalfileenumerator.c b/gio/glocalfileenumerator.c index 82e04a5b..664a44a1 100644 --- a/gio/glocalfileenumerator.c +++ b/gio/glocalfileenumerator.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include "glibintl.h" diff --git a/gio/glocalfileenumerator.h b/gio/glocalfileenumerator.h index 7d93e9fc..f7197d0c 100644 --- a/gio/glocalfileenumerator.h +++ b/gio/glocalfileenumerator.h @@ -24,8 +24,6 @@ #define __G_LOCAL_FILE_ENUMERATOR_H__ #include -#include -#include #include G_BEGIN_DECLS diff --git a/gio/glocalfileinputstream.c b/gio/glocalfileinputstream.c index c7cfadea..cedbc46f 100644 --- a/gio/glocalfileinputstream.c +++ b/gio/glocalfileinputstream.c @@ -32,6 +32,7 @@ #include #include +#include "gcancellable.h" #include "gioerror.h" #include "glocalfileinputstream.h" #include "glocalfileinfo.h" diff --git a/gio/glocalfilemonitor.c b/gio/glocalfilemonitor.c index 05c50756..f59ee02b 100644 --- a/gio/glocalfilemonitor.c +++ b/gio/glocalfilemonitor.c @@ -24,6 +24,7 @@ #include "glocalfilemonitor.h" #include "giomodule-priv.h" +#include "gioerror.h" #include "glibintl.h" #include diff --git a/gio/glocalfilemonitor.h b/gio/glocalfilemonitor.h index f667f846..20b7762a 100644 --- a/gio/glocalfilemonitor.h +++ b/gio/glocalfilemonitor.h @@ -23,7 +23,6 @@ #ifndef __G_LOCAL_FILE_MONITOR_H__ #define __G_LOCAL_FILE_MONITOR_H__ -#include #include G_BEGIN_DECLS diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c index 8a6e0552..cbd99940 100644 --- a/gio/glocalfileoutputstream.c +++ b/gio/glocalfileoutputstream.c @@ -35,6 +35,7 @@ #include #include "glibintl.h" #include "gioerror.h" +#include "gcancellable.h" #include "glocalfileoutputstream.h" #include "glocalfileinfo.h" diff --git a/gio/glocalfileoutputstream.h b/gio/glocalfileoutputstream.h index 0c057df0..1e35735d 100644 --- a/gio/glocalfileoutputstream.h +++ b/gio/glocalfileoutputstream.h @@ -24,7 +24,6 @@ #define __G_LOCAL_FILE_OUTPUT_STREAM_H__ #include -#include G_BEGIN_DECLS diff --git a/gio/glocalvfs.c b/gio/glocalvfs.c index c2571a72..42a3f16f 100644 --- a/gio/glocalvfs.c +++ b/gio/glocalvfs.c @@ -24,6 +24,7 @@ #include "glocalvfs.h" #include "glocalfile.h" #include "giomodule.h" +#include "gvfs.h" #include #include #ifdef HAVE_PWD_H diff --git a/gio/glocalvfs.h b/gio/glocalvfs.h index eda00e1f..80a1d3a4 100644 --- a/gio/glocalvfs.h +++ b/gio/glocalvfs.h @@ -23,7 +23,7 @@ #ifndef __G_LOCAL_VFS_H__ #define __G_LOCAL_VFS_H__ -#include +#include G_BEGIN_DECLS diff --git a/gio/gmemoryinputstream.c b/gio/gmemoryinputstream.c index a029d372..bb6001bb 100644 --- a/gio/gmemoryinputstream.c +++ b/gio/gmemoryinputstream.c @@ -26,6 +26,7 @@ #include "gseekable.h" #include "string.h" #include "gsimpleasyncresult.h" +#include "gioerror.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gmemoryinputstream.h b/gio/gmemoryinputstream.h index 0e3e43f2..0aa12002 100644 --- a/gio/gmemoryinputstream.h +++ b/gio/gmemoryinputstream.h @@ -27,7 +27,6 @@ #ifndef __G_MEMORY_INPUT_STREAM_H__ #define __G_MEMORY_INPUT_STREAM_H__ -#include #include G_BEGIN_DECLS @@ -44,7 +43,6 @@ G_BEGIN_DECLS * * Implements #GInputStream for arbitrary memory chunks. **/ -typedef struct _GMemoryInputStream GMemoryInputStream; typedef struct _GMemoryInputStreamClass GMemoryInputStreamClass; typedef struct _GMemoryInputStreamPrivate GMemoryInputStreamPrivate; diff --git a/gio/gmemoryoutputstream.c b/gio/gmemoryoutputstream.c index ebb91ab3..066d60e2 100644 --- a/gio/gmemoryoutputstream.c +++ b/gio/gmemoryoutputstream.c @@ -25,6 +25,7 @@ #include "goutputstream.h" #include "gseekable.h" #include "gsimpleasyncresult.h" +#include "gioerror.h" #include "string.h" #include "glibintl.h" diff --git a/gio/gmemoryoutputstream.h b/gio/gmemoryoutputstream.h index 7ac64750..9e6f67e1 100644 --- a/gio/gmemoryoutputstream.h +++ b/gio/gmemoryoutputstream.h @@ -27,7 +27,6 @@ #ifndef __G_MEMORY_OUTPUT_STREAM_H__ #define __G_MEMORY_OUTPUT_STREAM_H__ -#include #include G_BEGIN_DECLS @@ -44,7 +43,6 @@ G_BEGIN_DECLS * * Implements #GOutputStream for arbitrary memory chunks. **/ -typedef struct _GMemoryOutputStream GMemoryOutputStream; typedef struct _GMemoryOutputStreamClass GMemoryOutputStreamClass; typedef struct _GMemoryOutputStreamPrivate GMemoryOutputStreamPrivate; diff --git a/gio/gmount.c b/gio/gmount.c index 5bef1b02..172ad3be 100644 --- a/gio/gmount.c +++ b/gio/gmount.c @@ -29,7 +29,9 @@ #include "gmount.h" #include "gmountprivate.h" +#include "gasyncresult.h" #include "gsimpleasyncresult.h" +#include "gioerror.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gmount.h b/gio/gmount.h index c2474d56..fe493447 100644 --- a/gio/gmount.h +++ b/gio/gmount.h @@ -28,8 +28,7 @@ #ifndef __G_MOUNT_H__ #define __G_MOUNT_H__ -#include -#include +#include G_BEGIN_DECLS @@ -38,21 +37,6 @@ G_BEGIN_DECLS #define G_IS_MOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_MOUNT)) #define G_MOUNT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_MOUNT, GMountIface)) -/* GMount typedef is in gfile.h due to include order issues */ -/** - * GVolume: - * - * Opaque mountable volume object. - **/ -typedef struct _GVolume GVolume; /* Dummy typedef */ - -/** - * GDrive: - * - * Opaque drive object. - **/ -typedef struct _GDrive GDrive; /* Dummy typedef */ - typedef struct _GMountIface GMountIface; /** diff --git a/gio/gmountoperation.h b/gio/gmountoperation.h index e9a9e446..03bfc91d 100644 --- a/gio/gmountoperation.h +++ b/gio/gmountoperation.h @@ -27,9 +27,7 @@ #ifndef __G_MOUNT_OPERATION_H__ #define __G_MOUNT_OPERATION_H__ -#include - -#include +#include G_BEGIN_DECLS @@ -46,7 +44,6 @@ G_BEGIN_DECLS * Class for providing authentication methods for mounting operations, * such as mounting a file locally, or authenticating with a server. **/ -typedef struct _GMountOperation GMountOperation; typedef struct _GMountOperationClass GMountOperationClass; typedef struct _GMountOperationPrivate GMountOperationPrivate; @@ -57,59 +54,6 @@ struct _GMountOperation GMountOperationPrivate *priv; }; -/** - * GAskPasswordFlags: - * @G_ASK_PASSWORD_NEED_PASSWORD: operation requires a password. - * @G_ASK_PASSWORD_NEED_USERNAME: operation requires a username. - * @G_ASK_PASSWORD_NEED_DOMAIN: operation requires a domain. - * @G_ASK_PASSWORD_SAVING_SUPPORTED: operation supports saving settings. - * @G_ASK_PASSWORD_ANONYMOUS_SUPPORTED: operation supports anonymous users. - * - * #GAskPasswordFlags are used to request specific information from the - * user, or to notify the user of their choices in an authentication - * situation. - * - **/ -typedef enum { - G_ASK_PASSWORD_NEED_PASSWORD = 1<<0, - G_ASK_PASSWORD_NEED_USERNAME = 1<<1, - G_ASK_PASSWORD_NEED_DOMAIN = 1<<2, - G_ASK_PASSWORD_SAVING_SUPPORTED = 1<<3, - G_ASK_PASSWORD_ANONYMOUS_SUPPORTED = 1<<4 -} GAskPasswordFlags; - -/** - * GPasswordSave: - * @G_PASSWORD_SAVE_NEVER: never save a password. - * @G_PASSWORD_SAVE_FOR_SESSION: save a password for the session. - * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently. - * - * #GPasswordSave is used to indicate the lifespan of a saved password. - * - * #Gvfs stores passwords in the Gnome keyring when this flag allows it - * to, and later retrieves it again from there. - **/ -typedef enum { - G_PASSWORD_SAVE_NEVER, - G_PASSWORD_SAVE_FOR_SESSION, - G_PASSWORD_SAVE_PERMANENTLY -} GPasswordSave; - -/** - * GMountOperationResult: - * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the user specified data is now availible - * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation to be aborted - * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not implemented) - * - * #GMountOperationResult is returned as a result when a request for information - * is send by the mounting operation. - **/ -typedef enum { - G_MOUNT_OPERATION_HANDLED, - G_MOUNT_OPERATION_ABORTED, - G_MOUNT_OPERATION_UNHANDLED -} GMountOperationResult; - struct _GMountOperationClass { GObjectClass parent_class; diff --git a/gio/gnativevolumemonitor.h b/gio/gnativevolumemonitor.h index 3face1b2..d6a91055 100644 --- a/gio/gnativevolumemonitor.h +++ b/gio/gnativevolumemonitor.h @@ -1,7 +1,6 @@ #ifndef __G_NATIVE_VOLUME_MONITOR_H__ #define __G_NATIVE_VOLUME_MONITOR_H__ -#include #include G_BEGIN_DECLS @@ -14,7 +13,7 @@ G_BEGIN_DECLS #define G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME "gio-native-volume-monitor" -typedef struct _GNativeVolumeMonitor GNativeVolumeMonitor; +typedef struct _GNativeVolumeMonitor GNativeVolumeMonitor; typedef struct _GNativeVolumeMonitorClass GNativeVolumeMonitorClass; struct _GNativeVolumeMonitor { diff --git a/gio/goutputstream.c b/gio/goutputstream.c index 39aeb738..42c55314 100644 --- a/gio/goutputstream.c +++ b/gio/goutputstream.c @@ -22,7 +22,11 @@ #include "config.h" #include "goutputstream.h" +#include "gcancellable.h" +#include "gasyncresult.h" #include "gsimpleasyncresult.h" +#include "ginputstream.h" +#include "gioerror.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/goutputstream.h b/gio/goutputstream.h index 263e6e6d..a4b9ef18 100644 --- a/gio/goutputstream.h +++ b/gio/goutputstream.h @@ -27,11 +27,7 @@ #ifndef __G_OUTPUT_STREAM_H__ #define __G_OUTPUT_STREAM_H__ -#include -#include -#include -#include -#include +#include G_BEGIN_DECLS @@ -42,20 +38,6 @@ G_BEGIN_DECLS #define G_IS_OUTPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_OUTPUT_STREAM)) #define G_OUTPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_OUTPUT_STREAM, GOutputStreamClass)) -/** - * GOutputStreamSpliceFlags: - * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream. - * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after the splice. - * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after the splice. - * - * GOutputStreamSpliceFlags determine how streams should be spliced. - **/ -typedef enum { - G_OUTPUT_STREAM_SPLICE_NONE = 0, - G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE = 1 << 0, - G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET = 1 << 1 -} GOutputStreamSpliceFlags; - /** * GOutputStream: * @@ -65,7 +47,6 @@ typedef enum { * writing, splicing, flushing and closing streams, but may implement * asynchronous versions. **/ -typedef struct _GOutputStream GOutputStream; typedef struct _GOutputStreamClass GOutputStreamClass; typedef struct _GOutputStreamPrivate GOutputStreamPrivate; diff --git a/gio/gpollfilemonitor.c b/gio/gpollfilemonitor.c index 0568bfab..51d04efc 100644 --- a/gio/gpollfilemonitor.c +++ b/gio/gpollfilemonitor.c @@ -24,7 +24,9 @@ #include #include "gpollfilemonitor.h" +#include "gfile.h" #include "gfilemonitor.h" +#include "gfileinfo.h" #include "gioalias.h" diff --git a/gio/gpollfilemonitor.h b/gio/gpollfilemonitor.h index a7f59c2c..7ab65b14 100644 --- a/gio/gpollfilemonitor.h +++ b/gio/gpollfilemonitor.h @@ -23,7 +23,6 @@ #ifndef __G_POLL_FILE_MONITOR_H__ #define __G_POLL_FILE_MONITOR_H__ -#include #include G_BEGIN_DECLS diff --git a/gio/gseekable.h b/gio/gseekable.h index 78b8998c..6322e27a 100644 --- a/gio/gseekable.h +++ b/gio/gseekable.h @@ -27,8 +27,7 @@ #ifndef __G_SEEKABLE_H__ #define __G_SEEKABLE_H__ -#include -#include +#include G_BEGIN_DECLS @@ -42,7 +41,6 @@ G_BEGIN_DECLS * * Seek object for streaming operations. **/ -typedef struct _GSeekable GSeekable; typedef struct _GSeekableIface GSeekableIface; /** diff --git a/gio/gsimpleasyncresult.c b/gio/gsimpleasyncresult.c index 27f2d91c..5ec3a270 100644 --- a/gio/gsimpleasyncresult.c +++ b/gio/gsimpleasyncresult.c @@ -32,6 +32,8 @@ #endif #include "gsimpleasyncresult.h" +#include "gasyncresult.h" +#include "gcancellable.h" #include "gioscheduler.h" #include #include "glibintl.h" diff --git a/gio/gsimpleasyncresult.h b/gio/gsimpleasyncresult.h index f2f9b36d..815d76da 100644 --- a/gio/gsimpleasyncresult.h +++ b/gio/gsimpleasyncresult.h @@ -27,8 +27,7 @@ #ifndef __G_SIMPLE_ASYNC_RESULT_H__ #define __G_SIMPLE_ASYNC_RESULT_H__ -#include -#include +#include G_BEGIN_DECLS @@ -44,22 +43,8 @@ G_BEGIN_DECLS * * A simple implementation of #GAsyncResult. **/ -typedef struct _GSimpleAsyncResult GSimpleAsyncResult; typedef struct _GSimpleAsyncResultClass GSimpleAsyncResultClass; -/** - * GSimpleAsyncThreadFunc: - * @res: a #GSimpleAsyncResult. - * @object: a #GObject. - * @cancellable: optional #GCancellable object, %NULL to ignore. - * - * Simple thread function that runs an asynchronous operation and - * checks for cancellation. - **/ -typedef void (*GSimpleAsyncThreadFunc) (GSimpleAsyncResult *res, - GObject *object, - GCancellable *cancellable); - GType g_simple_async_result_get_type (void) G_GNUC_CONST; diff --git a/gio/gthemedicon.c b/gio/gthemedicon.c index e468a735..5fbb9e6a 100644 --- a/gio/gthemedicon.c +++ b/gio/gthemedicon.c @@ -25,6 +25,7 @@ #include #include "gthemedicon.h" +#include "gicon.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gthemedicon.h b/gio/gthemedicon.h index b2b82acf..897eeea5 100644 --- a/gio/gthemedicon.h +++ b/gio/gthemedicon.h @@ -27,7 +27,7 @@ #ifndef __G_THEMED_ICON_H__ #define __G_THEMED_ICON_H__ -#include +#include G_BEGIN_DECLS @@ -43,7 +43,6 @@ G_BEGIN_DECLS * * An implementation of #GIcon for themed icons. **/ -typedef struct _GThemedIcon GThemedIcon; typedef struct _GThemedIconClass GThemedIconClass; GType g_themed_icon_get_type (void) G_GNUC_CONST; diff --git a/gio/gunionvolumemonitor.h b/gio/gunionvolumemonitor.h index fc9f4af9..5c092e3b 100644 --- a/gio/gunionvolumemonitor.h +++ b/gio/gunionvolumemonitor.h @@ -24,7 +24,6 @@ #ifndef __G_UNION_VOLUME_MONITOR_H__ #define __G_UNION_VOLUME_MONITOR_H__ -#include #include G_BEGIN_DECLS @@ -35,12 +34,11 @@ G_BEGIN_DECLS #define G_IS_UNION_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNION_VOLUME_MONITOR)) #define G_IS_UNION_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNION_VOLUME_MONITOR)) -typedef struct _GUnionVolumeMonitor GUnionVolumeMonitor; +typedef struct _GUnionVolumeMonitor GUnionVolumeMonitor; typedef struct _GUnionVolumeMonitorClass GUnionVolumeMonitorClass; struct _GUnionVolumeMonitorClass { GVolumeMonitorClass parent_class; - }; GType _g_union_volume_monitor_get_type (void) G_GNUC_CONST; diff --git a/gio/gunixmount.c b/gio/gunixmount.c index ef66841f..4f2027c3 100644 --- a/gio/gunixmount.c +++ b/gio/gunixmount.c @@ -32,11 +32,15 @@ #include #include "gunixvolumemonitor.h" #include "gunixmount.h" +#include "gunixmounts.h" #include "gunixvolume.h" #include "gmountprivate.h" +#include "gmount.h" +#include "gfile.h" #include "gvolumemonitor.h" #include "gthemedicon.h" #include "gsimpleasyncresult.h" +#include "gioerror.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gunixmount.h b/gio/gunixmount.h index cafae799..55841af2 100644 --- a/gio/gunixmount.h +++ b/gio/gunixmount.h @@ -24,10 +24,9 @@ #ifndef __G_UNIX_MOUNT_H__ #define __G_UNIX_MOUNT_H__ -#include -#include -#include -#include +#include + +#include "gunixmounts.h" G_BEGIN_DECLS diff --git a/gio/gunixmounts.h b/gio/gunixmounts.h index e5ca86bb..5c7d6a0f 100644 --- a/gio/gunixmounts.h +++ b/gio/gunixmounts.h @@ -48,7 +48,7 @@ typedef struct _GUnixMountPoint GUnixMountPoint; * * Watches #GUnixMounts for changes. **/ -typedef struct _GUnixMountMonitor GUnixMountMonitor; +typedef struct _GUnixMountMonitor GUnixMountMonitor; typedef struct _GUnixMountMonitorClass GUnixMountMonitorClass; #define G_TYPE_UNIX_MOUNT_MONITOR (g_unix_mount_monitor_get_type ()) diff --git a/gio/gunixvolume.c b/gio/gunixvolume.c index d02ca2f5..f03d4a6c 100644 --- a/gio/gunixvolume.c +++ b/gio/gunixvolume.c @@ -32,9 +32,12 @@ #include #include "gunixvolume.h" #include "gunixmount.h" +#include "gunixmounts.h" #include "gthemedicon.h" +#include "gvolume.h" #include "gvolumemonitor.h" #include "gsimpleasyncresult.h" +#include "gioerror.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gunixvolume.h b/gio/gunixvolume.h index 8e6e2254..29d3db35 100644 --- a/gio/gunixvolume.h +++ b/gio/gunixvolume.h @@ -24,10 +24,9 @@ #ifndef __G_UNIX_VOLUME_H__ #define __G_UNIX_VOLUME_H__ -#include -#include -#include +#include #include +#include G_BEGIN_DECLS diff --git a/gio/gunixvolumemonitor.c b/gio/gunixvolumemonitor.c index 00dd79bc..d617f8d0 100644 --- a/gio/gunixvolumemonitor.c +++ b/gio/gunixvolumemonitor.c @@ -32,7 +32,9 @@ #include "gunixmounts.h" #include "gunixmount.h" #include "gunixvolume.h" +#include "gmount.h" #include "gmountprivate.h" +#include "giomodule.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gunixvolumemonitor.h b/gio/gunixvolumemonitor.h index 6aed8a46..3eaab8e2 100644 --- a/gio/gunixvolumemonitor.h +++ b/gio/gunixvolumemonitor.h @@ -24,7 +24,6 @@ #ifndef __G_UNIX_VOLUME_MONITOR_H__ #define __G_UNIX_VOLUME_MONITOR_H__ -#include #include G_BEGIN_DECLS @@ -35,7 +34,7 @@ G_BEGIN_DECLS #define G_IS_UNIX_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_UNIX_VOLUME_MONITOR)) #define G_IS_UNIX_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_UNIX_VOLUME_MONITOR)) -typedef struct _GUnixVolumeMonitor GUnixVolumeMonitor; +typedef struct _GUnixVolumeMonitor GUnixVolumeMonitor; typedef struct _GUnixVolumeMonitorClass GUnixVolumeMonitorClass; /* Forward definitions */ diff --git a/gio/gvfs.h b/gio/gvfs.h index 9b8581ff..90e533c1 100644 --- a/gio/gvfs.h +++ b/gio/gvfs.h @@ -27,8 +27,7 @@ #ifndef __G_VFS_H__ #define __G_VFS_H__ -#include -#include +#include G_BEGIN_DECLS @@ -52,7 +51,6 @@ G_BEGIN_DECLS * * Virtual File System object. **/ -typedef struct _GVfs GVfs; /* Dummy typedef */ typedef struct _GVfsClass GVfsClass; struct _GVfs { diff --git a/gio/gvolume.c b/gio/gvolume.c index d34bcfca..70005828 100644 --- a/gio/gvolume.c +++ b/gio/gvolume.c @@ -24,7 +24,9 @@ #include "config.h" #include "gmount.h" #include "gvolume.h" +#include "gasyncresult.h" #include "gsimpleasyncresult.h" +#include "gioerror.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gvolume.h b/gio/gvolume.h index f1ec0f5f..72a74e14 100644 --- a/gio/gvolume.h +++ b/gio/gvolume.h @@ -28,9 +28,7 @@ #ifndef __G_VOLUME_H__ #define __G_VOLUME_H__ -#include -#include -#include +#include G_BEGIN_DECLS diff --git a/gio/gvolumemonitor.c b/gio/gvolumemonitor.c index 3ee6f1f7..8b9560e7 100644 --- a/gio/gvolumemonitor.c +++ b/gio/gvolumemonitor.c @@ -25,6 +25,9 @@ #include "config.h" #include "gvolumemonitor.h" +#include "gvolume.h" +#include "gmount.h" +#include "gdrive.h" #include "glibintl.h" #include "gioalias.h" diff --git a/gio/gvolumemonitor.h b/gio/gvolumemonitor.h index 9d32ceab..6bf73491 100644 --- a/gio/gvolumemonitor.h +++ b/gio/gvolumemonitor.h @@ -30,10 +30,7 @@ #ifndef __G_VOLUME_MONITOR_H__ #define __G_VOLUME_MONITOR_H__ -#include -#include -#include -#include +#include G_BEGIN_DECLS @@ -58,7 +55,6 @@ G_BEGIN_DECLS * * A Volume Monitor that watches for volume events. **/ -typedef struct _GVolumeMonitor GVolumeMonitor; typedef struct _GVolumeMonitorClass GVolumeMonitorClass; struct _GVolumeMonitor { diff --git a/gio/gwin32appinfo.h b/gio/gwin32appinfo.h index cfec62f1..62af8b76 100644 --- a/gio/gwin32appinfo.h +++ b/gio/gwin32appinfo.h @@ -23,7 +23,7 @@ #ifndef __G_WIN32_APP_INFO_H__ #define __G_WIN32_APP_INFO_H__ -#include +#include G_BEGIN_DECLS diff --git a/gio/gwin32mount.h b/gio/gwin32mount.h index 9bf3808b..59b97e64 100644 --- a/gio/gwin32mount.h +++ b/gio/gwin32mount.h @@ -26,9 +26,7 @@ #ifndef __G_WIN32_MOUNT_H__ #define __G_WIN32_MOUNT_H__ -#include -#include -#include +#include G_BEGIN_DECLS diff --git a/gio/gwin32volumemonitor.h b/gio/gwin32volumemonitor.h index 8f6da38b..6de4f75b 100644 --- a/gio/gwin32volumemonitor.h +++ b/gio/gwin32volumemonitor.h @@ -26,7 +26,6 @@ #ifndef __G_WIN32_VOLUME_MONITOR_H__ #define __G_WIN32_VOLUME_MONITOR_H__ -#include #include G_BEGIN_DECLS @@ -63,70 +62,4 @@ GWin32Volume * _g_win32_volume_monitor_lookup_volume_for_mount_path (GWin32Vo G_END_DECLS -#endif /* __G_WIN32_VOLUME_MONITOR_H__ */ -/* GIO - GLib Input, Output and Streaming Library - * - * Copyright (C) 2006-2007 Red Hat, Inc. - * Copyright (C) 2008 Hans Breuer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General - * Public License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Alexander Larsson - * David Zeuthen - * Hans Breuer - */ - -#ifndef __G_WIN32_VOLUME_MONITOR_H__ -#define __G_WIN32_VOLUME_MONITOR_H__ - -#include -#include - -G_BEGIN_DECLS - -#define G_TYPE_WIN32_VOLUME_MONITOR (_g_win32_volume_monitor_get_type ()) -#define G_WIN32_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_WIN32_VOLUME_MONITOR, GWin32VolumeMonitor)) -#define G_WIN32_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_WIN32_VOLUME_MONITOR, GWin32VolumeMonitorClass)) -#define G_IS_WIN32_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_WIN32_VOLUME_MONITOR)) -#define G_IS_WIN32_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_WIN32_VOLUME_MONITOR)) - -typedef struct _GWin32VolumeMonitor GWin32VolumeMonitor; -typedef struct _GWin32VolumeMonitorClass GWin32VolumeMonitorClass; - -/* Forward definitions */ - -/** - * GWin32Mount: - * - * Implementation of the #GMount interface for Win32 systems. - */ -typedef struct _GWin32Mount GWin32Mount; -typedef struct _GWin32Volume GWin32Volume; - -struct _GWin32VolumeMonitorClass { - GNativeVolumeMonitorClass parent_class; - -}; - -GType _g_win32_volume_monitor_get_type (void) G_GNUC_CONST; - -GVolumeMonitor * _g_win32_volume_monitor_new (void); -GWin32Volume * _g_win32_volume_monitor_lookup_volume_for_mount_path (GWin32VolumeMonitor *monitor, - const char *mount_path); - -G_END_DECLS - -#endif /* __G_WIN32_VOLUME_MONITOR_H__ */ +#endif diff --git a/gio/inotify/inotify-helper.c b/gio/inotify/inotify-helper.c index 39f2feb8..0042e7e8 100644 --- a/gio/inotify/inotify-helper.c +++ b/gio/inotify/inotify-helper.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "inotify-helper.h" #include "inotify-missing.h" #include "inotify-path.h" diff --git a/gio/tests/live-g-file.c b/gio/tests/live-g-file.c index 3095db59..65245896 100644 --- a/gio/tests/live-g-file.c +++ b/gio/tests/live-g-file.c @@ -24,7 +24,7 @@ #include #include #include - +#include #define DEFAULT_TEST_DIR "testdir_live-g-file" -- 2.34.1