Moved all relevant typedefs into these files.
authorCody Russell <bratsche@gnome.org>
Tue, 1 Jul 2008 06:32:35 +0000 (06:32 +0000)
committerCody Russell <bratsche@src.gnome.org>
Tue, 1 Jul 2008 06:32:35 +0000 (06:32 +0000)
2008-07-01  Cody Russell  <bratsche@gnome.org>

        * 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

97 files changed:
ChangeLog
gio/Makefile.am
gio/gappinfo.h
gio/gasynchelper.h
gio/gasyncresult.h
gio/gbufferedinputstream.c
gio/gbufferedinputstream.h
gio/gbufferedoutputstream.h
gio/gcancellable.h
gio/gcontenttype.h
gio/gdatainputstream.c
gio/gdatainputstream.h
gio/gdataoutputstream.h
gio/gdesktopappinfo.c
gio/gdrive.c
gio/gdrive.h
gio/gdummyfile.c
gio/gdummyfile.h
gio/gfile.c
gio/gfile.h
gio/gfileattribute.h
gio/gfileenumerator.c
gio/gfileenumerator.h
gio/gfileicon.c
gio/gfileicon.h
gio/gfileinfo.c
gio/gfileinfo.h
gio/gfileinputstream.c
gio/gfileinputstream.h
gio/gfilemonitor.c
gio/gfilemonitor.h
gio/gfilenamecompleter.c
gio/gfilenamecompleter.h
gio/gfileoutputstream.c
gio/gfileoutputstream.h
gio/gfilterinputstream.h
gio/gfilteroutputstream.h
gio/gicon.h
gio/ginputstream.c
gio/ginputstream.h
gio/gio.h
gio/gioenums.h [new file with mode: 0644]
gio/gioerror.h
gio/giomodule.h
gio/gioscheduler.c
gio/gioscheduler.h
gio/giotypes.h [new file with mode: 0644]
gio/gloadableicon.c
gio/gloadableicon.h
gio/glocaldirectorymonitor.c
gio/glocaldirectorymonitor.h
gio/glocalfile.c
gio/glocalfile.h
gio/glocalfileenumerator.c
gio/glocalfileenumerator.h
gio/glocalfileinputstream.c
gio/glocalfilemonitor.c
gio/glocalfilemonitor.h
gio/glocalfileoutputstream.c
gio/glocalfileoutputstream.h
gio/glocalvfs.c
gio/glocalvfs.h
gio/gmemoryinputstream.c
gio/gmemoryinputstream.h
gio/gmemoryoutputstream.c
gio/gmemoryoutputstream.h
gio/gmount.c
gio/gmount.h
gio/gmountoperation.h
gio/gnativevolumemonitor.h
gio/goutputstream.c
gio/goutputstream.h
gio/gpollfilemonitor.c
gio/gpollfilemonitor.h
gio/gseekable.h
gio/gsimpleasyncresult.c
gio/gsimpleasyncresult.h
gio/gthemedicon.c
gio/gthemedicon.h
gio/gunionvolumemonitor.h
gio/gunixmount.c
gio/gunixmount.h
gio/gunixmounts.h
gio/gunixvolume.c
gio/gunixvolume.h
gio/gunixvolumemonitor.c
gio/gunixvolumemonitor.h
gio/gvfs.h
gio/gvolume.c
gio/gvolume.h
gio/gvolumemonitor.c
gio/gvolumemonitor.h
gio/gwin32appinfo.h
gio/gwin32mount.h
gio/gwin32volumemonitor.h
gio/inotify/inotify-helper.c
gio/tests/live-g-file.c

index b5bc37e77d48763b2f22f4a5b53583862ede5e4f..34a841fab518224ecba54202b09d4e4a03d10225 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-07-01  Cody Russell  <bratsche@gnome.org>
+
+       * 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  <mclasen@redhat.com>
 
        * glib/pcre/pcre_compile.c: Apply fix for CVE-2008-2371 to
index f667d5d1c889378efcda6ab48946c93fadcbc8d6..ced7571d3841c41279a386fc1b63aafbf30045dc 100644 (file)
@@ -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          \
index d0fddf75b48f09e9c9a44315c513b1ff4c98e37e..eef3ab21bca029aee8d106a526b561b481239797 100644 (file)
@@ -27,8 +27,7 @@
 #ifndef __G_APP_INFO_H__
 #define __G_APP_INFO_H__
 
-#include <glib-object.h>
-#include <gio/gicon.h>
+#include <gio/giotypes.h>
 
 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:
index 0f57a4093a80a56d035ffcfa962edfbbc806cf29..891adb4fc8c0ff9e394bf3df29c2b0ae2e3998a0 100644 (file)
@@ -23,8 +23,7 @@
 #ifndef __G_ASYNC_HELPER_H__
 #define __G_ASYNC_HELPER_H__
 
-#include <glib-object.h>
-#include "gcancellable.h"
+#include <gio/gio.h>
 
 G_BEGIN_DECLS
 
index 640d611189dae9106384c42c7a7e40b28d47e7d8..1066a29de0681a9be05b097d0ffa4d0f39186e6e 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __G_ASYNC_RESULT_H__
 #define __G_ASYNC_RESULT_H__
 
-#include <glib-object.h>
+#include <gio/giotypes.h>
 
 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:
index 1c27b87f1a03e44c023822ec60ba6b98304f48b8..040ce3b38408464124d3be635606b8642dac3b39 100644 (file)
 #include "config.h"
 #include "gbufferedinputstream.h"
 #include "ginputstream.h"
+#include "gcancellable.h"
+#include "gasyncresult.h"
 #include "gsimpleasyncresult.h"
+#include "gioerror.h"
 #include <string.h>
 #include "glibintl.h"
 
index 3eea4f9bf6ae8dc181da7b234af62a35a3bd4af2..039093faf549f1f55459bed1b82c9416040f24b1 100644 (file)
@@ -27,7 +27,6 @@
 #ifndef __G_BUFFERED_INPUT_STREAM_H__
 #define __G_BUFFERED_INPUT_STREAM_H__
 
-#include <glib-object.h>
 #include <gio/gfilterinputstream.h>
 
 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;
 
index 5adce9e1fb66b27e4fb4ded5154b9d989e288a40..492259d3cfc8c8e9c3266a897f4b6b1d5614e936 100644 (file)
@@ -27,7 +27,6 @@
 #ifndef __G_BUFFERED_OUTPUT_STREAM_H__
 #define __G_BUFFERED_OUTPUT_STREAM_H__
 
-#include <glib-object.h>
 #include <gio/gfilteroutputstream.h>
 
 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;
 
index 7c890be9c2d079de785a9982b41b3b8f43b5b94d..11440797f035c3b0ec9133b9ea1566b7ca7be97b 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __G_CANCELLABLE_H__
 #define __G_CANCELLABLE_H__
 
-#include <glib-object.h>
+#include <gio/giotypes.h>
 
 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
index df03fa817c6d469da440705c7b8bcf4c77dfe5ea..58f9693669d9daeeacd753e086b695aed08e79cb 100644 (file)
@@ -28,7 +28,7 @@
 #define __G_CONTENT_TYPE_H__
 
 #include <glib.h>
-#include <gio/gicon.h>
+#include <gio/giotypes.h>
 
 G_BEGIN_DECLS
 
index fa511bcf83828d2c2d7d4ee988ce8b44253f45ef..0bf716f84ef99e5b6b329cde1aa74ffec958fd11 100644 (file)
@@ -24,6 +24,7 @@
 #include "config.h"
 #include "gdatainputstream.h"
 #include "gioenumtypes.h"
+#include "gioerror.h"
 #include "glibintl.h"
 
 #include "gioalias.h"
index 0ecd14f5b6e9045e70f0ce83fb61c19830145b4e..4025454a14bbc9ac2fd098c00574dab4e6f29ee8 100644 (file)
@@ -27,7 +27,6 @@
 #ifndef __G_DATA_INPUT_STREAM_H__
 #define __G_DATA_INPUT_STREAM_H__
 
-#include <glib-object.h>
 #include <gio/gbufferedinputstream.h>
 
 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);
 
index 7a4e405574ebd3d2b8e927cce1c2b9dda8d11ee5..3d7c4182ad6a25ba8aa0670e6ec0806f5d70f010 100644 (file)
@@ -27,9 +27,7 @@
 #ifndef __G_DATA_OUTPUT_STREAM_H__
 #define __G_DATA_OUTPUT_STREAM_H__
 
-#include <glib-object.h>
 #include <gio/gfilteroutputstream.h>
-#include <gio/gdatainputstream.h>
 
 G_BEGIN_DECLS
 
index f76dc03eb8ab5b728c9122dea2bce494384bfc4c..3ca79f46dbcda352738d76c8b5099fa48fb2c1af 100644 (file)
 
 #include "gcontenttypeprivate.h"
 #include "gdesktopappinfo.h"
+#include "gfile.h"
 #include "gioerror.h"
 #include "gthemedicon.h"
 #include "gfileicon.h"
 #include <glib/gstdio.h>
 #include "glibintl.h"
 #include "giomodule-priv.h"
+#include "gappinfo.h"
 
 #include "gioalias.h"
 
index bfdbee1ac19e3422889f8b91f2dea18794e7116a..9d912042e6784e02b95771474acb6603a8a91bbf 100644 (file)
@@ -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"
index 26671b918e648b3171f5b888c3ca3132ec157916..ed9bfac0d873d3ecffbda40ccf49f449eb987bc8 100644 (file)
 #ifndef __G_DRIVE_H__
 #define __G_DRIVE_H__
 
-#include <glib-object.h>
-#include <gio/gmount.h>
-#include <gio/gvolume.h>
-#include <gio/gmountoperation.h>
+#include <gio/giotypes.h>
 
 G_BEGIN_DECLS
 
index afcd9317703a69bb706e4747b2e5e4110a1daf90..6a5883fa3d4399bf08ced5ea28597a4b0698aae4 100644 (file)
@@ -33,6 +33,7 @@
 #include <stdlib.h>
 
 #include "gdummyfile.h"
+#include "gfile.h"
 
 #include "gioalias.h"
 
index eb69d9280eb1fb1226a0afd21d4aa0a8f82b2d97..1f8bd13247921912b1a1583fd6b625a6c518ed70 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef __G_DUMMY_FILE_H__
 #define __G_DUMMY_FILE_H__
 
-#include <gio/gfile.h>
+#include <gio/gio.h>
 
 G_BEGIN_DECLS
 
index 4194f6c60671f54f1c54ad2d77bcce894e9f6ae0..da793d0bb2f507a4af701cb462fffd7ba9efa0e6 100644 (file)
 #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"
index 711b01a5140eeafb1520df71483c81725e1753bc..9bb5b446529948b2b5de78866f6c08c528e65619 100644 (file)
 #ifndef __G_FILE_H__
 #define __G_FILE_H__
 
-#include <glib-object.h>
-#include <gio/gfileinfo.h>
-#include <gio/gfileenumerator.h>
-#include <gio/gfileinputstream.h>
-#include <gio/gfileoutputstream.h>
-#include <gio/gmountoperation.h>
-#include <gio/gappinfo.h>
+#include <gio/giotypes.h>
 
 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:
index 758fe9b66d77662458fbd3840885697c88860986..d574b41c1bb125dee3ffc346524e854f3c2fa600 100644 (file)
 #ifndef __G_FILE_ATTRIBUTE_H__
 #define __G_FILE_ATTRIBUTE_H__
 
-#include <glib-object.h>
+#include <gio/giotypes.h>
 
 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 #GFileAttributeInfo<!-- -->s.
  **/
-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);
index bb8fd8f97dacac95017902d3b311e93c17a73a36..07acc60c10dec42073bb1ae66cce55a3a3d751f0 100644 (file)
 
 #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"
index af030c1ebf0bcbbf73a743577d83a76d4d8a7f51..7634d6bba2e23cfd3f32d32cecdbb511aedc21f2 100644 (file)
 #ifndef __G_FILE_ENUMERATOR_H__
 #define __G_FILE_ENUMERATOR_H__
 
-#include <glib-object.h>
-#include <gio/gioerror.h>
-#include <gio/gcancellable.h>
-#include <gio/gfileinfo.h>
-#include <gio/gasyncresult.h>
+#include <gio/giotypes.h>
 
 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;
index cf4e925294187eb45e66effbdbbec05944a14c19..0bd3a52466545c3f63ab6d91f7245d999ff80364 100644 (file)
 #include "config.h"
 
 #include "gfileicon.h"
+#include "gfile.h"
+#include "gicon.h"
+#include "gloadableicon.h"
+#include "ginputstream.h"
 #include "gsimpleasyncresult.h"
 
 #include "gioalias.h"
index 18d73d0d03b67852fac3c27ce711a0a0ebbe721b..58b04719bb2bed11a6a065bd1a513b16d64ac539 100644 (file)
@@ -27,8 +27,7 @@
 #ifndef __G_FILE_ICON_H__
 #define __G_FILE_ICON_H__
 
-#include <gio/gloadableicon.h>
-#include <gio/gfile.h>
+#include <gio/giotypes.h>
 
 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;
index b626915203c3d706eb449176d4694f5736c2c060..7fe6b64aa9fc16cf1b4658b0ff768ced4b7ca20a 100644 (file)
@@ -58,6 +58,7 @@
 
 #include "gfileinfo.h"
 #include "gfileattribute-priv.h"
+#include "gicon.h"
 #include "glibintl.h"
 
 #include "gioalias.h"
index 7743c16527653462f57c40cc87d05efa5f95937a..60ccfa8922176e564e1f391ce5894c01701fa49e 100644 (file)
@@ -27,9 +27,7 @@
 #ifndef __G_FILE_INFO_H__
 #define __G_FILE_INFO_H__
 
-#include <glib-object.h>
-#include <gio/gfileattribute.h>
-#include <gio/gicon.h>
+#include <gio/giotypes.h>
 
 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:  */
 /**
index d68b684d93aa3dab2500f464f202cb7f314190f9..c3afd00548facf9ab0329f577d3ab6d3e9607c6c 100644 (file)
@@ -26,6 +26,9 @@
 #include <gfileinputstream.h>
 #include <gseekable.h>
 #include "gsimpleasyncresult.h"
+#include "gcancellable.h"
+#include "gasyncresult.h"
+#include "gioerror.h"
 #include "glibintl.h"
 
 #include "gioalias.h"
index 1abc46eb87c0eff07f2df9c29d899c2ba95776f2..3b204317bee86bce960904651b6a860cf055b7eb 100644 (file)
@@ -28,7 +28,6 @@
 #define __G_FILE_INPUT_STREAM_H__
 
 #include <gio/ginputstream.h>
-#include <gio/gfileinfo.h>
 
 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;
 
index ec2fe463e4d7074094db5902aee57d6cafb59e62..4e52932200d1abf5da0d86dbbaa323a469c3e216 100644 (file)
@@ -26,6 +26,7 @@
 #include "gfilemonitor.h"
 #include "gio-marshal.h"
 #include "gioenumtypes.h"
+#include "gfile.h"
 #include "gvfs.h"
 #include "glibintl.h"
 
index dfc3e26d7aad07b67a0ec69d85d5d590c07450d5..da7bed34525692052011c8603191c2edd310ef15 100644 (file)
@@ -27,8 +27,7 @@
 #ifndef __G_FILE_MONITOR_H__
 #define __G_FILE_MONITOR_H__
 
-#include <glib-object.h>
-#include <gio/gfile.h>
+#include <gio/giotypes.h>
 
 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;
 
 /**
index 217740761e1869774f9b577113367ad6f9e9aaaf..4c38fd8bab8905f1238ef17a83328dc6be682bde 100644 (file)
 
 #include "config.h"
 #include "gfilenamecompleter.h"
+#include "gfileenumerator.h"
+#include "gfileattribute.h"
 #include "gfile.h"
+#include "gfileinfo.h"
+#include "gcancellable.h"
 #include <string.h>
 #include "glibintl.h"
 
index c7fd38356a5ec3cdd1635f506f45610dac2e966d..c294574d9c8f5cf47b63093d0d82be5ce1cde122 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __G_FILENAME_COMPLETER_H__
 #define __G_FILENAME_COMPLETER_H__
 
-#include <glib-object.h>
+#include <gio/giotypes.h>
 
 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 {
index ee1cd78b1f54c2b1fa81addd2f58f41987051560..7dea32cd122a5f93c24a42b1d1936762bbf33644 100644 (file)
@@ -26,6 +26,9 @@
 #include <gfileoutputstream.h>
 #include <gseekable.h>
 #include "gsimpleasyncresult.h"
+#include "gasyncresult.h"
+#include "gcancellable.h"
+#include "gioerror.h"
 #include "glibintl.h"
 
 #include "gioalias.h"
index aebb3c24068326b1765e60a88600a5d15deb09cd..a3fe4441db09a7373c3586a0e5d2340c19ed5158 100644 (file)
@@ -28,7 +28,6 @@
 #define __G_FILE_OUTPUT_STREAM_H__
 
 #include <gio/goutputstream.h>
-#include <gio/gfileinfo.h>
 
 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;
 
index ee6d915253fdc9a0cf8cfc3cdd353706854d685e..01b066cd256345372885b8e475207d6ca9cf6a8c 100644 (file)
@@ -27,7 +27,6 @@
 #ifndef __G_FILTER_INPUT_STREAM_H__
 #define __G_FILTER_INPUT_STREAM_H__
 
-#include <glib-object.h>
 #include <gio/ginputstream.h>
 
 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;
 
index ba2d968e700d029c1195117d80d04dbe29f75b7e..be8bc451da452af3ddf1207c6fbe87d4dc643c4b 100644 (file)
@@ -27,7 +27,6 @@
 #ifndef __G_FILTER_OUTPUT_STREAM_H__
 #define __G_FILTER_OUTPUT_STREAM_H__
 
-#include <glib-object.h>
 #include <gio/goutputstream.h>
 
 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;
 
index dd028899a37e2137ee4621b0814d9ac23ec598dd..7b7344e73ff87a63d3f942c5bb8a4528fb7b2245 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __G_ICON_H__
 #define __G_ICON_H__
 
-#include <glib-object.h>
+#include <gio/giotypes.h>
 
 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;
 
 /**
index 44ddc48f85fbca38c7232209981551af675806b4..740de34eb4636240535f051c99d2b27ebb7d1ada 100644 (file)
 
 #include "ginputstream.h"
 #include "gseekable.h"
+#include "gcancellable.h"
+#include "gasyncresult.h"
 #include "gsimpleasyncresult.h"
+#include "gioerror.h"
 
 #include "gioalias.h"
 
index 3759fec776f9320731f404adbeaaee152fce4398..0257e3d57d0db06a383b398826b4041154eb7c8f 100644 (file)
 #ifndef __G_INPUT_STREAM_H__
 #define __G_INPUT_STREAM_H__
 
-#include <glib-object.h>
-#include <gio/gioerror.h>
-#include <gio/gcancellable.h>
-#include <gio/gasyncresult.h>
+#include <gio/giotypes.h>
 
 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;
 
index a81e17fed4fffe65d3998ba886532710fd06af84..bc2daee506e5503479b426f2aa841365b28b1ad5 100644 (file)
--- a/gio/gio.h
+++ b/gio/gio.h
 
 #define __GIO_GIO_H_INSIDE__
 
-#include <gio/gvfs.h>
-#include <gio/gfile.h>
-#include <gio/gvolumemonitor.h>
-#include <gio/gcontenttype.h>
+#include <gio/giotypes.h>
+
 #include <gio/gappinfo.h>
-#include <gio/gicon.h>
-#include <gio/gfileicon.h>
-#include <gio/gloadableicon.h>
-#include <gio/gthemedicon.h>
-#include <gio/gseekable.h>
-#include <gio/gfilemonitor.h>
+#include <gio/gasyncresult.h>
 #include <gio/gbufferedinputstream.h>
 #include <gio/gbufferedoutputstream.h>
+#include <gio/gcancellable.h>
+#include <gio/gcontenttype.h>
 #include <gio/gdatainputstream.h>
 #include <gio/gdataoutputstream.h>
+#include <gio/gdrive.h>
+#include <gio/gfile.h>
+#include <gio/gfileattribute.h>
+#include <gio/gfileenumerator.h>
+#include <gio/gfileicon.h>
+#include <gio/gfileinfo.h>
+#include <gio/gfileinputstream.h>
+#include <gio/gfilemonitor.h>
 #include <gio/gfilenamecompleter.h>
+#include <gio/gfileoutputstream.h>
 #include <gio/gfilterinputstream.h>
 #include <gio/gfilteroutputstream.h>
+#include <gio/gicon.h>
+#include <gio/ginputstream.h>
+#include <gio/gioenumtypes.h>
+#include <gio/gioerror.h>
 #include <gio/giomodule.h>
 #include <gio/gioscheduler.h>
+#include <gio/gloadableicon.h>
 #include <gio/gmemoryinputstream.h>
 #include <gio/gmemoryoutputstream.h>
-#include <gio/gsimpleasyncresult.h>
-#include <gio/gioenumtypes.h>
+#include <gio/gmount.h>
+#include <gio/gmountoperation.h>
 #include <gio/gnativevolumemonitor.h>
+#include <gio/goutputstream.h>
+#include <gio/gseekable.h>
+#include <gio/gsimpleasyncresult.h>
+#include <gio/gthemedicon.h>
+#include <gio/gvfs.h>
+#include <gio/gvolume.h>
+#include <gio/gvolumemonitor.h>
 
 #undef __GIO_GIO_H_INSIDE__
 
diff --git a/gio/gioenums.h b/gio/gioenums.h
new file mode 100644 (file)
index 0000000..cab54a7
--- /dev/null
@@ -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 <alexl@redhat.com>
+ */
+
+#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
+#error "Only <gio/gio.h> can be included directly."
+#endif
+
+#ifndef __GIO_ENUMS_H__
+#define __GIO_ENUMS_H__
+
+#include <glib-object.h>
+
+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__ */
index 7475706585f96705e93bd60194059e2f7ba0ef8e..81a301734cd035a0d700b75187adb798100c16c5 100644 (file)
@@ -28,6 +28,7 @@
 #define __G_IO_ERROR_H__
 
 #include <glib.h>
+#include <gio/gioenums.h>
 
 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
index 2801d773662900cd1c3419df9a44c39b8e238339..0d8c5ab6da1be06a7dc3417e5177448f9ebd40d5 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __G_IO_MODULE_H__
 #define __G_IO_MODULE_H__
 
-#include <glib-object.h>
+#include <gio/giotypes.h>
 #include <gmodule.h>
 
 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);
 
index 582180031838babf5037aaf365e4e0c89fcfba8a..aa0d910c72830ac73a4b0085ae7a0da1253832e5 100644 (file)
@@ -23,6 +23,7 @@
 #include "config.h"
 
 #include "gioscheduler.h"
+#include "gcancellable.h"
 
 #include "gioalias.h"
 
index 03c7f94f0586a7b3e001aec0ea6d35f902760356..d522608c030dddb5abd7705e7dc2845eca2c3686 100644 (file)
 #define __G_IO_SCHEDULER_H__
 
 #include <glib.h>
-#include <gio/gcancellable.h>
+#include <gio/giotypes.h>
 
 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 (file)
index 0000000..e19628f
--- /dev/null
@@ -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 <alexl@redhat.com>
+ */
+
+#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
+#error "Only <gio/gio.h> can be included directly."
+#endif
+
+#ifndef __GIO_TYPES_H__
+#define __GIO_TYPES_H__
+
+#include <glib-object.h>
+#include <gio/gioenums.h>
+
+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__ */
index 8735a9e9ba42b9a58bf267465cdf1f0b200e6a76..dd6e47812567638492a0684f84dea9c88501eefa 100644 (file)
@@ -21,7 +21,9 @@
  */
 
 #include "config.h"
+#include "gasyncresult.h"
 #include "gsimpleasyncresult.h"
+#include "gicon.h"
 #include "gloadableicon.h"
 #include "glibintl.h"
 
index 3973f74df23f50c387de31f6677c67b5177e76d7..b8f457058baeaf830c31597d9f382e687ebda7f3 100644 (file)
@@ -27,9 +27,7 @@
 #ifndef __G_LOADABLE_ICON_H__
 #define __G_LOADABLE_ICON_H__
 
-#include <glib-object.h>
-#include <gio/gicon.h>
-#include <gio/ginputstream.h>
+#include <gio/giotypes.h>
 
 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;
 
 /**
index 11720b331ab49d07c9ea0b920a341e202167dbd2..c5d6c8b7746539c4e002716d826acd682e4ef83f 100644 (file)
@@ -25,6 +25,8 @@
 #include "glocaldirectorymonitor.h"
 #include "gunixmounts.h"
 #include "giomodule-priv.h"
+#include "gfile.h"
+#include "gioerror.h"
 #include "glibintl.h"
 
 #include <string.h>
index 7265ce44913b4e5343b2036114b2bc760aacd4fb..620f56ab0d1e89ccbd386897d3b31b337d4046ba 100644 (file)
@@ -23,7 +23,6 @@
 #ifndef __G_LOCAL_DIRECTORY_MONITOR_H__
 #define __G_LOCAL_DIRECTORY_MONITOR_H__
 
-#include <glib-object.h>
 #include <gio/gfilemonitor.h>
 
 #include "gunixmounts.h"
index b8031edcc8828d7aa8e5063b404bf6df3ccd913b..e0bee8d8e748994cf791da067726641f1e3b9054 100644 (file)
@@ -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 <glib/gstdio.h>
 #include "glibintl.h"
 
index 4ce25448b3d9b59b7469870cab4e5134c76967fa..cfb1fb835992e9b4efeb77a1e03f49aba02274fa 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef __G_LOCAL_FILE_H__
 #define __G_LOCAL_FILE_H__
 
-#include <gio/gfile.h>
+#include <gio/giotypes.h>
 
 G_BEGIN_DECLS
 
index 82e04a5be2e264a9078368f0ff39369b43ce2411..664a44a1fd27e804cf349252134d7ef96d281a76 100644 (file)
@@ -26,6 +26,7 @@
 #include <glocalfileenumerator.h>
 #include <glocalfileinfo.h>
 #include <glocalfile.h>
+#include <gioerror.h>
 #include <string.h>
 #include <stdlib.h>
 #include "glibintl.h"
index 7d93e9fcd00576769a2266ab408adc2a7469b594..f7197d0c1bb7822f97a90614991443e2762dfde6 100644 (file)
@@ -24,8 +24,6 @@
 #define __G_LOCAL_FILE_ENUMERATOR_H__
 
 #include <gfileenumerator.h>
-#include <gfileinfo.h>
-#include <gfile.h>
 #include <glocalfile.h>
 
 G_BEGIN_DECLS
index c7cfadeac8862d3af9ffc34e3c316b582f1c3b99..cedbc46f322d6d8f9ecd06eeb3b616c2aad5f2ad 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <glib.h>
 #include <glib/gstdio.h>
+#include "gcancellable.h"
 #include "gioerror.h"
 #include "glocalfileinputstream.h"
 #include "glocalfileinfo.h"
index 05c5075660554c5a9257715bb06fb1d0c2ffaafd..f59ee02b3432e1c2686e426080426424b84042fc 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "glocalfilemonitor.h"
 #include "giomodule-priv.h"
+#include "gioerror.h"
 #include "glibintl.h"
 
 #include <string.h>
index f667f84604c4f9aebc6c8bde8e53e165fd701f2a..20b7762a8ad0616003779e3843c7f6ac0ab37af6 100644 (file)
@@ -23,7 +23,6 @@
 #ifndef __G_LOCAL_FILE_MONITOR_H__
 #define __G_LOCAL_FILE_MONITOR_H__
 
-#include <glib-object.h>
 #include <gio/gfilemonitor.h>
 
 G_BEGIN_DECLS
index 8a6e0552796525786aedb30570e332bb010b8c6c..cbd99940258c5de26a9a9e7bfc72018512c28a8c 100644 (file)
@@ -35,6 +35,7 @@
 #include <glib/gstdio.h>
 #include "glibintl.h"
 #include "gioerror.h"
+#include "gcancellable.h"
 #include "glocalfileoutputstream.h"
 #include "glocalfileinfo.h"
 
index 0c057df085fa66b322b9ffb8ff03a4be31f72afc..1e35735d6df8c02ebb4334fe12ecfe592ba15843 100644 (file)
@@ -24,7 +24,6 @@
 #define __G_LOCAL_FILE_OUTPUT_STREAM_H__
 
 #include <gio/gfileoutputstream.h>
-#include <gio/gfile.h>
 
 G_BEGIN_DECLS
 
index c2571a72f193c87bd9109089e015617ee0618da1..42a3f16fa3466fa4252af9c32934daf2a15de182 100644 (file)
@@ -24,6 +24,7 @@
 #include "glocalvfs.h"
 #include "glocalfile.h"
 #include "giomodule.h"
+#include "gvfs.h"
 #include <gio/gdummyfile.h>
 #include <sys/types.h>
 #ifdef HAVE_PWD_H
index eda00e1f97927992def53281610648174652ca7d..80a1d3a47569ddb17003e51b9f8dd6e50f7e9ca0 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef __G_LOCAL_VFS_H__
 #define __G_LOCAL_VFS_H__
 
-#include <gio/gvfs.h>
+#include <gio/giotypes.h>
 
 G_BEGIN_DECLS
 
index a029d372bd0e89c7a8a27459de2247cc5a291ad2..bb6001bb49af06cd56827b11c229373926b72da7 100644 (file)
@@ -26,6 +26,7 @@
 #include "gseekable.h"
 #include "string.h"
 #include "gsimpleasyncresult.h"
+#include "gioerror.h"
 #include "glibintl.h"
 
 #include "gioalias.h"
index 0e3e43f23fa4043512544c2fa3a99eba4dbb2afe..0aa120024437f46370ee8ae4fecefc43668a22e8 100644 (file)
@@ -27,7 +27,6 @@
 #ifndef __G_MEMORY_INPUT_STREAM_H__
 #define __G_MEMORY_INPUT_STREAM_H__
 
-#include <glib-object.h>
 #include <gio/ginputstream.h>
 
 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;
 
index ebb91ab3c9624f0e537f1fae7cec5fdcb9dfeb18..066d60e2488a5b684cf5070582e5d1700069bf4d 100644 (file)
@@ -25,6 +25,7 @@
 #include "goutputstream.h"
 #include "gseekable.h"
 #include "gsimpleasyncresult.h"
+#include "gioerror.h"
 #include "string.h"
 #include "glibintl.h"
 
index 7ac647502dd91d744392b6701c9c2b6cad95022e..9e6f67e16291129c8af1573d98d73a3761287be7 100644 (file)
@@ -27,7 +27,6 @@
 #ifndef __G_MEMORY_OUTPUT_STREAM_H__
 #define __G_MEMORY_OUTPUT_STREAM_H__
 
-#include <glib-object.h>
 #include <gio/goutputstream.h>
 
 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;
 
index 5bef1b0227f1fcc67bb81ab81fc0e34e94a23472..172ad3bee90ee8f689d6a86979a363cdae2b0276 100644 (file)
@@ -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"
index c2474d569e527e7ee457e136a2df27a503ab33ae..fe49344782e07f9b787c87f8851b81b4fc3f3218 100644 (file)
@@ -28,8 +28,7 @@
 #ifndef __G_MOUNT_H__
 #define __G_MOUNT_H__
 
-#include <glib-object.h>
-#include <gio/gfile.h>
+#include <gio/giotypes.h>
 
 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;
 
 /**
index e9a9e446a73fbb397ce2fa7a6d2dd54dfaa164a5..03bfc91d65300c0e760477a32ec421d4e17d354b 100644 (file)
@@ -27,9 +27,7 @@
 #ifndef __G_MOUNT_OPERATION_H__
 #define __G_MOUNT_OPERATION_H__
 
-#include <sys/stat.h>
-
-#include <glib-object.h>
+#include <gio/giotypes.h>
 
 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;
index 3face1b2b16d05728d70f4d54c526004fd16a089..d6a9105568a26507a50ff554f6f3f7927be69309 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef __G_NATIVE_VOLUME_MONITOR_H__
 #define __G_NATIVE_VOLUME_MONITOR_H__
 
-#include <glib-object.h>
 #include <gio/gvolumemonitor.h>
 
 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 {
index 39aeb7386dc148f205ab8309660b63f7ed528788..42c55314ef6661430c14eb2681e5bfdf0bfb986c 100644 (file)
 
 #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"
index 263e6e6daee492d1f19a71f50823398122496685..a4b9ef187cb89e173fc0f31991512be02249eb52 100644 (file)
 #ifndef __G_OUTPUT_STREAM_H__
 #define __G_OUTPUT_STREAM_H__
 
-#include <glib-object.h>
-#include <gio/gioerror.h>
-#include <gio/gasyncresult.h>
-#include <gio/gcancellable.h>
-#include <gio/ginputstream.h>
+#include <gio/giotypes.h>
 
 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;
 
index 0568bfab2d016688f33dcecef4e606bb85ffa1a9..51d04efc63dd7b21694523f10a9951f6f54ed4cd 100644 (file)
@@ -24,7 +24,9 @@
 #include <string.h>
 
 #include "gpollfilemonitor.h"
+#include "gfile.h"
 #include "gfilemonitor.h"
+#include "gfileinfo.h"
 
 #include "gioalias.h"
 
index a7f59c2c6f268722c56dc84c7ee6176b7c2a3919..7ab65b141d53894ba8cf916248118c3d338c0f8d 100644 (file)
@@ -23,7 +23,6 @@
 #ifndef __G_POLL_FILE_MONITOR_H__
 #define __G_POLL_FILE_MONITOR_H__
 
-#include <glib-object.h>
 #include <gio/gfilemonitor.h>
 
 G_BEGIN_DECLS
index 78b8998c0af2b4e57ef39e64b72756abd92bae15..6322e27a43cea383464a549344339186bf5e7232 100644 (file)
@@ -27,8 +27,7 @@
 #ifndef __G_SEEKABLE_H__
 #define __G_SEEKABLE_H__
 
-#include <glib-object.h>
-#include <gio/gcancellable.h>
+#include <gio/giotypes.h>
 
 G_BEGIN_DECLS
 
@@ -42,7 +41,6 @@ G_BEGIN_DECLS
  * 
  * Seek object for streaming operations.
  **/ 
-typedef struct _GSeekable        GSeekable;
 typedef struct _GSeekableIface   GSeekableIface;
 
 /**
index 27f2d91ceb3a2b2e8e2136e7742af0e2eab5408c..5ec3a270b13b71584e7f813aa1f0c1706851d8c4 100644 (file)
@@ -32,6 +32,8 @@
 #endif
 
 #include "gsimpleasyncresult.h"
+#include "gasyncresult.h"
+#include "gcancellable.h"
 #include "gioscheduler.h"
 #include <gio/gioerror.h>
 #include "glibintl.h"
index f2f9b36d2870d83e1bddce3d5fe8a16c553ed075..815d76da750ade1f8edb1019d19d3668f64a0817 100644 (file)
@@ -27,8 +27,7 @@
 #ifndef __G_SIMPLE_ASYNC_RESULT_H__
 #define __G_SIMPLE_ASYNC_RESULT_H__
 
-#include <gio/gasyncresult.h>
-#include <gio/gcancellable.h>
+#include <gio/giotypes.h>
 
 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;
   
index e468a73563655a7de5024798fa29c41053e4d033..5fbb9e6ad09ff194786f0ea23a19d79f667a30ed 100644 (file)
@@ -25,6 +25,7 @@
 #include <string.h>
 
 #include "gthemedicon.h"
+#include "gicon.h"
 #include "glibintl.h"
 
 #include "gioalias.h"
index b2b82acf514e4af2809405fadeaeda9dffa2b570..897eeea53fb4da8da9c9fbbeb90a47abc1f6cd20 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __G_THEMED_ICON_H__
 #define __G_THEMED_ICON_H__
 
-#include <gio/gicon.h>
+#include <gio/giotypes.h>
 
 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;
index fc9f4af94b51d961c7742b6950f630ff99b65eba..5c092e3bbb7d01c86b40ef4219ab9ac1b118c163 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef __G_UNION_VOLUME_MONITOR_H__
 #define __G_UNION_VOLUME_MONITOR_H__
 
-#include <glib-object.h>
 #include <gio/gvolumemonitor.h>
 
 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;
index ef66841fac082ba534870ed8541116cf7c5c5795..4f2027c3b3e2f0fdeb4d3ce273dfe053ec8b9626 100644 (file)
 #include <glib.h>
 #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"
index cafae799e57fc1674f87b47e2d860515e925f878..55841af2f26fb8b368097bae8d109bb4e16d541d 100644 (file)
 #ifndef __G_UNIX_MOUNT_H__
 #define __G_UNIX_MOUNT_H__
 
-#include <glib-object.h>
-#include <gio/gmount.h>
-#include <gio/gunixmounts.h>
-#include <gio/gunixvolumemonitor.h>
+#include <gio/giotypes.h>
+
+#include "gunixmounts.h"
 
 G_BEGIN_DECLS
 
index e5ca86bbd9f02483a7db11c63a8e8131ba7b1dfc..5c7d6a0f77bd85d1d9bda0bff8ed6d4962bc630b 100644 (file)
@@ -48,7 +48,7 @@ typedef struct _GUnixMountPoint GUnixMountPoint;
  * 
  * Watches #GUnixMount<!-- -->s 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 ())
index d02ca2f585ea599dacd19f8736b539fecd500e75..f03d4a6c55c1924332245976a25f71861aff0f00 100644 (file)
 #include <glib.h>
 #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"
index 8e6e2254d359aae4f9e7fe5332b1499588c252c5..29d3db3509d8fdc6d9fcc3c3e1606be49255c6ae 100644 (file)
 #ifndef __G_UNIX_VOLUME_H__
 #define __G_UNIX_VOLUME_H__
 
-#include <glib-object.h>
-#include <gio/gvolume.h>
-#include <gio/gunixmounts.h>
+#include <gio/giotypes.h>
 #include <gio/gunixvolumemonitor.h>
+#include <gio/gunixmounts.h>
 
 G_BEGIN_DECLS
 
index 00dd79bc4e01f60d0a53fc9eb05dc0a3562471b5..d617f8d00d09797f851ad44bb838bc6838125da9 100644 (file)
@@ -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"
index 6aed8a465010400543bd315887a5b4d9ffc6b718..3eaab8e2e18f676ea5c0865714a832b204287990 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef __G_UNIX_VOLUME_MONITOR_H__
 #define __G_UNIX_VOLUME_MONITOR_H__
 
-#include <glib-object.h>
 #include <gio/gnativevolumemonitor.h>
 
 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 */
index 9b8581ffeb6c1d69b330d7e98d14f89aa7a653bd..90e533c1e1cd865f6bc735ce288d9e7387701ca3 100644 (file)
@@ -27,8 +27,7 @@
 #ifndef __G_VFS_H__
 #define __G_VFS_H__
 
-#include <glib-object.h>
-#include <gio/gfile.h>
+#include <gio/giotypes.h>
 
 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 {
index d34bcfcac6aaab8c919285059cbc9f999422fb34..70005828e05446055ae9b3017d061c826eafaed3 100644 (file)
@@ -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"
index f1ec0f5f1b1d276906b7f5081d88440e1f73da56..72a74e14ddd9ea4c7560130675abb0661e600200 100644 (file)
@@ -28,9 +28,7 @@
 #ifndef __G_VOLUME_H__
 #define __G_VOLUME_H__
 
-#include <glib-object.h>
-#include <gio/gfile.h>
-#include <gio/gdrive.h>
+#include <gio/giotypes.h>
 
 G_BEGIN_DECLS
 
index 3ee6f1f7ed3ac70958bd20ab0eb0297a66dfd2c4..8b9560e7b4ad6a8dc238babd174361b7c215e977 100644 (file)
@@ -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"
index 9d32ceabbdf4a20b4229bc306e971143f5edd689..6bf73491f7bb76aff46ac3f869be658bc8869dba 100644 (file)
 #ifndef __G_VOLUME_MONITOR_H__
 #define __G_VOLUME_MONITOR_H__
 
-#include <glib-object.h>
-#include <gio/gmount.h>
-#include <gio/gvolume.h>
-#include <gio/gdrive.h>
+#include <gio/giotypes.h>
 
 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 {
index cfec62f1e975d61dde3015e2ed5d2e66a95556c6..62af8b76c27bc257c7efa545059b6cb5cf667f2f 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef __G_WIN32_APP_INFO_H__
 #define __G_WIN32_APP_INFO_H__
 
-#include <gio/gappinfo.h>
+#include <gio/giotypes.h>
 
 G_BEGIN_DECLS
 
index 9bf3808bd459f380651eace0f341f6d12cc73957..59b97e64cd0f11d5422ac5fa47752c48a9545675 100644 (file)
@@ -26,9 +26,7 @@
 #ifndef __G_WIN32_MOUNT_H__
 #define __G_WIN32_MOUNT_H__
 
-#include <glib-object.h>
-#include <gio/gmount.h>
-#include <gio/gwin32volumemonitor.h>
+#include <gio/giotypes.h>
 
 G_BEGIN_DECLS
 
index 8f6da38b5f008ee435b0cda13582428b5a20bda1..6de4f75b81a11a80b8d53b25499a0159894c9bb0 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef __G_WIN32_VOLUME_MONITOR_H__
 #define __G_WIN32_VOLUME_MONITOR_H__
 
-#include <glib-object.h>
 #include <gio/gnativevolumemonitor.h>
 
 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 <alexl@redhat.com>
- *         David Zeuthen <davidz@redhat.com>
- *         Hans Breuer <hans@breuer.org>
- */
-
-#ifndef __G_WIN32_VOLUME_MONITOR_H__
-#define __G_WIN32_VOLUME_MONITOR_H__
-
-#include <glib-object.h>
-#include <gio/gnativevolumemonitor.h>
-
-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
index 39f2feb83c4b729dd674e8bc1f4f8f464be6f1f7..0042e7e854ccc2d6b59d2b482d6b2d0ad48c7581 100644 (file)
@@ -32,6 +32,7 @@
 #include <sys/inotify.h>
 #include <gio/glocalfile.h>
 #include <gio/gfilemonitor.h>
+#include <gio/gfile.h>
 #include "inotify-helper.h"
 #include "inotify-missing.h"
 #include "inotify-path.h"
index 3095db5959087275501c98d3f321864d356cd998..652458961612ef0bc528d3df735fcc35f0e508a9 100644 (file)
@@ -24,7 +24,7 @@
 #include <gio/gio.h>
 #include <stdlib.h>
 #include <string.h>
-
+#include <sys/stat.h>
 
 #define DEFAULT_TEST_DIR               "testdir_live-g-file"