Commit 3d93bf69 authored by Cody Russell's avatar Cody Russell Committed by Cody Russell
Browse files

Moved all relevant typedefs into these files.

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
parent f869b1f6
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
......
......@@ -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 \
......
......@@ -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:
......
......@@ -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
......
......@@ -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:
......
......@@ -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 <string.h>
#include "glibintl.h"
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
......@@ -28,7 +28,7 @@
#define __G_CONTENT_TYPE_H__
#include <glib.h>
#include <gio/gicon.h>
#include <gio/giotypes.h>
G_BEGIN_DECLS
......
......@@ -24,6 +24,7 @@
#include "config.h"
#include "gdatainputstream.h"
#include "gioenumtypes.h"
#include "gioerror.h"
#include "glibintl.h"
#include "gioalias.h"
......
......@@ -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);
......
......@@ -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
......
......@@ -34,12 +34,14 @@
#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"
......
......@@ -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"
......
......@@ -28,10 +28,7 @@
#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
......
......@@ -33,6 +33,7 @@
#include <stdlib.h>
#include "gdummyfile.h"
#include "gfile.h"
#include "gioalias.h"
......
......@@ -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
......
......@@ -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"
......
......@@ -27,13 +27,7 @@
#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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment