big header formatting cleanup: indentation, vtable formatting, consistent

2008-09-02  Michael Natterer  <mitch@imendio.com>

	* *.h: big header formatting cleanup: indentation, vtable
	formatting, consistent spacing in (* vfunc), trailing whitespace
	removal. Formatting should be pretty consistent in all GIO headers
	now.


svn path=/trunk/; revision=7433
This commit is contained in:
Michael Natterer 2008-09-02 19:05:58 +00:00 committed by Michael Natterer
parent 920f3bffb3
commit f2a2d6c9ac
66 changed files with 1331 additions and 1319 deletions

View File

@ -1,3 +1,10 @@
2008-09-02 Michael Natterer <mitch@imendio.com>
* *.h: big header formatting cleanup: indentation, vtable
formatting, consistent spacing in (* vfunc), trailing whitespace
removal. Formatting should be pretty consistent in all GIO headers
now.
2008-09-02 Matthias Clasen <mclasen@redhat.com> 2008-09-02 Matthias Clasen <mclasen@redhat.com>
* gmount.h: Document guess_content_type sync vfunc. * gmount.h: Document guess_content_type sync vfunc.

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -48,7 +48,7 @@ typedef struct _GAppLaunchContextPrivate GAppLaunchContextPrivate;
/** /**
* GAppInfo: * GAppInfo:
* *
* Information about an installed application and methods to launch * Information about an installed application and methods to launch
* it (with file arguments). * it (with file arguments).
*/ */
@ -75,7 +75,7 @@ typedef struct _GAppLaunchContextPrivate GAppLaunchContextPrivate;
* @add_supports_type: Adds to the #GAppInfo information about supported file types. * @add_supports_type: Adds to the #GAppInfo information about supported file types.
* @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo. * @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo.
* @remove_supports_type: Removes a supported application type from a #GAppInfo. * @remove_supports_type: Removes a supported application type from a #GAppInfo.
* *
* Application Information interface, for operating system portability. * Application Information interface, for operating system portability.
*/ */
typedef struct _GAppInfoIface GAppInfoIface; typedef struct _GAppInfoIface GAppInfoIface;
@ -86,45 +86,43 @@ struct _GAppInfoIface
/* Virtual Table */ /* Virtual Table */
GAppInfo * (*dup) (GAppInfo *appinfo); GAppInfo * (* dup) (GAppInfo *appinfo);
gboolean (*equal) (GAppInfo *appinfo1, gboolean (* equal) (GAppInfo *appinfo1,
GAppInfo *appinfo2); GAppInfo *appinfo2);
const char * (*get_id) (GAppInfo *appinfo); const char * (* get_id) (GAppInfo *appinfo);
const char * (*get_name) (GAppInfo *appinfo); const char * (* get_name) (GAppInfo *appinfo);
const char * (*get_description) (GAppInfo *appinfo); const char * (* get_description) (GAppInfo *appinfo);
const char * (*get_executable) (GAppInfo *appinfo); const char * (* get_executable) (GAppInfo *appinfo);
GIcon * (*get_icon) (GAppInfo *appinfo); GIcon * (* get_icon) (GAppInfo *appinfo);
gboolean (*launch) (GAppInfo *appinfo, gboolean (* launch) (GAppInfo *appinfo,
GList *filenames, GList *filenames,
GAppLaunchContext *launch_context, GAppLaunchContext *launch_context,
GError **error); GError **error);
gboolean (*supports_uris) (GAppInfo *appinfo); gboolean (* supports_uris) (GAppInfo *appinfo);
gboolean (*supports_files) (GAppInfo *appinfo); gboolean (* supports_files) (GAppInfo *appinfo);
gboolean (*launch_uris) (GAppInfo *appinfo, gboolean (* launch_uris) (GAppInfo *appinfo,
GList *uris, GList *uris,
GAppLaunchContext *launch_context, GAppLaunchContext *launch_context,
GError **error); GError **error);
gboolean (*should_show) (GAppInfo *appinfo); gboolean (* should_show) (GAppInfo *appinfo);
/* For changing associations */ /* For changing associations */
gboolean (*set_as_default_for_type) (GAppInfo *appinfo, gboolean (* set_as_default_for_type) (GAppInfo *appinfo,
const char *content_type, const char *content_type,
GError **error); GError **error);
gboolean (*set_as_default_for_extension) (GAppInfo *appinfo, gboolean (* set_as_default_for_extension) (GAppInfo *appinfo,
const char *extension, const char *extension,
GError **error); GError **error);
gboolean (*add_supports_type) (GAppInfo *appinfo, gboolean (* add_supports_type) (GAppInfo *appinfo,
const char *content_type, const char *content_type,
GError **error); GError **error);
gboolean (*can_remove_supports_type) (GAppInfo *appinfo); gboolean (* can_remove_supports_type) (GAppInfo *appinfo);
gboolean (*remove_supports_type) (GAppInfo *appinfo, gboolean (* remove_supports_type) (GAppInfo *appinfo,
const char *content_type, const char *content_type,
GError **error); GError **error);
}; };
GType g_app_info_get_type (void) G_GNUC_CONST; GType g_app_info_get_type (void) G_GNUC_CONST;
GType g_app_launch_context_get_type (void) G_GNUC_CONST;
GAppInfo * g_app_info_create_from_commandline (const char *commandline, GAppInfo * g_app_info_create_from_commandline (const char *commandline,
const char *application_name, const char *application_name,
GAppInfoCreateFlags flags, GAppInfoCreateFlags flags,
@ -176,7 +174,7 @@ gboolean g_app_info_launch_default_for_uri (const char *uri,
/** /**
* GAppLaunchContext: * GAppLaunchContext:
* @parent_instance: The parent instance. * @parent_instance: The parent instance.
* *
* Integrating the launch with the launching application. This is used to * Integrating the launch with the launching application. This is used to
* handle for instance startup notification and launching the new application * handle for instance startup notification and launching the new application
* on the same screen as the launching window. * on the same screen as the launching window.
@ -193,14 +191,14 @@ struct _GAppLaunchContextClass
{ {
GObjectClass parent_class; GObjectClass parent_class;
char * (*get_display) (GAppLaunchContext *context, char * (* get_display) (GAppLaunchContext *context,
GAppInfo *info, GAppInfo *info,
GList *files); GList *files);
char * (*get_startup_notify_id) (GAppLaunchContext *context, char * (* get_startup_notify_id) (GAppLaunchContext *context,
GAppInfo *info, GAppInfo *info,
GList *files); GList *files);
void (*launch_failed) (GAppLaunchContext *context, void (* launch_failed) (GAppLaunchContext *context,
const char *startup_notify_id); const char *startup_notify_id);
/* Padding for future expansion */ /* Padding for future expansion */
void (*_g_reserved1) (void); void (*_g_reserved1) (void);
@ -210,6 +208,7 @@ struct _GAppLaunchContextClass
void (*_g_reserved5) (void); void (*_g_reserved5) (void);
}; };
GType g_app_launch_context_get_type (void) G_GNUC_CONST;
GAppLaunchContext *g_app_launch_context_new (void); GAppLaunchContext *g_app_launch_context_new (void);
char * g_app_launch_context_get_display (GAppLaunchContext *context, char * g_app_launch_context_get_display (GAppLaunchContext *context,
GAppInfo *info, GAppInfo *info,

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -27,15 +27,16 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef struct { typedef struct
{
gpointer async_object; gpointer async_object;
GError * error; GError * error;
gpointer user_data; gpointer user_data;
} GAsyncResultData; } GAsyncResultData;
typedef gboolean (*GFDSourceFunc) (gpointer user_data, typedef gboolean (*GFDSourceFunc) (gpointer user_data,
GIOCondition condition, GIOCondition condition,
int fd); int fd);
void _g_queue_async_result (GAsyncResultData *result, void _g_queue_async_result (GAsyncResultData *result,
gpointer async_object, gpointer async_object,

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -39,7 +39,7 @@ G_BEGIN_DECLS
/** /**
* GAsyncResult: * GAsyncResult:
* *
* Holds results information for an asynchronous operation, * Holds results information for an asynchronous operation,
* usually passed directly to a asynchronous _finish() operation. * usually passed directly to a asynchronous _finish() operation.
**/ **/
typedef struct _GAsyncResultIface GAsyncResultIface; typedef struct _GAsyncResultIface GAsyncResultIface;
@ -47,7 +47,7 @@ typedef struct _GAsyncResultIface GAsyncResultIface;
/** /**
* GAsyncResultIface: * GAsyncResultIface:
* @g_iface: The parent interface. * @g_iface: The parent interface.
* @get_user_data: Gets the user data passed to the callback. * @get_user_data: Gets the user data passed to the callback.
* @get_source_object: Gets the source object that issued the asynchronous operation. * @get_source_object: Gets the source object that issued the asynchronous operation.
* *
@ -59,11 +59,11 @@ struct _GAsyncResultIface
/* Virtual Table */ /* Virtual Table */
gpointer (*get_user_data) (GAsyncResult *async_result); gpointer (* get_user_data) (GAsyncResult *async_result);
GObject * (*get_source_object) (GAsyncResult *async_result); GObject * (* get_source_object) (GAsyncResult *async_result);
}; };
GType g_async_result_get_type (void) G_GNUC_CONST; GType g_async_result_get_type (void) G_GNUC_CONST;
gpointer g_async_result_get_user_data (GAsyncResult *res); gpointer g_async_result_get_user_data (GAsyncResult *res);
GObject *g_async_result_get_source_object (GAsyncResult *res); GObject *g_async_result_get_source_object (GAsyncResult *res);

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
* *
* Author: Christian Kellner <gicmo@gnome.org> * Author: Christian Kellner <gicmo@gnome.org>
*/ */
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
@ -40,7 +40,7 @@ G_BEGIN_DECLS
/** /**
* GBufferedInputStream: * GBufferedInputStream:
* *
* Implements #GFilterInputStream with a sized input buffer. * Implements #GFilterInputStream with a sized input buffer.
**/ **/
typedef struct _GBufferedInputStreamClass GBufferedInputStreamClass; typedef struct _GBufferedInputStreamClass GBufferedInputStreamClass;
@ -56,7 +56,7 @@ struct _GBufferedInputStream
struct _GBufferedInputStreamClass struct _GBufferedInputStreamClass
{ {
GFilterInputStreamClass parent_class; GFilterInputStreamClass parent_class;
gssize (* fill) (GBufferedInputStream *stream, gssize (* fill) (GBufferedInputStream *stream,
gssize count, gssize count,
@ -118,7 +118,6 @@ int g_buffered_input_stream_read_byte (GBufferedInputStream *st
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
G_END_DECLS G_END_DECLS
#endif /* __G_BUFFERED_INPUT_STREAM_H__ */ #endif /* __G_BUFFERED_INPUT_STREAM_H__ */

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -40,7 +40,7 @@ G_BEGIN_DECLS
/** /**
* GCancellable: * GCancellable:
* *
* Allows actions to be cancelled. * Allows actions to be cancelled.
*/ */
typedef struct _GCancellableClass GCancellableClass; typedef struct _GCancellableClass GCancellableClass;
@ -50,7 +50,7 @@ struct _GCancellableClass
GObjectClass parent_class; GObjectClass parent_class;
void (* cancelled) (GCancellable *cancellable); void (* cancelled) (GCancellable *cancellable);
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
void (*_g_reserved1) (void); void (*_g_reserved1) (void);
@ -60,9 +60,9 @@ struct _GCancellableClass
void (*_g_reserved5) (void); void (*_g_reserved5) (void);
}; };
GType g_cancellable_get_type (void) G_GNUC_CONST; GType g_cancellable_get_type (void) G_GNUC_CONST;
GCancellable *g_cancellable_new (void); GCancellable *g_cancellable_new (void);
/* These are only safe to call inside a cancellable op */ /* These are only safe to call inside a cancellable op */
gboolean g_cancellable_is_cancelled (GCancellable *cancellable); gboolean g_cancellable_is_cancelled (GCancellable *cancellable);

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -27,7 +27,6 @@
#ifndef __G_CONTENT_TYPE_H__ #ifndef __G_CONTENT_TYPE_H__
#define __G_CONTENT_TYPE_H__ #define __G_CONTENT_TYPE_H__
#include <glib.h>
#include <gio/giotypes.h> #include <gio/giotypes.h>
G_BEGIN_DECLS G_BEGIN_DECLS
@ -49,7 +48,7 @@ char * g_content_type_guess (const char *filename,
gsize data_size, gsize data_size,
gboolean *result_uncertain); gboolean *result_uncertain);
char ** g_content_type_guess_for_tree (GFile *root); char ** g_content_type_guess_for_tree (GFile *root);
GList * g_content_types_get_registered (void); GList * g_content_types_get_registered (void);

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -42,7 +42,7 @@ G_BEGIN_DECLS
* GDataInputStream: * GDataInputStream:
* @parent: a #GBufferedInputStream. * @parent: a #GBufferedInputStream.
* *
* An implementation of #GBufferedInputStream that allows for high-level * An implementation of #GBufferedInputStream that allows for high-level
* data manipulation of arbitrary data (including binary operations). * data manipulation of arbitrary data (including binary operations).
**/ **/
typedef struct _GDataInputStreamClass GDataInputStreamClass; typedef struct _GDataInputStreamClass GDataInputStreamClass;
@ -58,7 +58,8 @@ struct _GDataInputStream
struct _GDataInputStreamClass struct _GDataInputStreamClass
{ {
GBufferedInputStreamClass parent_class; GBufferedInputStreamClass parent_class;
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
void (*_g_reserved1) (void); void (*_g_reserved1) (void);
@ -68,8 +69,8 @@ struct _GDataInputStreamClass
void (*_g_reserved5) (void); void (*_g_reserved5) (void);
}; };
GType g_data_input_stream_get_type (void) G_GNUC_CONST; GType g_data_input_stream_get_type (void) G_GNUC_CONST;
GDataInputStream* g_data_input_stream_new (GInputStream *base_stream); GDataInputStream * g_data_input_stream_new (GInputStream *base_stream);
void g_data_input_stream_set_byte_order (GDataInputStream *stream, void g_data_input_stream_set_byte_order (GDataInputStream *stream,
GDataStreamByteOrder order); GDataStreamByteOrder order);

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -42,7 +42,7 @@ G_BEGIN_DECLS
* GDataOutputStream: * GDataOutputStream:
* @parent_instance: a #GBufferedOutputStream. * @parent_instance: a #GBufferedOutputStream.
* *
* An implementation of #GBufferedOutputStream that allows for high-level * An implementation of #GBufferedOutputStream that allows for high-level
* data manipulation of arbitrary data (including binary operations). * data manipulation of arbitrary data (including binary operations).
**/ **/
typedef struct _GDataOutputStream GDataOutputStream; typedef struct _GDataOutputStream GDataOutputStream;
@ -59,7 +59,8 @@ struct _GDataOutputStream
struct _GDataOutputStreamClass struct _GDataOutputStreamClass
{ {
GFilterOutputStreamClass parent_class; GFilterOutputStreamClass parent_class;
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
void (*_g_reserved1) (void); void (*_g_reserved1) (void);
@ -70,8 +71,8 @@ struct _GDataOutputStreamClass
}; };
GType g_data_output_stream_get_type (void) G_GNUC_CONST; GType g_data_output_stream_get_type (void) G_GNUC_CONST;
GDataOutputStream* g_data_output_stream_new (GOutputStream *base_stream); GDataOutputStream * g_data_output_stream_new (GOutputStream *base_stream);
void g_data_output_stream_set_byte_order (GDataOutputStream *stream, void g_data_output_stream_set_byte_order (GDataOutputStream *stream,
GDataStreamByteOrder order); GDataStreamByteOrder order);

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -43,15 +43,15 @@ struct _GDesktopAppInfoClass
}; };
GType g_desktop_app_info_get_type (void) G_GNUC_CONST; GType g_desktop_app_info_get_type (void) G_GNUC_CONST;
GDesktopAppInfo *g_desktop_app_info_new_from_filename (const char *filename); GDesktopAppInfo *g_desktop_app_info_new_from_filename (const char *filename);
GDesktopAppInfo *g_desktop_app_info_new_from_keyfile (GKeyFile *key_file); GDesktopAppInfo *g_desktop_app_info_new_from_keyfile (GKeyFile *key_file);
GDesktopAppInfo *g_desktop_app_info_new (const char *desktop_id); GDesktopAppInfo *g_desktop_app_info_new (const char *desktop_id);
gboolean g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info); gboolean g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info);
void g_desktop_app_info_set_desktop_env (const char *desktop_env); void g_desktop_app_info_set_desktop_env (const char *desktop_env);
#define G_TYPE_DESKTOP_APP_INFO_LOOKUP (g_desktop_app_info_lookup_get_type ()) #define G_TYPE_DESKTOP_APP_INFO_LOOKUP (g_desktop_app_info_lookup_get_type ())
@ -70,7 +70,7 @@ void g_desktop_app_info_set_desktop_env (const char *desktop_env);
/** /**
* GDesktopAppInfoLookup: * GDesktopAppInfoLookup:
* *
* Interface that is used by backends to associate default * Interface that is used by backends to associate default
* handlers with URI schemes. * handlers with URI schemes.
*/ */
typedef struct _GDesktopAppInfoLookup GDesktopAppInfoLookup; typedef struct _GDesktopAppInfoLookup GDesktopAppInfoLookup;
@ -80,15 +80,15 @@ struct _GDesktopAppInfoLookupIface
{ {
GTypeInterface g_iface; GTypeInterface g_iface;
GAppInfo * (*get_default_for_uri_scheme) (GDesktopAppInfoLookup *lookup, GAppInfo * (* get_default_for_uri_scheme) (GDesktopAppInfoLookup *lookup,
const char *uri_scheme); const char *uri_scheme);
}; };
GType g_desktop_app_info_lookup_get_type (void) G_GNUC_CONST; GType g_desktop_app_info_lookup_get_type (void) G_GNUC_CONST;
GAppInfo *g_desktop_app_info_lookup_get_default_for_uri_scheme (GDesktopAppInfoLookup *lookup, GAppInfo *g_desktop_app_info_lookup_get_default_for_uri_scheme (GDesktopAppInfoLookup *lookup,
const char *uri_scheme); const char *uri_scheme);
G_END_DECLS G_END_DECLS
#endif /* __G_DESKTOP_APP_INFO_H__ */ #endif /* __G_DESKTOP_APP_INFO_H__ */

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -56,14 +56,13 @@ G_BEGIN_DECLS
* @eject_finish: Finishes an eject operation. * @eject_finish: Finishes an eject operation.
* @poll_for_media: Poll for media insertion/removal on a #GDrive. * @poll_for_media: Poll for media insertion/removal on a #GDrive.
* @poll_for_media_finish: Finishes a media poll operation. * @poll_for_media_finish: Finishes a media poll operation.
* @get_identifier: Returns the identifier of the given kind, or %NULL if * @get_identifier: Returns the identifier of the given kind, or %NULL if
* the #GDrive doesn't have one. * the #GDrive doesn't have one.
* @enumerate_identifiers: Returns an array strings listing the kinds * @enumerate_identifiers: Returns an array strings listing the kinds
* of identifiers which the #GDrive has. * of identifiers which the #GDrive has.
* *
*
* Interface for creating #GDrive implementations. * Interface for creating #GDrive implementations.
*/ */
typedef struct _GDriveIface GDriveIface; typedef struct _GDriveIface GDriveIface;
struct _GDriveIface struct _GDriveIface
@ -71,42 +70,42 @@ struct _GDriveIface
GTypeInterface g_iface; GTypeInterface g_iface;
/* signals */ /* signals */
void (*changed) (GDrive *drive); void (* changed) (GDrive *drive);
void (*disconnected) (GDrive *drive); void (* disconnected) (GDrive *drive);
void (*eject_button) (GDrive *drive); void (* eject_button) (GDrive *drive);
/* Virtual Table */
char * (*get_name) (GDrive *drive);
GIcon * (*get_icon) (GDrive *drive);
gboolean (*has_volumes) (GDrive *drive);
GList * (*get_volumes) (GDrive *drive);
gboolean (*is_media_removable) (GDrive *drive);
gboolean (*has_media) (GDrive *drive);
gboolean (*is_media_check_automatic) (GDrive *drive);
gboolean (*can_eject) (GDrive *drive);
gboolean (*can_poll_for_media) (GDrive *drive);
void (*eject) (GDrive *drive,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*eject_finish) (GDrive *drive,
GAsyncResult *result,
GError **error);
void (*poll_for_media) (GDrive *drive,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*poll_for_media_finish) (GDrive *drive,
GAsyncResult *result,
GError **error);
char * (*get_identifier) (GDrive *drive, /* Virtual Table */
const char *kind); char * (* get_name) (GDrive *drive);
char ** (*enumerate_identifiers) (GDrive *drive); GIcon * (* get_icon) (GDrive *drive);
gboolean (* has_volumes) (GDrive *drive);
GList * (* get_volumes) (GDrive *drive);
gboolean (* is_media_removable) (GDrive *drive);
gboolean (* has_media) (GDrive *drive);
gboolean (* is_media_check_automatic) (GDrive *drive);
gboolean (* can_eject) (GDrive *drive);
gboolean (* can_poll_for_media) (GDrive *drive);
void (* eject) (GDrive *drive,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* eject_finish) (GDrive *drive,
GAsyncResult *result,
GError **error);
void (* poll_for_media) (GDrive *drive,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* poll_for_media_finish) (GDrive *drive,
GAsyncResult *result,
GError **error);
char * (* get_identifier) (GDrive *drive,
const char *kind);
char ** (* enumerate_identifiers) (GDrive *drive);
}; };
GType g_drive_get_type (void) G_GNUC_CONST; GType g_drive_get_type (void) G_GNUC_CONST;
char * g_drive_get_name (GDrive *drive); char * g_drive_get_name (GDrive *drive);
GIcon * g_drive_get_icon (GDrive *drive); GIcon * g_drive_get_icon (GDrive *drive);

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -42,9 +42,9 @@ struct _GDummyFileClass
GObjectClass parent_class; GObjectClass parent_class;
}; };
GType _g_dummy_file_get_type (void) G_GNUC_CONST; GType _g_dummy_file_get_type (void) G_GNUC_CONST;
GFile * _g_dummy_file_new (const char *uri); GFile * _g_dummy_file_new (const char *uri);
G_END_DECLS G_END_DECLS

View File

@ -19,9 +19,9 @@
* *
*/ */
#include <config.h> #include <config.h>
#include "gicon.h"
#include "gemblem.h" #include "gemblem.h"
#include "glibintl.h" #include "glibintl.h"
#include "gioenums.h" #include "gioenums.h"

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2008 Clemens N. Buss <cebuzz@gmail.com> * Copyright (C) 2008 Clemens N. Buss <cebuzz@gmail.com>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
* *
*/ */
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly." #error "Only <gio/gio.h> can be included directly."
#endif #endif
@ -26,10 +26,8 @@
#ifndef __G_EMBLEM_H__ #ifndef __G_EMBLEM_H__
#define __G_EMBLEM_H__ #define __G_EMBLEM_H__
#include <gio/gicon.h>
#include <gio/gioenums.h> #include <gio/gioenums.h>
G_BEGIN_DECLS G_BEGIN_DECLS
#define G_TYPE_EMBLEM (g_emblem_get_type ()) #define G_TYPE_EMBLEM (g_emblem_get_type ())
@ -41,14 +39,14 @@ G_BEGIN_DECLS
/** /**
* GEmblem: * GEmblem:
* *
* An object for Emblems * An object for Emblems
*/ */
typedef struct _GEmblem GEmblem; typedef struct _GEmblem GEmblem;
typedef struct _GEmblemClass GEmblemClass; typedef struct _GEmblemClass GEmblemClass;
GType g_emblem_get_type (void) G_GNUC_CONST; GType g_emblem_get_type (void) G_GNUC_CONST;
GEmblem *g_emblem_new (GIcon *icon); GEmblem *g_emblem_new (GIcon *icon);
GEmblem *g_emblem_new_with_origin (GIcon *icon, GEmblem *g_emblem_new_with_origin (GIcon *icon,
GEmblemOrigin origin); GEmblemOrigin origin);

View File

@ -1,5 +1,5 @@
/* Gio - GLib Input, Output and Streaming Library /* Gio - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -29,8 +29,7 @@
#define __G_EMBLEMED_ICON_H__ #define __G_EMBLEMED_ICON_H__
#include <gio/gicon.h> #include <gio/gicon.h>
#include <gio/gemblem.h>
#include "gemblem.h"
G_BEGIN_DECLS G_BEGIN_DECLS
@ -43,22 +42,21 @@ G_BEGIN_DECLS
/** /**
* GEmblemedIcon: * GEmblemedIcon:
* *
* An implementation of #GIcon for icons with emblems. * An implementation of #GIcon for icons with emblems.
**/ **/
typedef struct _GEmblemedIcon GEmblemedIcon; typedef struct _GEmblemedIcon GEmblemedIcon;
typedef struct _GEmblemedIconClass GEmblemedIconClass; typedef struct _GEmblemedIconClass GEmblemedIconClass;
GType g_emblemed_icon_get_type (void) G_GNUC_CONST; GType g_emblemed_icon_get_type (void) G_GNUC_CONST;
GIcon *g_emblemed_icon_new (GIcon *icon, GIcon *g_emblemed_icon_new (GIcon *icon,
GEmblem *emblem); GEmblem *emblem);
GIcon *g_emblemed_icon_get_icon (GEmblemedIcon *emblemed); GIcon *g_emblemed_icon_get_icon (GEmblemedIcon *emblemed);
GList *g_emblemed_icon_get_emblems (GEmblemedIcon *emblemed); GList *g_emblemed_icon_get_emblems (GEmblemedIcon *emblemed);
void g_emblemed_icon_add_emblem (GEmblemedIcon *emblemed, void g_emblemed_icon_add_emblem (GEmblemedIcon *emblemed,
GEmblem *emblem); GEmblem *emblem);
G_END_DECLS G_END_DECLS
#endif /* __G_EMBLEMED_ICON_H__ */ #endif /* __G_EMBLEMED_ICON_H__ */

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -39,9 +39,9 @@ G_BEGIN_DECLS
#if 0 #if 0
/** /**
* GFile: * GFile:
* *
* A handle to an object implementing the #GFileIface interface. * A handle to an object implementing the #GFileIface interface.
* Generally stores a location within the file system. Handles do not * Generally stores a location within the file system. Handles do not
* necessarily represent files or directories that currently exist. * necessarily represent files or directories that currently exist.
**/ **/
typedef struct _GFile GFile; /* Dummy typedef */ typedef struct _GFile GFile; /* Dummy typedef */
@ -59,7 +59,7 @@ typedef struct _GFileIface GFileIface;
* @has_uri_scheme: Checks to see if a #GFile has a given URI scheme. * @has_uri_scheme: Checks to see if a #GFile has a given URI scheme.
* @get_uri_scheme: Gets the URI scheme for a #GFile. * @get_uri_scheme: Gets the URI scheme for a #GFile.
* @get_basename: Gets the basename for a given #GFile. * @get_basename: Gets the basename for a given #GFile.
* @get_path: Gets the current path within a #GFile. * @get_path: Gets the current path within a #GFile.
* @get_uri: Gets a URI for the path within a #GFile. * @get_uri: Gets a URI for the path within a #GFile.
* @get_parse_name: Gets the parsed name for the #GFile. * @get_parse_name: Gets the parsed name for the #GFile.
* @get_parent: Gets the parent directory for the #GFile. * @get_parent: Gets the parent directory for the #GFile.
@ -120,7 +120,7 @@ typedef struct _GFileIface GFileIface;
* @copy_async: Asynchronously copies a file. * @copy_async: Asynchronously copies a file.
* @copy_finish: Finishes an asynchronous copy operation. * @copy_finish: Finishes an asynchronous copy operation.
* @move: Moves a file. * @move: Moves a file.
* @_move_async: Asynchronously moves a file. * @_move_async: Asynchronously moves a file.
* @_move_finish: Finishes an asynchronous move operation. * @_move_finish: Finishes an asynchronous move operation.
* @mount_mountable: Mounts a mountable object. * @mount_mountable: Mounts a mountable object.
* @mount_mountable_finish: Finishes a mounting operation. * @mount_mountable_finish: Finishes a mounting operation.
@ -128,315 +128,312 @@ typedef struct _GFileIface GFileIface;
* @unmount_mountable_finish: Finishes an unmount operation. * @unmount_mountable_finish: Finishes an unmount operation.
* @eject_mountable: Ejects a mountable. * @eject_mountable: Ejects a mountable.
* @eject_mountable_finish: Finishes an eject operation. * @eject_mountable_finish: Finishes an eject operation.
* @mount_enclosing_volume: Mounts a specified location. * @mount_enclosing_volume: Mounts a specified location.
* @mount_enclosing_volume_finish: Finishes mounting a specified location. * @mount_enclosing_volume_finish: Finishes mounting a specified location.
* @monitor_dir: Creates a #GFileMonitor for the location. * @monitor_dir: Creates a #GFileMonitor for the location.
* @monitor_file: Creates a #GFileMonitor for the location. * @monitor_file: Creates a #GFileMonitor for the location.
* *
* An interface for writing VFS file handles. * An interface for writing VFS file handles.
**/ **/
struct _GFileIface struct _GFileIface
{ {
GTypeInterface g_iface; GTypeInterface g_iface;
/* Virtual Table */ /* Virtual Table */
GFile * (*dup) (GFile *file); GFile * (* dup) (GFile *file);
guint (*hash) (GFile *file); guint (* hash) (GFile *file);
gboolean (*equal) (GFile *file1, gboolean (* equal) (GFile *file1,
GFile *file2); GFile *file2);
gboolean (*is_native) (GFile *file); gboolean (* is_native) (GFile *file);
gboolean (*has_uri_scheme) (GFile *file, gboolean (* has_uri_scheme) (GFile *file,
const char *uri_scheme); const char *uri_scheme);
char * (*get_uri_scheme) (GFile *file); char * (* get_uri_scheme) (GFile *file);
char * (*get_basename) (GFile *file); char * (* get_basename) (GFile *file);
char * (*get_path) (GFile *file); char * (* get_path) (GFile *file);
char * (*get_uri) (GFile *file); char * (* get_uri) (GFile *file);
char * (*get_parse_name) (GFile *file); char * (* get_parse_name) (GFile *file);
GFile * (*get_parent) (GFile *file); GFile * (* get_parent) (GFile *file);
gboolean (*prefix_matches) (GFile *prefix, gboolean (* prefix_matches) (GFile *prefix,
GFile *file); GFile *file);
char * (*get_relative_path) (GFile *parent, char * (* get_relative_path) (GFile *parent,
GFile *descendant); GFile *descendant);
GFile * (*resolve_relative_path) (GFile *file, GFile * (* resolve_relative_path) (GFile *file,
const char *relative_path); const char *relative_path);
GFile * (*get_child_for_display_name) (GFile *file, GFile * (* get_child_for_display_name) (GFile *file,
const char *display_name, const char *display_name,
GError **error); GError **error);
GFileEnumerator * (*enumerate_children) (GFile *file, GFileEnumerator * (* enumerate_children) (GFile *file,
const char *attributes, const char *attributes,
GFileQueryInfoFlags flags, GFileQueryInfoFlags flags,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
void (*enumerate_children_async) (GFile *file, void (* enumerate_children_async) (GFile *file,
const char *attributes, const char *attributes,
GFileQueryInfoFlags flags, GFileQueryInfoFlags flags,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
GFileEnumerator * (*enumerate_children_finish) (GFile *file, GFileEnumerator * (* enumerate_children_finish) (GFile *file,
GAsyncResult *res,
GError **error);
GFileInfo * (*query_info) (GFile *file,
const char *attributes,
GFileQueryInfoFlags flags,
GCancellable *cancellable,
GError **error);
void (*query_info_async) (GFile *file,
const char *attributes,
GFileQueryInfoFlags flags,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFileInfo * (*query_info_finish) (GFile *file,
GAsyncResult *res,
GError **error);
GFileInfo * (*query_filesystem_info)(GFile *file,
const char *attributes,
GCancellable *cancellable,
GError **error);
void (*query_filesystem_info_async) (GFile *file,
const char *attributes,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFileInfo * (*query_filesystem_info_finish) (GFile *file,
GAsyncResult *res, GAsyncResult *res,
GError **error); GError **error);
GMount * (*find_enclosing_mount)(GFile *file,
GCancellable *cancellable,
GError **error);
void (*find_enclosing_mount_async)(GFile *file,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GMount * (*find_enclosing_mount_finish)(GFile *file,
GAsyncResult *res,
GError **error);
GFile * (*set_display_name) (GFile *file,
const char *display_name,
GCancellable *cancellable,
GError **error);
void (*set_display_name_async) (GFile *file,
const char *display_name,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFile * (*set_display_name_finish) (GFile *file,
GAsyncResult *res,
GError **error);
GFileAttributeInfoList * (*query_settable_attributes) (GFile *file,
GCancellable *cancellable,
GError **error);
void (*_query_settable_attributes_async) (void);
void (*_query_settable_attributes_finish) (void);
GFileAttributeInfoList * (*query_writable_namespaces) (GFile *file,
GCancellable *cancellable,
GError **error);
void (*_query_writable_namespaces_async) (void);
void (*_query_writable_namespaces_finish) (void);
gboolean (*set_attribute) (GFile *file,
const char *attribute,
GFileAttributeType type,
gpointer value_p,
GFileQueryInfoFlags flags,
GCancellable *cancellable,
GError **error);
gboolean (*set_attributes_from_info) (GFile *file,
GFileInfo *info,
GFileQueryInfoFlags flags,
GCancellable *cancellable,
GError **error);
void (*set_attributes_async) (GFile *file,
GFileInfo *info,
GFileQueryInfoFlags flags,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*set_attributes_finish) (GFile *file,
GAsyncResult *result,
GFileInfo **info,
GError **error);
GFileInputStream * (*read_fn) (GFile *file,
GCancellable *cancellable,
GError **error);
void (*read_async) (GFile *file,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFileInputStream * (*read_finish) (GFile *file,
GAsyncResult *res,
GError **error);
GFileOutputStream * (*append_to) (GFile *file,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
void (*append_to_async) (GFile *file,
GFileCreateFlags flags,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFileOutputStream * (*append_to_finish) (GFile *file,
GAsyncResult *res,
GError **error);
GFileOutputStream * (*create) (GFile *file,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
void (*create_async) (GFile *file,
GFileCreateFlags flags,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFileOutputStream * (*create_finish) (GFile *file,
GAsyncResult *res,
GError **error);
GFileOutputStream * (*replace) (GFile *file,
const char *etag,
gboolean make_backup,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
void (*replace_async) (GFile *file,
const char *etag,
gboolean make_backup,
GFileCreateFlags flags,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFileOutputStream * (*replace_finish) (GFile *file,
GAsyncResult *res,
GError **error);
gboolean (*delete_file) (GFile *file,
GCancellable *cancellable,
GError **error);
void (*_delete_file_async) (void);
void (*_delete_file_finish) (void);
gboolean (*trash) (GFile *file,
GCancellable *cancellable,
GError **error);
void (*_trash_async) (void);
void (*_trash_finish) (void);
gboolean (*make_directory) (GFile *file,
GCancellable *cancellable,
GError **error);
void (*_make_directory_async) (void);
void (*_make_directory_finish) (void);
gboolean (*make_symbolic_link) (GFile *file,
const char *symlink_value,
GCancellable *cancellable,
GError **error);
void (*_make_symbolic_link_async) (void);
void (*_make_symbolic_link_finish) (void);
gboolean (*copy) (GFile *source,
GFile *destination,
GFileCopyFlags flags,
GCancellable *cancellable,
GFileProgressCallback progress_callback,
gpointer progress_callback_data,
GError **error);
void (*copy_async) (GFile *source,
GFile *destination,
GFileCopyFlags flags,
int io_priority,
GCancellable *cancellable,
GFileProgressCallback progress_callback,
gpointer progress_callback_data,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*copy_finish) (GFile *file,
GAsyncResult *res,
GError **error);
gboolean (*move) (GFile *source,
GFile *destination,
GFileCopyFlags flags,
GCancellable *cancellable,
GFileProgressCallback progress_callback,
gpointer progress_callback_data,
GError **error);
void (*_move_async) (void); GFileInfo * (* query_info) (GFile *file,
void (*_move_finish) (void); const char *attributes,
GFileQueryInfoFlags flags,
GCancellable *cancellable,
GError **error);
void (* query_info_async) (GFile *file,
const char *attributes,
GFileQueryInfoFlags flags,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFileInfo * (* query_info_finish) (GFile *file,
GAsyncResult *res,
GError **error);
GFileInfo * (* query_filesystem_info) (GFile *file,
const char *attributes,
GCancellable *cancellable,
GError **error);
void (* query_filesystem_info_async) (GFile *file,
const char *attributes,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFileInfo * (* query_filesystem_info_finish)(GFile *file,
GAsyncResult *res,
GError **error);
void (*mount_mountable) (GFile *file, GMount * (* find_enclosing_mount) (GFile *file,
GMountMountFlags flags, GCancellable *cancellable,
GMountOperation *mount_operation, GError **error);
GCancellable *cancellable, void (* find_enclosing_mount_async) (GFile *file,
GAsyncReadyCallback callback, int io_priority,
gpointer user_data); GCancellable *cancellable,
GFile * (*mount_mountable_finish) (GFile *file, GAsyncReadyCallback callback,
GAsyncResult *result, gpointer user_data);
GError **error); GMount * (* find_enclosing_mount_finish) (GFile *file,
void (*unmount_mountable) (GFile *file, GAsyncResult *res,
GMountUnmountFlags flags, GError **error);
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*unmount_mountable_finish) (GFile *file,
GAsyncResult *result,
GError **error);
void (*eject_mountable) (GFile *file,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*eject_mountable_finish) (GFile *file,
GAsyncResult *result,
GError **error);
GFile * (* set_display_name) (GFile *file,
const char *display_name,
GCancellable *cancellable,
GError **error);
void (* set_display_name_async) (GFile *file,
const char *display_name,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFile * (* set_display_name_finish) (GFile *file,
GAsyncResult *res,
GError **error);
void (*mount_enclosing_volume) (GFile *location, GFileAttributeInfoList * (* query_settable_attributes) (GFile *file,
GMountMountFlags flags, GCancellable *cancellable,
GMountOperation *mount_operation, GError **error);
GCancellable *cancellable, void (* _query_settable_attributes_async) (void);
GAsyncReadyCallback callback, void (* _query_settable_attributes_finish) (void);
gpointer user_data);
gboolean (*mount_enclosing_volume_finish) (GFile *location,
GAsyncResult *result,
GError **error);
GFileMonitor* (*monitor_dir) (GFile *file,
GFileMonitorFlags flags,
GCancellable *cancellable,
GError **error);
GFileMonitor* (*monitor_file) (GFile *file, GFileAttributeInfoList * (* query_writable_namespaces) (GFile *file,
GFileMonitorFlags flags, GCancellable *cancellable,
GCancellable *cancellable, GError **error);
GError **error); void (* _query_writable_namespaces_async) (void);
void (* _query_writable_namespaces_finish) (void);
gboolean (* set_attribute) (GFile *file,
const char *attribute,
GFileAttributeType type,
gpointer value_p,
GFileQueryInfoFlags flags,
GCancellable *cancellable,
GError **error);
gboolean (* set_attributes_from_info) (GFile *file,
GFileInfo *info,
GFileQueryInfoFlags flags,
GCancellable *cancellable,
GError **error);
void (* set_attributes_async) (GFile *file,
GFileInfo *info,
GFileQueryInfoFlags flags,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* set_attributes_finish) (GFile *file,
GAsyncResult *result,
GFileInfo **info,
GError **error);
GFileInputStream * (* read_fn) (GFile *file,
GCancellable *cancellable,
GError **error);
void (* read_async) (GFile *file,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFileInputStream * (* read_finish) (GFile *file,
GAsyncResult *res,
GError **error);
GFileOutputStream * (* append_to) (GFile *file,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
void (* append_to_async) (GFile *file,
GFileCreateFlags flags,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFileOutputStream * (* append_to_finish) (GFile *file,
GAsyncResult *res,
GError **error);
GFileOutputStream * (* create) (GFile *file,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
void (* create_async) (GFile *file,
GFileCreateFlags flags,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFileOutputStream * (* create_finish) (GFile *file,
GAsyncResult *res,
GError **error);
GFileOutputStream * (* replace) (GFile *file,
const char *etag,
gboolean make_backup,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
void (* replace_async) (GFile *file,
const char *etag,
gboolean make_backup,
GFileCreateFlags flags,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFileOutputStream * (* replace_finish) (GFile *file,
GAsyncResult *res,
GError **error);
gboolean (* delete_file) (GFile *file,
GCancellable *cancellable,
GError **error);
void (* _delete_file_async) (void);
void (* _delete_file_finish) (void);
gboolean (* trash) (GFile *file,
GCancellable *cancellable,
GError **error);
void (* _trash_async) (void);
void (* _trash_finish) (void);
gboolean (* make_directory) (GFile *file,
GCancellable *cancellable,
GError **error);
void (* _make_directory_async) (void);
void (* _make_directory_finish) (void);
gboolean (* make_symbolic_link) (GFile *file,
const char *symlink_value,
GCancellable *cancellable,
GError **error);
void (* _make_symbolic_link_async) (void);
void (* _make_symbolic_link_finish) (void);
gboolean (* copy) (GFile *source,
GFile *destination,
GFileCopyFlags flags,
GCancellable *cancellable,
GFileProgressCallback progress_callback,
gpointer progress_callback_data,
GError **error);
void (* copy_async) (GFile *source,
GFile *destination,
GFileCopyFlags flags,
int io_priority,
GCancellable *cancellable,
GFileProgressCallback progress_callback,
gpointer progress_callback_data,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* copy_finish) (GFile *file,
GAsyncResult *res,
GError **error);
gboolean (* move) (GFile *source,
GFile *destination,
GFileCopyFlags flags,
GCancellable *cancellable,
GFileProgressCallback progress_callback,
gpointer progress_callback_data,
GError **error);
void (* _move_async) (void);
void (* _move_finish) (void);
void (* mount_mountable) (GFile *file,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GFile * (* mount_mountable_finish) (GFile *file,
GAsyncResult *result,
GError **error);
void (* unmount_mountable) (GFile *file,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* unmount_mountable_finish) (GFile *file,
GAsyncResult *result,
GError **error);
void (* eject_mountable) (GFile *file,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* eject_mountable_finish) (GFile *file,
GAsyncResult *result,
GError **error);
void (* mount_enclosing_volume) (GFile *location,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* mount_enclosing_volume_finish) (GFile *location,
GAsyncResult *result,
GError **error);
GFileMonitor * (* monitor_dir) (GFile *file,
GFileMonitorFlags flags,
GCancellable *cancellable,
GError **error);
GFileMonitor * (* monitor_file) (GFile *file,
GFileMonitorFlags flags,
GCancellable *cancellable,
GError **error);
}; };
GType g_file_get_type (void) G_GNUC_CONST; GType g_file_get_type (void) G_GNUC_CONST;
GFile * g_file_new_for_path (const char *path); GFile * g_file_new_for_path (const char *path);
GFile * g_file_new_for_uri (const char *uri); GFile * g_file_new_for_uri (const char *uri);

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -36,26 +36,28 @@ G_BEGIN_DECLS
* @name: the name of the attribute. * @name: the name of the attribute.
* @type: the #GFileAttributeType type of the attribute. * @type: the #GFileAttributeType type of the attribute.
* @flags: a set of #GFileAttributeInfoFlags. * @flags: a set of #GFileAttributeInfoFlags.
* *
* Information about a specific attribute. * Information about a specific attribute.
**/ **/
struct _GFileAttributeInfo { struct _GFileAttributeInfo
char *name; {
GFileAttributeType type; char *name;
GFileAttributeInfoFlags flags; GFileAttributeType type;
GFileAttributeInfoFlags flags;
}; };
/** /**
* GFileAttributeInfoList: * GFileAttributeInfoList:
* @infos: an array of #GFileAttributeInfo<!-- -->s. * @infos: an array of #GFileAttributeInfo<!-- -->s.
* @n_infos: the number of values in the array. * @n_infos: the number of values in the array.
* *
* Acts as a lightweight registry for possible valid file attributes. * Acts as a lightweight registry for possible valid file attributes.
* The registry stores Key-Value pair formats as #GFileAttributeInfo<!-- -->s. * The registry stores Key-Value pair formats as #GFileAttributeInfo<!-- -->s.
**/ **/
struct _GFileAttributeInfoList { struct _GFileAttributeInfoList
{
GFileAttributeInfo *infos; GFileAttributeInfo *infos;
int n_infos; int n_infos;
}; };
GFileAttributeInfoList * g_file_attribute_info_list_new (void); GFileAttributeInfoList * g_file_attribute_info_list_new (void);
@ -71,5 +73,4 @@ void g_file_attribute_info_list_add (GFileAttributeInfoL
G_END_DECLS G_END_DECLS
#endif /* __G_FILE_INFO_H__ */ #endif /* __G_FILE_INFO_H__ */

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -31,7 +31,6 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define G_TYPE_FILE_ENUMERATOR (g_file_enumerator_get_type ()) #define G_TYPE_FILE_ENUMERATOR (g_file_enumerator_get_type ())
#define G_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_ENUMERATOR, GFileEnumerator)) #define G_FILE_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_FILE_ENUMERATOR, GFileEnumerator))
#define G_FILE_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_ENUMERATOR, GFileEnumeratorClass)) #define G_FILE_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_FILE_ENUMERATOR, GFileEnumeratorClass))
@ -42,7 +41,7 @@ G_BEGIN_DECLS
/** /**
* GFileEnumerator: * GFileEnumerator:
* @parent_instance: The parent class. * @parent_instance: The parent class.
* *
* A per matched file iterator. * A per matched file iterator.
**/ **/
typedef struct _GFileEnumeratorClass GFileEnumeratorClass; typedef struct _GFileEnumeratorClass GFileEnumeratorClass;
@ -51,7 +50,7 @@ typedef struct _GFileEnumeratorPrivate GFileEnumeratorPrivate;
struct _GFileEnumerator struct _GFileEnumerator
{ {
GObject parent_instance; GObject parent_instance;
/*< private >*/ /*< private >*/
GFileEnumeratorPrivate *priv; GFileEnumeratorPrivate *priv;
}; };
@ -62,30 +61,30 @@ struct _GFileEnumeratorClass
/* Virtual Table */ /* Virtual Table */
GFileInfo *(*next_file) (GFileEnumerator *enumerator, GFileInfo * (* next_file) (GFileEnumerator *enumerator,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
gboolean (*close_fn) (GFileEnumerator *enumerator, gboolean (* close_fn) (GFileEnumerator *enumerator,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
void (*next_files_async) (GFileEnumerator *enumerator, void (* next_files_async) (GFileEnumerator *enumerator,
int num_files, int num_files,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
GList * (*next_files_finish) (GFileEnumerator *enumerator, GList * (* next_files_finish) (GFileEnumerator *enumerator,
GAsyncResult *res, GAsyncResult *res,
GError **error); GError **error);
void (*close_async) (GFileEnumerator *enumerator, void (* close_async) (GFileEnumerator *enumerator,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gboolean (*close_finish) (GFileEnumerator *enumerator, gboolean (* close_finish) (GFileEnumerator *enumerator,
GAsyncResult *res, GAsyncResult *res,
GError **error); GError **error);
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
@ -98,7 +97,7 @@ struct _GFileEnumeratorClass
void (*_g_reserved7) (void); void (*_g_reserved7) (void);
}; };
GType g_file_enumerator_get_type (void) G_GNUC_CONST; GType g_file_enumerator_get_type (void) G_GNUC_CONST;
GFileInfo *g_file_enumerator_next_file (GFileEnumerator *enumerator, GFileInfo *g_file_enumerator_next_file (GFileEnumerator *enumerator,
GCancellable *cancellable, GCancellable *cancellable,

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -40,16 +40,16 @@ G_BEGIN_DECLS
/** /**
* GFileIcon: * GFileIcon:
* *
* Gets an icon for a #GFile. Implements #GLoadableIcon. * Gets an icon for a #GFile. Implements #GLoadableIcon.
**/ **/
typedef struct _GFileIconClass GFileIconClass; typedef struct _GFileIconClass GFileIconClass;
GType g_file_icon_get_type (void) G_GNUC_CONST; GType g_file_icon_get_type (void) G_GNUC_CONST;
GIcon *g_file_icon_new (GFile *file);
GFile *g_file_icon_get_file (GFileIcon *icon); GIcon * g_file_icon_new (GFile *file);
GFile * g_file_icon_get_file (GFileIcon *icon);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -40,7 +40,7 @@ G_BEGIN_DECLS
/** /**
* GFileInfo: * GFileInfo:
* *
* Stores information about a file system object referenced by a #GFile. * Stores information about a file system object referenced by a #GFile.
**/ **/
typedef struct _GFileInfoClass GFileInfoClass; typedef struct _GFileInfoClass GFileInfoClass;
@ -49,8 +49,8 @@ typedef struct _GFileInfoClass GFileInfoClass;
/* Common Attributes: */ /* Common Attributes: */
/** /**
* G_FILE_ATTRIBUTE_STANDARD_TYPE: * G_FILE_ATTRIBUTE_STANDARD_TYPE:
* *
* A key in the "standard" namespace for storing file types. * A key in the "standard" namespace for storing file types.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
* The value for this key should contain a #GFileType. * The value for this key should contain a #GFileType.
**/ **/
@ -58,15 +58,15 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN: * G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN:
* *
* A key in the "standard" namespace for checking if a file is hidden. * A key in the "standard" namespace for checking if a file is hidden.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
**/ **/
#define G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "standard::is-hidden" /* boolean */ #define G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "standard::is-hidden" /* boolean */
/** /**
* G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP: * G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP:
* *
* A key in the "standard" namespace for checking if a file is a backup file. * A key in the "standard" namespace for checking if a file is a backup file.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
**/ **/
@ -74,7 +74,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK: * G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK:
* *
* A key in the "standard" namespace for checking if the file is a symlink. * A key in the "standard" namespace for checking if the file is a symlink.
* Typically the actual type is something else, if we followed the symlink * Typically the actual type is something else, if we followed the symlink
* to get the type. * to get the type.
@ -84,7 +84,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL: * G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL:
* *
* A key in the "standard" namespace for checking if a file is virtual. * A key in the "standard" namespace for checking if a file is virtual.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
**/ **/
@ -92,7 +92,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_STANDARD_NAME: * G_FILE_ATTRIBUTE_STANDARD_NAME:
* *
* A key in the "standard" namespace for getting the name of the file. * A key in the "standard" namespace for getting the name of the file.
* The name is the on-disk filename which may not be in any known encoding, * The name is the on-disk filename which may not be in any known encoding,
* and can thus not be generally displayed as is. * and can thus not be generally displayed as is.
@ -104,7 +104,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME: * G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME:
* *
* A key in the "standard" namespace for getting the display name of the file. * A key in the "standard" namespace for getting the display name of the file.
* A display name is guaranteed to be in UTF8 and can thus be displayed in * A display name is guaranteed to be in UTF8 and can thus be displayed in
* the UI. * the UI.
@ -114,48 +114,48 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME: * G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME:
* *
* A key in the "standard" namespace for edit name of the file. * A key in the "standard" namespace for edit name of the file.
* An edit name is similar to the display name, but it is meant to be * An edit name is similar to the display name, but it is meant to be
* used when you want to rename the file in the UI. The display name * used when you want to rename the file in the UI. The display name
* might contain information you don't want in the new filename (such as * might contain information you don't want in the new filename (such as
* "(invalid unicode)" if the filename was in an invalid encoding). * "(invalid unicode)" if the filename was in an invalid encoding).
* *
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
**/ **/
#define G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME "standard::edit-name" /* string */ #define G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME "standard::edit-name" /* string */
/** /**
* G_FILE_ATTRIBUTE_STANDARD_COPY_NAME: * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
* *
* A key in the "standard" namespace for getting the copy name of the file. * A key in the "standard" namespace for getting the copy name of the file.
* The copy name is an optional version of the name. If availible its always * The copy name is an optional version of the name. If availible its always
* in UTF8, and corresponds directly to the original filename (only transcoded to * in UTF8, and corresponds directly to the original filename (only transcoded to
* UTF8). This is useful if you want to copy the file to another filesystem that * UTF8). This is useful if you want to copy the file to another filesystem that
* might have a different encoding. If the filename is not a valid string in the * might have a different encoding. If the filename is not a valid string in the
* encoding selected for the filesystem it is in then the copy name will not be set. * encoding selected for the filesystem it is in then the copy name will not be set.
* *
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
**/ **/
#define G_FILE_ATTRIBUTE_STANDARD_COPY_NAME "standard::copy-name" /* string */ #define G_FILE_ATTRIBUTE_STANDARD_COPY_NAME "standard::copy-name" /* string */
/** /**
* G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION: * G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION:
* *
* A key in the "standard" namespace for getting the description of the file. * A key in the "standard" namespace for getting the description of the file.
* The description is a utf8 string that describes the file, generally containing * The description is a utf8 string that describes the file, generally containing
* the filename, but can also contain furter information. Example descriptions * the filename, but can also contain furter information. Example descriptions
* could be "filename (on hostname)" for a remote file or "filename (in trash)" * could be "filename (on hostname)" for a remote file or "filename (in trash)"
* for a file in the trash. This is useful for instance as the window title * for a file in the trash. This is useful for instance as the window title
* when displaying a directory or for a bookmarks menu. * when displaying a directory or for a bookmarks menu.
* *
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
**/ **/
#define G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION "standard::description" /* string */ #define G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION "standard::description" /* string */
/** /**
* G_FILE_ATTRIBUTE_STANDARD_ICON: * G_FILE_ATTRIBUTE_STANDARD_ICON:
* *
* A key in the "standard" namespace for getting the icon for the file. * A key in the "standard" namespace for getting the icon for the file.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
* The value for this key should contain a #GIcon. * The value for this key should contain a #GIcon.
@ -164,7 +164,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE: * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
* *
* A key in the "standard" namespace for getting the content type of the file. * A key in the "standard" namespace for getting the content type of the file.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
* The value for this key should contain a valid content type. * The value for this key should contain a valid content type.
@ -173,19 +173,19 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE: * G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE:
* *
* A key in the "standard" namespace for getting the fast content type. * A key in the "standard" namespace for getting the fast content type.
* The fast content type isn't as reliable as the regular one, as it * The fast content type isn't as reliable as the regular one, as it
* only uses the filename to guess it, but it is faster to calculate than the * only uses the filename to guess it, but it is faster to calculate than the
* regular content type. * regular content type.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
* *
**/ **/
#define G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE "standard::fast-content-type" /* string */ #define G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE "standard::fast-content-type" /* string */
/** /**
* G_FILE_ATTRIBUTE_STANDARD_SIZE: * G_FILE_ATTRIBUTE_STANDARD_SIZE:
* *
* A key in the "standard" namespace for getting the file's size (in bytes). * A key in the "standard" namespace for getting the file's size (in bytes).
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
**/ **/
@ -193,16 +193,16 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET: * G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET:
* *
* A key in the "standard" namespace for getting the symlink target, if the file * A key in the "standard" namespace for getting the symlink target, if the file
* is a symlink. Corresponding #GFileAttributeType is * is a symlink. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
**/ **/
#define G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET "standard::symlink-target" /* byte string */ #define G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET "standard::symlink-target" /* byte string */
/** /**
* G_FILE_ATTRIBUTE_STANDARD_TARGET_URI: * G_FILE_ATTRIBUTE_STANDARD_TARGET_URI:
* *
* A key in the "standard" namespace for getting the target URI for the file, in * A key in the "standard" namespace for getting the target URI for the file, in
* the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files. * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
@ -211,10 +211,10 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER: * G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER:
* *
* A key in the "standard" namespace for setting the sort order of a file. * A key in the "standard" namespace for setting the sort order of a file.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
* An example use would be in file managers, which would use this key * An example use would be in file managers, which would use this key
* to set the order files are displayed. Files with smaller sort order * to set the order files are displayed. Files with smaller sort order
* should be sorted first, and files without sort order as if sort order * should be sorted first, and files without sort order as if sort order
* was zero. * was zero.
@ -225,20 +225,20 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_ETAG_VALUE: * G_FILE_ATTRIBUTE_ETAG_VALUE:
* *
* A key in the "etag" namespace for getting the value of the file's * A key in the "etag" namespace for getting the value of the file's
* entity tag. Corresponding #GFileAttributeType is * entity tag. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_STRING. * %G_FILE_ATTRIBUTE_TYPE_STRING.
**/ **/
#define G_FILE_ATTRIBUTE_ETAG_VALUE "etag::value" /* string */ #define G_FILE_ATTRIBUTE_ETAG_VALUE "etag::value" /* string */
/* File identifier, for e.g. avoiding loops when doing recursive /* File identifier, for e.g. avoiding loops when doing recursive
* directory scanning * directory scanning
*/ */
/** /**
* G_FILE_ATTRIBUTE_ID_FILE: * G_FILE_ATTRIBUTE_ID_FILE:
* *
* A key in the "id" namespace for getting a file identifier. * A key in the "id" namespace for getting a file identifier.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
* An example use would be during listing files, to avoid recursive * An example use would be during listing files, to avoid recursive
@ -248,7 +248,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_ID_FILESYSTEM: * G_FILE_ATTRIBUTE_ID_FILESYSTEM:
* *
* A key in the "id" namespace for getting the file system identifier. * A key in the "id" namespace for getting the file system identifier.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
* An example use would be during drag and drop to see if the source * An example use would be during drag and drop to see if the source
@ -261,8 +261,8 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_ACCESS_CAN_READ: * G_FILE_ATTRIBUTE_ACCESS_CAN_READ:
* *
* A key in the "access" namespace for getting read privileges. * A key in the "access" namespace for getting read privileges.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
* This attribute will be %TRUE if the user is able to read the file. * This attribute will be %TRUE if the user is able to read the file.
**/ **/
@ -270,7 +270,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE: * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE:
* *
* A key in the "access" namespace for getting write privileges. * A key in the "access" namespace for getting write privileges.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
* This attribute will be %TRUE if the user is able to write to the file. * This attribute will be %TRUE if the user is able to write to the file.
@ -279,7 +279,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE: * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE:
* *
* A key in the "access" namespace for getting execution privileges. * A key in the "access" namespace for getting execution privileges.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
* This attribute will be %TRUE if the user is able to execute the file. * This attribute will be %TRUE if the user is able to execute the file.
@ -288,7 +288,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE: * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE:
* *
* A key in the "access" namespace for checking deletion privileges. * A key in the "access" namespace for checking deletion privileges.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
* This attribute will be %TRUE if the user is able to delete the file. * This attribute will be %TRUE if the user is able to delete the file.
@ -297,22 +297,22 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH: * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH:
* *
* A key in the "access" namespace for checking trashing privileges. * A key in the "access" namespace for checking trashing privileges.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
* This attribute will be %TRUE if the user is able to move the file to * This attribute will be %TRUE if the user is able to move the file to
* the trash. * the trash.
**/ **/
#define G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH "access::can-trash" /* boolean */ #define G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH "access::can-trash" /* boolean */
/** /**
* G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME: * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME:
* *
* A key in the "access" namespace for checking renaming privileges. * A key in the "access" namespace for checking renaming privileges.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
* This attribute will be %TRUE if the user is able to rename the file. * This attribute will be %TRUE if the user is able to rename the file.
**/ **/
#define G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME "access::can-rename" /* boolean */ #define G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME "access::can-rename" /* boolean */
/* TODO: Should we have special version for directories? can_enumerate, etc */ /* TODO: Should we have special version for directories? can_enumerate, etc */
@ -320,7 +320,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT: * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT:
* *
* A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
**/ **/
@ -328,7 +328,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT: * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT:
* *
* A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable. * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
**/ **/
@ -336,7 +336,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT: * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT:
* *
* A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected. * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
**/ **/
@ -344,7 +344,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE: * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE:
* *
* A key in the "mountable" namespace for getting the unix device. * A key in the "mountable" namespace for getting the unix device.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
@ -352,7 +352,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI: * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
* *
* A key in the "mountable" namespace for getting the HAL UDI for the mountable * A key in the "mountable" namespace for getting the HAL UDI for the mountable
* file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
**/ **/
@ -362,49 +362,49 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_TIME_MODIFIED: * G_FILE_ATTRIBUTE_TIME_MODIFIED:
* *
* A key in the "time" namespace for getting the time the file was last * A key in the "time" namespace for getting the time the file was last
* modified. Corresponding #GFileAttributeType is * modified. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
* file was modified. * file was modified.
**/ **/
#define G_FILE_ATTRIBUTE_TIME_MODIFIED "time::modified" /* uint64 */ #define G_FILE_ATTRIBUTE_TIME_MODIFIED "time::modified" /* uint64 */
/** /**
* G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC: * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC:
* *
* A key in the "time" namespace for getting the miliseconds of the time * A key in the "time" namespace for getting the miliseconds of the time
* the file was last modified. This should be used in conjunction with * the file was last modified. This should be used in conjunction with
* #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_UINT32. * %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
#define G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC "time::modified-usec" /* uint32 */ #define G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC "time::modified-usec" /* uint32 */
/** /**
* G_FILE_ATTRIBUTE_TIME_ACCESS: * G_FILE_ATTRIBUTE_TIME_ACCESS:
* *
* A key in the "time" namespace for getting the time the file was last * A key in the "time" namespace for getting the time the file was last
* accessed. Corresponding #GFileAttributeType is * accessed. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the
* file was last accessed. * file was last accessed.
**/ **/
#define G_FILE_ATTRIBUTE_TIME_ACCESS "time::access" /* uint64 */ #define G_FILE_ATTRIBUTE_TIME_ACCESS "time::access" /* uint64 */
/** /**
* G_FILE_ATTRIBUTE_TIME_ACCESS_USEC: * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC:
* *
* A key in the "time" namespace for getting the microseconds of the time * A key in the "time" namespace for getting the microseconds of the time
* the file was last accessed. This should be used in conjunction with * the file was last accessed. This should be used in conjunction with
* #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_UINT32. * %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
#define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC "time::access-usec" /* uint32 */ #define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC "time::access-usec" /* uint32 */
/** /**
* G_FILE_ATTRIBUTE_TIME_CHANGED: * G_FILE_ATTRIBUTE_TIME_CHANGED:
* *
* A key in the "time" namespace for getting the time the file was last * A key in the "time" namespace for getting the time the file was last
* changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
* and contains the UNIX time since the file was last changed. * and contains the UNIX time since the file was last changed.
* *
* This corresponds to the traditional UNIX ctime. * This corresponds to the traditional UNIX ctime.
@ -413,19 +413,19 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_TIME_CHANGED_USEC: * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC:
* *
* A key in the "time" namespace for getting the microseconds of the time * A key in the "time" namespace for getting the microseconds of the time
* the file was last changed. This should be used in conjunction with * the file was last changed. This should be used in conjunction with
* #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_UINT32. * %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
#define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC "time::changed-usec" /* uint32 */ #define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC "time::changed-usec" /* uint32 */
/** /**
* G_FILE_ATTRIBUTE_TIME_CREATED: * G_FILE_ATTRIBUTE_TIME_CREATED:
* *
* A key in the "time" namespace for getting the time the file was created. * A key in the "time" namespace for getting the time the file was created.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64,
* and contains the UNIX time since the file was created. * and contains the UNIX time since the file was created.
* *
* This corresponds to the NTFS ctime. * This corresponds to the NTFS ctime.
@ -434,11 +434,11 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_TIME_CREATED_USEC: * G_FILE_ATTRIBUTE_TIME_CREATED_USEC:
* *
* A key in the "time" namespace for getting the microseconds of the time * A key in the "time" namespace for getting the microseconds of the time
* the file was created. This should be used in conjunction with * the file was created. This should be used in conjunction with
* #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_UINT32. * %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
#define G_FILE_ATTRIBUTE_TIME_CREATED_USEC "time::created-usec" /* uint32 */ #define G_FILE_ATTRIBUTE_TIME_CREATED_USEC "time::created-usec" /* uint32 */
@ -446,95 +446,95 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_UNIX_DEVICE: * G_FILE_ATTRIBUTE_UNIX_DEVICE:
* *
* A key in the "unix" namespace for getting the device id of the device the * A key in the "unix" namespace for getting the device id of the device the
* file is located on (see stat() documentation). This attribute is only * file is located on (see stat() documentation). This attribute is only
* available for UNIX file systems. Corresponding #GFileAttributeType is * available for UNIX file systems. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_UINT32. * %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
#define G_FILE_ATTRIBUTE_UNIX_DEVICE "unix::device" /* uint32 */ #define G_FILE_ATTRIBUTE_UNIX_DEVICE "unix::device" /* uint32 */
/** /**
* G_FILE_ATTRIBUTE_UNIX_INODE: * G_FILE_ATTRIBUTE_UNIX_INODE:
* *
* A key in the "unix" namespace for getting the inode of the file. * A key in the "unix" namespace for getting the inode of the file.
* This attribute is only available for UNIX file systems. Corresponding * This attribute is only available for UNIX file systems. Corresponding
* #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
**/ **/
#define G_FILE_ATTRIBUTE_UNIX_INODE "unix::inode" /* uint64 */ #define G_FILE_ATTRIBUTE_UNIX_INODE "unix::inode" /* uint64 */
/** /**
* G_FILE_ATTRIBUTE_UNIX_MODE: * G_FILE_ATTRIBUTE_UNIX_MODE:
* *
* A key in the "unix" namespace for getting the mode of the file * A key in the "unix" namespace for getting the mode of the file
* (e.g. whether the file is a regular file, symlink, etc). See lstat() * (e.g. whether the file is a regular file, symlink, etc). See lstat()
* documentation. This attribute is only available for UNIX file systems. * documentation. This attribute is only available for UNIX file systems.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
#define G_FILE_ATTRIBUTE_UNIX_MODE "unix::mode" /* uint32 */ #define G_FILE_ATTRIBUTE_UNIX_MODE "unix::mode" /* uint32 */
/** /**
* G_FILE_ATTRIBUTE_UNIX_NLINK: * G_FILE_ATTRIBUTE_UNIX_NLINK:
* *
* A key in the "unix" namespace for getting the number of hard links * A key in the "unix" namespace for getting the number of hard links
* for a file. See lstat() documentation. This attribute is only available * for a file. See lstat() documentation. This attribute is only available
* for UNIX file systems. Corresponding #GFileAttributeType is * for UNIX file systems. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_UINT32. * %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
#define G_FILE_ATTRIBUTE_UNIX_NLINK "unix::nlink" /* uint32 */ #define G_FILE_ATTRIBUTE_UNIX_NLINK "unix::nlink" /* uint32 */
/** /**
* G_FILE_ATTRIBUTE_UNIX_UID: * G_FILE_ATTRIBUTE_UNIX_UID:
* *
* A key in the "unix" namespace for getting the user ID for the file. * A key in the "unix" namespace for getting the user ID for the file.
* This attribute is only available for UNIX file systems. * This attribute is only available for UNIX file systems.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
#define G_FILE_ATTRIBUTE_UNIX_UID "unix::uid" /* uint32 */ #define G_FILE_ATTRIBUTE_UNIX_UID "unix::uid" /* uint32 */
/** /**
* G_FILE_ATTRIBUTE_UNIX_GID: * G_FILE_ATTRIBUTE_UNIX_GID:
* *
* A key in the "unix" namespace for getting the group ID for the file. * A key in the "unix" namespace for getting the group ID for the file.
* This attribute is only available for UNIX file systems. * This attribute is only available for UNIX file systems.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
#define G_FILE_ATTRIBUTE_UNIX_GID "unix::gid" /* uint32 */ #define G_FILE_ATTRIBUTE_UNIX_GID "unix::gid" /* uint32 */
/** /**
* G_FILE_ATTRIBUTE_UNIX_RDEV: * G_FILE_ATTRIBUTE_UNIX_RDEV:
* *
* A key in the "unix" namespace for getting the device ID for the file * A key in the "unix" namespace for getting the device ID for the file
* (if it is a special file). See lstat() documentation. This attribute * (if it is a special file). See lstat() documentation. This attribute
* is only available for UNIX file systems. Corresponding #GFileAttributeType * is only available for UNIX file systems. Corresponding #GFileAttributeType
* is %G_FILE_ATTRIBUTE_TYPE_UINT32. * is %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
#define G_FILE_ATTRIBUTE_UNIX_RDEV "unix::rdev" /* uint32 */ #define G_FILE_ATTRIBUTE_UNIX_RDEV "unix::rdev" /* uint32 */
/** /**
* G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE: * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE:
* *
* A key in the "unix" namespace for getting the block size for the file * A key in the "unix" namespace for getting the block size for the file
* system. This attribute is only available for UNIX file systems. * system. This attribute is only available for UNIX file systems.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
#define G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE "unix::block-size" /* uint32 */ #define G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE "unix::block-size" /* uint32 */
/** /**
* G_FILE_ATTRIBUTE_UNIX_BLOCKS: * G_FILE_ATTRIBUTE_UNIX_BLOCKS:
* *
* A key in the "unix" namespace for getting the number of blocks allocated * A key in the "unix" namespace for getting the number of blocks allocated
* for the file. This attribute is only available for UNIX file systems. * for the file. This attribute is only available for UNIX file systems.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
**/ **/
#define G_FILE_ATTRIBUTE_UNIX_BLOCKS "unix::blocks" /* uint64 */ #define G_FILE_ATTRIBUTE_UNIX_BLOCKS "unix::blocks" /* uint64 */
/** /**
* G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT: * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT:
* *
* A key in the "unix" namespace for checking if the file represents a * A key in the "unix" namespace for checking if the file represents a
* UNIX mount point. This attribute is %TRUE if the file is a UNIX mount * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount
* point. This attribute is only available for UNIX file systems. * point. This attribute is only available for UNIX file systems.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
**/ **/
#define G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT "unix::is-mountpoint" /* boolean */ #define G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT "unix::is-mountpoint" /* boolean */
@ -543,20 +543,20 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE: * G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE:
* *
* A key in the "dos" namespace for checking if the file's archive flag * A key in the "dos" namespace for checking if the file's archive flag
* is set. This attribute is %TRUE if the archive flag is set. This attribute * is set. This attribute is %TRUE if the archive flag is set. This attribute
* is only available for DOS file systems. Corresponding #GFileAttributeType * is only available for DOS file systems. Corresponding #GFileAttributeType
* is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
**/ **/
#define G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE "dos::is-archive" /* boolean */ #define G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE "dos::is-archive" /* boolean */
/** /**
* G_FILE_ATTRIBUTE_DOS_IS_SYSTEM: * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM:
* *
* A key in the "dos" namespace for checking if the file's backup flag * A key in the "dos" namespace for checking if the file's backup flag
* is set. This attribute is %TRUE if the backup flag is set. This attribute * is set. This attribute is %TRUE if the backup flag is set. This attribute
* is only available for DOS file systems. Corresponding #GFileAttributeType * is only available for DOS file systems. Corresponding #GFileAttributeType
* is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
**/ **/
#define G_FILE_ATTRIBUTE_DOS_IS_SYSTEM "dos::is-system" /* boolean */ #define G_FILE_ATTRIBUTE_DOS_IS_SYSTEM "dos::is-system" /* boolean */
@ -565,25 +565,25 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_OWNER_USER: * G_FILE_ATTRIBUTE_OWNER_USER:
* *
* A key in the "owner" namespace for getting the user name of the * A key in the "owner" namespace for getting the user name of the
* file's owner. Corresponding #GFileAttributeType is * file's owner. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_STRING. * %G_FILE_ATTRIBUTE_TYPE_STRING.
**/ **/
#define G_FILE_ATTRIBUTE_OWNER_USER "owner::user" /* string */ #define G_FILE_ATTRIBUTE_OWNER_USER "owner::user" /* string */
/** /**
* G_FILE_ATTRIBUTE_OWNER_USER_REAL: * G_FILE_ATTRIBUTE_OWNER_USER_REAL:
* *
* A key in the "owner" namespace for getting the real name of the * A key in the "owner" namespace for getting the real name of the
* user that owns the file. Corresponding #GFileAttributeType is * user that owns the file. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_STRING. * %G_FILE_ATTRIBUTE_TYPE_STRING.
**/ **/
#define G_FILE_ATTRIBUTE_OWNER_USER_REAL "owner::user-real" /* string */ #define G_FILE_ATTRIBUTE_OWNER_USER_REAL "owner::user-real" /* string */
/** /**
* G_FILE_ATTRIBUTE_OWNER_GROUP: * G_FILE_ATTRIBUTE_OWNER_GROUP:
* *
* A key in the "owner" namespace for getting the file owner's group. * A key in the "owner" namespace for getting the file owner's group.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
**/ **/
@ -593,18 +593,18 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_THUMBNAIL_PATH: * G_FILE_ATTRIBUTE_THUMBNAIL_PATH:
* *
* A key in the "thumbnail" namespace for getting the path to the thumbnail * A key in the "thumbnail" namespace for getting the path to the thumbnail
* image. Corresponding #GFileAttributeType is * image. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
**/ **/
#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail::path" /* bytestring */ #define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail::path" /* bytestring */
/** /**
* G_FILE_ATTRIBUTE_THUMBNAILING_FAILED: * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED:
* *
* A key in the "thumbnail" namespace for checking if thumbnailing failed. * A key in the "thumbnail" namespace for checking if thumbnailing failed.
* This attribute is %TRUE if thumbnailing failed. Corresponding * This attribute is %TRUE if thumbnailing failed. Corresponding
* #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
**/ **/
#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED "thumbnail::failed" /* boolean */ #define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED "thumbnail::failed" /* boolean */
@ -612,25 +612,25 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_FILESYSTEM_SIZE: * G_FILE_ATTRIBUTE_FILESYSTEM_SIZE:
* *
* A key in the "filesystem" namespace for getting the total size (in bytes) of the file system, * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system,
* used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType
* is %G_FILE_ATTRIBUTE_TYPE_UINT64. * is %G_FILE_ATTRIBUTE_TYPE_UINT64.
**/ **/
#define G_FILE_ATTRIBUTE_FILESYSTEM_SIZE "filesystem::size" /* uint64 */ #define G_FILE_ATTRIBUTE_FILESYSTEM_SIZE "filesystem::size" /* uint64 */
/** /**
* G_FILE_ATTRIBUTE_FILESYSTEM_FREE: * G_FILE_ATTRIBUTE_FILESYSTEM_FREE:
* *
* A key in the "filesystem" namespace for getting the number of bytes of free space left on the * A key in the "filesystem" namespace for getting the number of bytes of free space left on the
* file system. Corresponding #GFileAttributeType is * file system. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_UINT64. * %G_FILE_ATTRIBUTE_TYPE_UINT64.
**/ **/
#define G_FILE_ATTRIBUTE_FILESYSTEM_FREE "filesystem::free" /* uint64 */ #define G_FILE_ATTRIBUTE_FILESYSTEM_FREE "filesystem::free" /* uint64 */
/** /**
* G_FILE_ATTRIBUTE_FILESYSTEM_TYPE: * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
* *
* A key in the "filesystem" namespace for getting the file system's type. * A key in the "filesystem" namespace for getting the file system's type.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
**/ **/
@ -639,8 +639,8 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_FILESYSTEM_READONLY: * G_FILE_ATTRIBUTE_FILESYSTEM_READONLY:
* *
* A key in the "filesystem" namespace for checking if the file system * A key in the "filesystem" namespace for checking if the file system
* is read only. Is set to %TRUE if the file system is read only. * is read only. Is set to %TRUE if the file system is read only.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
**/ **/
#define G_FILE_ATTRIBUTE_FILESYSTEM_READONLY "filesystem::readonly" /* boolean */ #define G_FILE_ATTRIBUTE_FILESYSTEM_READONLY "filesystem::readonly" /* boolean */
@ -657,18 +657,18 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_GVFS_BACKEND: * G_FILE_ATTRIBUTE_GVFS_BACKEND:
* *
* A key in the "gvfs" namespace that gets the name of the current * A key in the "gvfs" namespace that gets the name of the current
* GVFS backend in use. Corresponding #GFileAttributeType is * GVFS backend in use. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_STRING. * %G_FILE_ATTRIBUTE_TYPE_STRING.
**/ **/
#define G_FILE_ATTRIBUTE_GVFS_BACKEND "gvfs::backend" /* string */ #define G_FILE_ATTRIBUTE_GVFS_BACKEND "gvfs::backend" /* string */
/** /**
* G_FILE_ATTRIBUTE_SELINUX_CONTEXT: * G_FILE_ATTRIBUTE_SELINUX_CONTEXT:
* *
* A key in the "selinux" namespace for getting the file's SELinux * A key in the "selinux" namespace for getting the file's SELinux
* context. Corresponding #GFileAttributeType is * context. Corresponding #GFileAttributeType is
* %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only
* available if GLib has been built with SELinux support. * available if GLib has been built with SELinux support.
**/ **/
@ -677,13 +677,13 @@ typedef struct _GFileInfoClass GFileInfoClass;
/** /**
* G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT: * G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT:
* *
* A key in the "trash" namespace. When requested against * A key in the "trash" namespace. When requested against
* "trash:///" returns the number of (toplevel) items in the trash folder. * "trash:///" returns the number of (toplevel) items in the trash folder.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
**/ **/
#define G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT "trash::item-count" /* uint32 */ #define G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT "trash::item-count" /* uint32 */
GType g_file_info_get_type (void) G_GNUC_CONST; GType g_file_info_get_type (void) G_GNUC_CONST;
GFileInfo * g_file_info_new (void); GFileInfo * g_file_info_new (void);
GFileInfo * g_file_info_dup (GFileInfo *other); GFileInfo * g_file_info_dup (GFileInfo *other);
@ -814,5 +814,4 @@ const char * g_file_attribute_matcher_enumerate_next (GFileAttributeMa
G_END_DECLS G_END_DECLS
#endif /* __G_FILE_INFO_H__ */ #endif /* __G_FILE_INFO_H__ */

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -40,7 +40,7 @@ G_BEGIN_DECLS
/** /**
* GFileInputStream: * GFileInputStream:
* *
* A subclass of GInputStream for opened files. This adds * A subclass of GInputStream for opened files. This adds
* a few file-specific operations and seeking. * a few file-specific operations and seeking.
* *
@ -61,26 +61,27 @@ struct _GFileInputStreamClass
{ {
GInputStreamClass parent_class; GInputStreamClass parent_class;
goffset (*tell) (GFileInputStream *stream); goffset (* tell) (GFileInputStream *stream);
gboolean (*can_seek) (GFileInputStream *stream); gboolean (* can_seek) (GFileInputStream *stream);
gboolean (*seek) (GFileInputStream *stream, gboolean (* seek) (GFileInputStream *stream,
goffset offset, goffset offset,
GSeekType type, GSeekType type,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
GFileInfo *(*query_info) (GFileInputStream *stream, GFileInfo * (* query_info) (GFileInputStream *stream,
char *attributes, char *attributes,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
void (*query_info_async) (GFileInputStream *stream, void (* query_info_async) (GFileInputStream *stream,
char *attributes, char *attributes,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
GFileInfo *(*query_info_finish) (GFileInputStream *stream, GFileInfo * (* query_info_finish) (GFileInputStream *stream,
GAsyncResult *res, GAsyncResult *res,
GError **error); GError **error);
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
void (*_g_reserved1) (void); void (*_g_reserved1) (void);
@ -90,7 +91,7 @@ struct _GFileInputStreamClass
void (*_g_reserved5) (void); void (*_g_reserved5) (void);
}; };
GType g_file_input_stream_get_type (void) G_GNUC_CONST; GType g_file_input_stream_get_type (void) G_GNUC_CONST;
GFileInfo *g_file_input_stream_query_info (GFileInputStream *stream, GFileInfo *g_file_input_stream_query_info (GFileInputStream *stream,
char *attributes, char *attributes,
@ -106,7 +107,6 @@ GFileInfo *g_file_input_stream_query_info_finish (GFileInputStream *stream,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
G_END_DECLS G_END_DECLS
#endif /* __G_FILE_FILE_INPUT_STREAM_H__ */ #endif /* __G_FILE_FILE_INPUT_STREAM_H__ */

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -43,7 +43,7 @@ typedef struct _GFileMonitorPrivate GFileMonitorPrivate;
/** /**
* GFileMonitor: * GFileMonitor:
* *
* Watches for changes to a file. * Watches for changes to a file.
**/ **/
struct _GFileMonitor struct _GFileMonitor
@ -57,15 +57,15 @@ struct _GFileMonitor
struct _GFileMonitorClass struct _GFileMonitorClass
{ {
GObjectClass parent_class; GObjectClass parent_class;
/* Signals */ /* Signals */
void (* changed) (GFileMonitor* monitor, void (* changed) (GFileMonitor *monitor,
GFile* file, GFile *file,
GFile* other_file, GFile *other_file,
GFileMonitorEvent event_type); GFileMonitorEvent event_type);
/* Virtual Table */ /* Virtual Table */
gboolean (*cancel)(GFileMonitor* monitor); gboolean (* cancel) (GFileMonitor *monitor);
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
@ -76,19 +76,19 @@ struct _GFileMonitorClass
void (*_g_reserved5) (void); void (*_g_reserved5) (void);
}; };
GType g_file_monitor_get_type (void) G_GNUC_CONST; GType g_file_monitor_get_type (void) G_GNUC_CONST;
gboolean g_file_monitor_cancel (GFileMonitor *monitor); gboolean g_file_monitor_cancel (GFileMonitor *monitor);
gboolean g_file_monitor_is_cancelled (GFileMonitor *monitor); gboolean g_file_monitor_is_cancelled (GFileMonitor *monitor);
void g_file_monitor_set_rate_limit (GFileMonitor *monitor, void g_file_monitor_set_rate_limit (GFileMonitor *monitor,
int limit_msecs); int limit_msecs);
/* For implementations */ /* For implementations */
void g_file_monitor_emit_event (GFileMonitor *monitor, void g_file_monitor_emit_event (GFileMonitor *monitor,
GFile *child, GFile *child,
GFile *other_file, GFile *other_file,
GFileMonitorEvent event_type); GFileMonitorEvent event_type);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -40,17 +40,18 @@ G_BEGIN_DECLS
/** /**
* GFilenameCompleter: * GFilenameCompleter:
* *
* Completes filenames based on files that exist within the file system. * Completes filenames based on files that exist within the file system.
**/ **/
typedef struct _GFilenameCompleterClass GFilenameCompleterClass; typedef struct _GFilenameCompleterClass GFilenameCompleterClass;
struct _GFilenameCompleterClass { struct _GFilenameCompleterClass
{
GObjectClass parent_class; GObjectClass parent_class;
/*< public >*/ /*< public >*/
/* signals */ /* signals */
void (* got_completion_data) (GFilenameCompleter *filename_completer); void (* got_completion_data) (GFilenameCompleter *filename_completer);
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
@ -59,16 +60,16 @@ struct _GFilenameCompleterClass {
void (*_g_reserved3) (void); void (*_g_reserved3) (void);
}; };
GType g_filename_completer_get_type (void) G_GNUC_CONST; GType g_filename_completer_get_type (void) G_GNUC_CONST;
GFilenameCompleter *g_filename_completer_new (void); GFilenameCompleter *g_filename_completer_new (void);
char * g_filename_completer_get_completion_suffix (GFilenameCompleter *completer, char * g_filename_completer_get_completion_suffix (GFilenameCompleter *completer,
const char *initial_text); const char *initial_text);
char ** g_filename_completer_get_completions (GFilenameCompleter *completer, char ** g_filename_completer_get_completions (GFilenameCompleter *completer,
const char *initial_text); const char *initial_text);
void g_filename_completer_set_dirs_only (GFilenameCompleter *completer, void g_filename_completer_set_dirs_only (GFilenameCompleter *completer,
gboolean dirs_only); gboolean dirs_only);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -52,7 +52,7 @@ typedef struct _GFileOutputStreamPrivate GFileOutputStreamPrivate;
struct _GFileOutputStream struct _GFileOutputStream
{ {
GOutputStream parent_instance; GOutputStream parent_instance;
/*< private >*/ /*< private >*/
GFileOutputStreamPrivate *priv; GFileOutputStreamPrivate *priv;
}; };
@ -61,33 +61,33 @@ struct _GFileOutputStreamClass
{ {
GOutputStreamClass parent_class; GOutputStreamClass parent_class;
goffset (*tell) (GFileOutputStream *stream); goffset (* tell) (GFileOutputStream *stream);
gboolean (*can_seek) (GFileOutputStream *stream); gboolean (* can_seek) (GFileOutputStream *stream);
gboolean (*seek) (GFileOutputStream *stream, gboolean (* seek) (GFileOutputStream *stream,
goffset offset, goffset offset,
GSeekType type, GSeekType type,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
gboolean (*can_truncate) (GFileOutputStream *stream); gboolean (* can_truncate) (GFileOutputStream *stream);
gboolean (*truncate_fn) (GFileOutputStream *stream, gboolean (* truncate_fn) (GFileOutputStream *stream,
goffset size, goffset size,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
GFileInfo *(*query_info) (GFileOutputStream *stream, GFileInfo * (* query_info) (GFileOutputStream *stream,
char *attributes, char *attributes,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
void (*query_info_async) (GFileOutputStream *stream, void (* query_info_async) (GFileOutputStream *stream,
char *attributes, char *attributes,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
GFileInfo *(*query_info_finish) (GFileOutputStream *stream, GFileInfo * (* query_info_finish) (GFileOutputStream *stream,
GAsyncResult *res, GAsyncResult *res,
GError **error); GError **error);
char *(*get_etag) (GFileOutputStream *stream); char * (* get_etag) (GFileOutputStream *stream);
/* Padding for future expansion */ /* Padding for future expansion */
void (*_g_reserved1) (void); void (*_g_reserved1) (void);
void (*_g_reserved2) (void); void (*_g_reserved2) (void);
@ -96,23 +96,23 @@ struct _GFileOutputStreamClass
void (*_g_reserved5) (void); void (*_g_reserved5) (void);
}; };
GType g_file_output_stream_get_type (void) G_GNUC_CONST; GType g_file_output_stream_get_type (void) G_GNUC_CONST;
GFileInfo *g_file_output_stream_query_info (GFileOutputStream *stream, GFileInfo *g_file_output_stream_query_info (GFileOutputStream *stream,
char *attributes, char *attributes,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
void g_file_output_stream_query_info_async (GFileOutputStream *stream, void g_file_output_stream_query_info_async (GFileOutputStream *stream,
char *attributes, char *attributes,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
GFileInfo *g_file_output_stream_query_info_finish (GFileOutputStream *stream, GFileInfo *g_file_output_stream_query_info_finish (GFileOutputStream *stream,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
char * g_file_output_stream_get_etag (GFileOutputStream *stream); char * g_file_output_stream_get_etag (GFileOutputStream *stream);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
* *
* Author: Christian Kellner <gicmo@gnome.org> * Author: Christian Kellner <gicmo@gnome.org>
*/ */
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
@ -40,7 +40,7 @@ G_BEGIN_DECLS
/** /**
* GFilterInputStream: * GFilterInputStream:
* *
* A base class for all input streams that work on an underlying stream. * A base class for all input streams that work on an underlying stream.
**/ **/
typedef struct _GFilterInputStreamClass GFilterInputStreamClass; typedef struct _GFilterInputStreamClass GFilterInputStreamClass;
@ -58,7 +58,7 @@ struct _GFilterInputStreamClass
{ {
GInputStreamClass parent_class; GInputStreamClass parent_class;
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
void (*_g_reserved1) (void); void (*_g_reserved1) (void);
void (*_g_reserved2) (void); void (*_g_reserved2) (void);
@ -66,8 +66,9 @@ struct _GFilterInputStreamClass
}; };
GType g_filter_input_stream_get_type (void) G_GNUC_CONST; GType g_filter_input_stream_get_type (void) G_GNUC_CONST;
GInputStream *g_filter_input_stream_get_base_stream (GFilterInputStream *stream); GInputStream * g_filter_input_stream_get_base_stream (GFilterInputStream *stream);
G_END_DECLS G_END_DECLS
#endif /* __G_FILTER_INPUT_STREAM_H__ */ #endif /* __G_FILTER_INPUT_STREAM_H__ */

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
* *
* Author: Christian Kellner <gicmo@gnome.org> * Author: Christian Kellner <gicmo@gnome.org>
*/ */
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
@ -40,7 +40,7 @@ G_BEGIN_DECLS
/** /**
* GFilterOutputStream: * GFilterOutputStream:
* *
* A base class for all output streams that work on an underlying stream. * A base class for all output streams that work on an underlying stream.
**/ **/
typedef struct _GFilterOutputStreamClass GFilterOutputStreamClass; typedef struct _GFilterOutputStreamClass GFilterOutputStreamClass;
@ -56,7 +56,7 @@ struct _GFilterOutputStream
struct _GFilterOutputStreamClass struct _GFilterOutputStreamClass
{ {
GOutputStreamClass parent_class; GOutputStreamClass parent_class;
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
@ -66,8 +66,9 @@ struct _GFilterOutputStreamClass
}; };
GType g_filter_output_stream_get_type (void) G_GNUC_CONST; GType g_filter_output_stream_get_type (void) G_GNUC_CONST;
GOutputStream *g_filter_output_stream_get_base_stream (GFilterOutputStream *stream); GOutputStream * g_filter_output_stream_get_base_stream (GFilterOutputStream *stream);
G_END_DECLS G_END_DECLS
#endif /* __G_FILTER_OUTPUT_STREAM_H__ */ #endif /* __G_FILTER_OUTPUT_STREAM_H__ */

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -41,7 +41,7 @@ G_BEGIN_DECLS
* *
* An abstract type that specifies an icon. * An abstract type that specifies an icon.
**/ **/
typedef struct _GIconIface GIconIface; typedef struct _GIconIface GIconIface;
/** /**
* GIconIface: * GIconIface:
@ -59,16 +59,16 @@ struct _GIconIface
/* Virtual Table */ /* Virtual Table */
guint (*hash) (GIcon *icon); guint (* hash) (GIcon *icon);
gboolean (*equal) (GIcon *icon1, gboolean (* equal) (GIcon *icon1,
GIcon *icon2); GIcon *icon2);
}; };
GType g_icon_get_type (void) G_GNUC_CONST; GType g_icon_get_type (void) G_GNUC_CONST;
guint g_icon_hash (gconstpointer icon); guint g_icon_hash (gconstpointer icon);
gboolean g_icon_equal (GIcon *icon1, gboolean g_icon_equal (GIcon *icon1,
GIcon *icon2); GIcon *icon2);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -40,7 +40,7 @@ G_BEGIN_DECLS
/** /**
* GInputStream: * GInputStream:
* *
* Base class for streaming input operations. * Base class for streaming input operations.
**/ **/
typedef struct _GInputStreamClass GInputStreamClass; typedef struct _GInputStreamClass GInputStreamClass;
@ -59,48 +59,48 @@ struct _GInputStreamClass
GObjectClass parent_class; GObjectClass parent_class;
/* Sync ops: */ /* Sync ops: */
gssize (* read_fn) (GInputStream *stream, gssize (* read_fn) (GInputStream *stream,
void *buffer, void *buffer,
gsize count, gsize count,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
gssize (* skip) (GInputStream *stream, gssize (* skip) (GInputStream *stream,
gsize count, gsize count,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
gboolean (* close_fn) (GInputStream *stream, gboolean (* close_fn) (GInputStream *stream,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
/* Async ops: (optional in derived classes) */ /* Async ops: (optional in derived classes) */
void (* read_async) (GInputStream *stream, void (* read_async) (GInputStream *stream,
void *buffer, void *buffer,
gsize count, gsize count,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gssize (* read_finish) (GInputStream *stream, gssize (* read_finish) (GInputStream *stream,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
void (* skip_async) (GInputStream *stream, void (* skip_async) (GInputStream *stream,
gsize count, gsize count,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gssize (* skip_finish) (GInputStream *stream, gssize (* skip_finish) (GInputStream *stream,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
void (* close_async) (GInputStream *stream, void (* close_async) (GInputStream *stream,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gboolean (* close_finish)(GInputStream *stream, gboolean (* close_finish) (GInputStream *stream,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
@ -111,7 +111,7 @@ struct _GInputStreamClass
void (*_g_reserved5) (void); void (*_g_reserved5) (void);
}; };
GType g_input_stream_get_type (void) G_GNUC_CONST; GType g_input_stream_get_type (void) G_GNUC_CONST;
gssize g_input_stream_read (GInputStream *stream, gssize g_input_stream_read (GInputStream *stream,
void *buffer, void *buffer,

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -70,7 +70,7 @@ typedef enum {
* @G_DATA_STREAM_NEWLINE_TYPE_CR: Selects "CR" line endings. * @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_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. * @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. * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file.
**/ **/
typedef enum { typedef enum {
@ -394,7 +394,7 @@ typedef enum {
* @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently. * @G_PASSWORD_SAVE_PERMANENTLY: save a password permanently.
* *
* #GPasswordSave is used to indicate the lifespan of a saved password. * #GPasswordSave is used to indicate the lifespan of a saved password.
* *
* #Gvfs stores passwords in the Gnome keyring when this flag allows it * #Gvfs stores passwords in the Gnome keyring when this flag allows it
* to, and later retrieves it again from there. * to, and later retrieves it again from there.
**/ **/
@ -407,14 +407,14 @@ typedef enum {
/** /**
* GMountOperationResult: * GMountOperationResult:
* @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the * @G_MOUNT_OPERATION_HANDLED: The request was fulfilled and the
* user specified data is now available * user specified data is now available
* @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation * @G_MOUNT_OPERATION_ABORTED: The user requested the mount operation
* to be aborted * to be aborted
* @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not * @G_MOUNT_OPERATION_UNHANDLED: The request was unhandled (i.e. not
* implemented) * implemented)
* *
* #GMountOperationResult is returned as a result when a request for * #GMountOperationResult is returned as a result when a request for
* information is send by the mounting operation. * information is send by the mounting operation.
**/ **/
typedef enum { typedef enum {
@ -427,9 +427,9 @@ typedef enum {
/** /**
* GOutputStreamSpliceFlags: * GOutputStreamSpliceFlags:
* @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream. * @G_OUTPUT_STREAM_SPLICE_NONE: Do not close either stream.
* @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after * @G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE: Close the source stream after
* the splice. * the splice.
* @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after * @G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET: Close the target stream after
* the splice. * the splice.
* *
* GOutputStreamSpliceFlags determine how streams should be spliced. * GOutputStreamSpliceFlags determine how streams should be spliced.
@ -445,7 +445,7 @@ typedef enum {
* GEmblemOrigin: * GEmblemOrigin:
* @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin * @G_EMBLEM_ORIGIN_UNKNOWN: Emblem of unknown origin
* @G_EMBLEM_ORIGIN_DEVICE: Embleme adds device-specific information * @G_EMBLEM_ORIGIN_DEVICE: Embleme adds device-specific information
* @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly" * @G_EMBLEM_ORIGIN_LIVEMETADATA: Emblem depicts live metadata, such as "readonly"
* @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future) * @G_EMBLEM_ORIGIN_TAG: Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)
* *
* GEmblemOrigin is used to add information about the origin of the emblem * GEmblemOrigin is used to add information about the origin of the emblem

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -32,16 +32,15 @@
G_BEGIN_DECLS G_BEGIN_DECLS
GQuark g_io_error_quark (void);
/** /**
* G_IO_ERROR: * G_IO_ERROR:
* *
* Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration. * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration.
* See #GError for more information on error domains. * See #GError for more information on error domains.
**/ **/
#define G_IO_ERROR g_io_error_quark() #define G_IO_ERROR g_io_error_quark()
GQuark g_io_error_quark (void);
GIOErrorEnum g_io_error_from_errno (gint err_no); GIOErrorEnum g_io_error_from_errno (gint err_no);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -41,15 +41,15 @@ G_BEGIN_DECLS
/** /**
* GIOModule: * GIOModule:
* *
* Opaque module base class for extending GIO. * Opaque module base class for extending GIO.
**/ **/
typedef struct _GIOModuleClass GIOModuleClass; typedef struct _GIOModuleClass GIOModuleClass;
GType g_io_module_get_type (void) G_GNUC_CONST; GType g_io_module_get_type (void) G_GNUC_CONST;
GIOModule *g_io_module_new (const gchar *filename); GIOModule *g_io_module_new (const gchar *filename);
GList *g_io_modules_load_all_in_directory (const char *dirname); GList *g_io_modules_load_all_in_directory (const gchar *dirname);
GIOExtensionPoint *g_io_extension_point_register (const char *name); GIOExtensionPoint *g_io_extension_point_register (const char *name);
GIOExtensionPoint *g_io_extension_point_lookup (const char *name); GIOExtensionPoint *g_io_extension_point_lookup (const char *name);
@ -64,31 +64,33 @@ GIOExtension * g_io_extension_point_implement (const char
const char *extension_name, const char *extension_name,
gint priority); gint priority);
GType g_io_extension_get_type (GIOExtension *extension); GType g_io_extension_get_type (GIOExtension *extension);
const char * g_io_extension_get_name (GIOExtension *extension); const char * g_io_extension_get_name (GIOExtension *extension);
gint g_io_extension_get_priority (GIOExtension *extension); gint g_io_extension_get_priority (GIOExtension *extension);
GTypeClass* g_io_extension_ref_class (GIOExtension *extension); GTypeClass* g_io_extension_ref_class (GIOExtension *extension);
/* API for the modules to implement */ /* API for the modules to implement */
/** /**
* g_io_module_load: * g_io_module_load:
* @module: a #GIOModule. * @module: a #GIOModule.
* *
* Required API for GIO modules to implement. * Required API for GIO modules to implement.
* This function is ran after the module has been loaded into GIO, * This function is ran after the module has been loaded into GIO,
* to initialize the module. * to initialize the module.
**/ **/
void g_io_module_load (GIOModule *module); void g_io_module_load (GIOModule *module);
/** /**
* g_io_module_unload: * g_io_module_unload:
* @module: a #GIOModule. * @module: a #GIOModule.
* *
* Required API for GIO modules to implement. * Required API for GIO modules to implement.
* This function is ran when the module is being unloaded from GIO, * This function is ran when the module is being unloaded from GIO,
* to finalize the module. * to finalize the module.
**/ **/
void g_io_module_unload (GIOModule *module); void g_io_module_unload (GIOModule *module);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -27,7 +27,6 @@
#ifndef __G_IO_SCHEDULER_H__ #ifndef __G_IO_SCHEDULER_H__
#define __G_IO_SCHEDULER_H__ #define __G_IO_SCHEDULER_H__
#include <glib.h>
#include <gio/giotypes.h> #include <gio/giotypes.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -27,7 +27,6 @@
#ifndef __GIO_TYPES_H__ #ifndef __GIO_TYPES_H__
#define __GIO_TYPES_H__ #define __GIO_TYPES_H__
#include <glib-object.h>
#include <gio/gioenums.h> #include <gio/gioenums.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -38,8 +38,8 @@ G_BEGIN_DECLS
/** /**
* GLoadableIcon: * GLoadableIcon:
* *
* Generic type for all kinds of icons that can be loaded * Generic type for all kinds of icons that can be loaded
* as a stream. * as a stream.
**/ **/
typedef struct _GLoadableIconIface GLoadableIconIface; typedef struct _GLoadableIconIface GLoadableIconIface;
@ -50,7 +50,7 @@ typedef struct _GLoadableIconIface GLoadableIconIface;
* @load: Loads an icon. * @load: Loads an icon.
* @load_async: Loads an icon asynchronously. * @load_async: Loads an icon asynchronously.
* @load_finish: Finishes an asynchronous icon load. * @load_finish: Finishes an asynchronous icon load.
* *
* Interface for icons that can be loaded as a stream. * Interface for icons that can be loaded as a stream.
**/ **/
struct _GLoadableIconIface struct _GLoadableIconIface
@ -59,24 +59,23 @@ struct _GLoadableIconIface
/* Virtual Table */ /* Virtual Table */
GInputStream * (*load) (GLoadableIcon *icon, GInputStream * (* load) (GLoadableIcon *icon,
int size, int size,
char **type, char **type,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
void (*load_async) (GLoadableIcon *icon, void (* load_async) (GLoadableIcon *icon,
int size, int size,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
GInputStream * (*load_finish) (GLoadableIcon *icon, GInputStream * (* load_finish) (GLoadableIcon *icon,
GAsyncResult *res, GAsyncResult *res,
char **type, char **type,
GError **error); GError **error);
}; };
GType g_loadable_icon_get_type (void) G_GNUC_CONST; GType g_loadable_icon_get_type (void) G_GNUC_CONST;
GInputStream *g_loadable_icon_load (GLoadableIcon *icon, GInputStream *g_loadable_icon_load (GLoadableIcon *icon,
int size, int size,

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -43,23 +43,27 @@ typedef struct _GLocalDirectoryMonitorClass GLocalDirectoryMonitorClass;
struct _GLocalDirectoryMonitor struct _GLocalDirectoryMonitor
{ {
GFileMonitor parent_instance; GFileMonitor parent_instance;
gchar *dirname;
gchar *dirname;
/* For mount emulation */ /* For mount emulation */
GUnixMountMonitor *mount_monitor; GUnixMountMonitor *mount_monitor;
gboolean was_mounted; gboolean was_mounted;
}; };
struct _GLocalDirectoryMonitorClass { struct _GLocalDirectoryMonitorClass
{
GFileMonitorClass parent_class; GFileMonitorClass parent_class;
gboolean mount_notify; gboolean mount_notify;
gboolean (*is_supported) (void);
gboolean (* is_supported) (void);
}; };
GType g_local_directory_monitor_get_type (void) G_GNUC_CONST; GType g_local_directory_monitor_get_type (void) G_GNUC_CONST;
GFileMonitor* _g_local_directory_monitor_new (const char *dirname, GFileMonitor * _g_local_directory_monitor_new (const char *dirname,
GFileMonitorFlags flags, GFileMonitorFlags flags,
GError **error); GError **error);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -42,9 +42,9 @@ struct _GLocalFileClass
GObjectClass parent_class; GObjectClass parent_class;
}; };
GType _g_local_file_get_type (void) G_GNUC_CONST; GType _g_local_file_get_type (void) G_GNUC_CONST;
GFile * _g_local_file_new (const char *filename); GFile * _g_local_file_new (const char *filename);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -39,20 +39,18 @@ typedef struct _GLocalFileEnumerator GLocalFileEnumerator;
typedef struct _GLocalFileEnumeratorClass GLocalFileEnumeratorClass; typedef struct _GLocalFileEnumeratorClass GLocalFileEnumeratorClass;
typedef struct _GLocalFileEnumeratorPrivate GLocalFileEnumeratorPrivate; typedef struct _GLocalFileEnumeratorPrivate GLocalFileEnumeratorPrivate;
struct _GLocalFileEnumeratorClass struct _GLocalFileEnumeratorClass
{ {
GFileEnumeratorClass parent_class; GFileEnumeratorClass parent_class;
}; };
GType _g_local_file_enumerator_get_type (void) G_GNUC_CONST; GType _g_local_file_enumerator_get_type (void) G_GNUC_CONST;
GFileEnumerator *_g_local_file_enumerator_new (GLocalFile *file, GFileEnumerator * _g_local_file_enumerator_new (GLocalFile *file,
const char *attributes, const char *attributes,
GFileQueryInfoFlags flags, GFileQueryInfoFlags flags,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -32,12 +32,13 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef struct { typedef struct
{
gboolean writable; gboolean writable;
gboolean is_sticky; gboolean is_sticky;
gboolean has_trash_dir; gboolean has_trash_dir;
int owner; int owner;
dev_t device; dev_t device;
} GLocalParentFileInfo; } GLocalParentFileInfo;
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
@ -47,33 +48,33 @@ typedef struct {
#define GLocalFileStat struct stat #define GLocalFileStat struct stat
#endif #endif
gboolean _g_local_file_has_trash_dir (const char *dirname, gboolean _g_local_file_has_trash_dir (const char *dirname,
dev_t dir_dev); dev_t dir_dev);
void _g_local_file_info_get_parent_info (const char *dir, void _g_local_file_info_get_parent_info (const char *dir,
GFileAttributeMatcher *attribute_matcher, GFileAttributeMatcher *attribute_matcher,
GLocalParentFileInfo *parent_info); GLocalParentFileInfo *parent_info);
GFileInfo *_g_local_file_info_get (const char *basename, GFileInfo *_g_local_file_info_get (const char *basename,
const char *path, const char *path,
GFileAttributeMatcher *attribute_matcher, GFileAttributeMatcher *attribute_matcher,
GFileQueryInfoFlags flags, GFileQueryInfoFlags flags,
GLocalParentFileInfo *parent_info, GLocalParentFileInfo *parent_info,
GError **error); GError **error);
GFileInfo *_g_local_file_info_get_from_fd (int fd, GFileInfo *_g_local_file_info_get_from_fd (int fd,
char *attributes, char *attributes,
GError **error); GError **error);
char * _g_local_file_info_create_etag (GLocalFileStat *statbuf); char * _g_local_file_info_create_etag (GLocalFileStat *statbuf);
gboolean _g_local_file_info_set_attribute (char *filename, gboolean _g_local_file_info_set_attribute (char *filename,
const char *attribute, const char *attribute,
GFileAttributeType type, GFileAttributeType type,
gpointer value_p, gpointer value_p,
GFileQueryInfoFlags flags, GFileQueryInfoFlags flags,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
gboolean _g_local_file_info_set_attributes (char *filename, gboolean _g_local_file_info_set_attributes (char *filename,
GFileInfo *info, GFileInfo *info,
GFileQueryInfoFlags flags, GFileQueryInfoFlags flags,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -51,9 +51,9 @@ struct _GLocalFileInputStreamClass
GFileInputStreamClass parent_class; GFileInputStreamClass parent_class;
}; };
GType _g_local_file_input_stream_get_type (void) G_GNUC_CONST; GType _g_local_file_input_stream_get_type (void) G_GNUC_CONST;
GFileInputStream *_g_local_file_input_stream_new (int fd); GFileInputStream * _g_local_file_input_stream_new (int fd);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -41,19 +41,22 @@ typedef struct _GLocalFileMonitorClass GLocalFileMonitorClass;
struct _GLocalFileMonitor struct _GLocalFileMonitor
{ {
GFileMonitor parent_instance; GFileMonitor parent_instance;
gchar *filename; gchar *filename;
}; };
struct _GLocalFileMonitorClass { struct _GLocalFileMonitorClass
{
GFileMonitorClass parent_class; GFileMonitorClass parent_class;
gboolean (*is_supported) (void);
gboolean (* is_supported) (void);
}; };
GType g_local_file_monitor_get_type (void) G_GNUC_CONST; GType g_local_file_monitor_get_type (void) G_GNUC_CONST;
GFileMonitor* _g_local_file_monitor_new (const char *pathname, GFileMonitor * _g_local_file_monitor_new (const char *pathname,
GFileMonitorFlags flags, GFileMonitorFlags flags,
GError **error); GError **error);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -51,21 +51,21 @@ struct _GLocalFileOutputStreamClass
GFileOutputStreamClass parent_class; GFileOutputStreamClass parent_class;
}; };
GType _g_local_file_output_stream_get_type (void) G_GNUC_CONST; GType _g_local_file_output_stream_get_type (void) G_GNUC_CONST;
GFileOutputStream *_g_local_file_output_stream_create (const char *filename, GFileOutputStream * _g_local_file_output_stream_create (const char *filename,
GFileCreateFlags flags, GFileCreateFlags flags,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
GFileOutputStream *_g_local_file_output_stream_append (const char *filename, GFileOutputStream * _g_local_file_output_stream_append (const char *filename,
GFileCreateFlags flags, GFileCreateFlags flags,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
GFileOutputStream *_g_local_file_output_stream_replace (const char *filename, GFileOutputStream * _g_local_file_output_stream_replace (const char *filename,
const char *etag, const char *etag,
gboolean create_backup, gboolean create_backup,
GFileCreateFlags flags, GFileCreateFlags flags,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -27,20 +27,19 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define G_TYPE_LOCAL_VFS (_g_local_vfs_get_type ()) #define G_TYPE_LOCAL_VFS (_g_local_vfs_get_type ())
#define G_LOCAL_VFS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_LOCAL_VFS, GLocalVfs)) #define G_LOCAL_VFS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_LOCAL_VFS, GLocalVfs))
#define G_LOCAL_VFS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_LOCAL_VFS, GLocalVfsClass)) #define G_LOCAL_VFS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_LOCAL_VFS, GLocalVfsClass))
#define G_IS_LOCAL_VFS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_LOCAL_VFS)) #define G_IS_LOCAL_VFS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_LOCAL_VFS))
#define G_IS_LOCAL_VFS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G_TYPE_LOCAL_VFS)) #define G_IS_LOCAL_VFS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G_TYPE_LOCAL_VFS))
#define G_LOCAL_VFS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_LOCAL_VFS, GLocalVfsClass)) #define G_LOCAL_VFS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_LOCAL_VFS, GLocalVfsClass))
typedef struct _GLocalVfs GLocalVfs; typedef struct _GLocalVfs GLocalVfs;
typedef struct _GLocalVfsClass GLocalVfsClass; typedef struct _GLocalVfsClass GLocalVfsClass;
GType _g_local_vfs_get_type (void) G_GNUC_CONST; GType _g_local_vfs_get_type (void) G_GNUC_CONST;
GVfs *_g_local_vfs_new (void); GVfs * _g_local_vfs_new (void);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
* *
* Author: Christian Kellner <gicmo@gnome.org> * Author: Christian Kellner <gicmo@gnome.org>
*/ */
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION) #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
@ -40,7 +40,7 @@ G_BEGIN_DECLS
/** /**
* GMemoryInputStream: * GMemoryInputStream:
* *
* Implements #GInputStream for arbitrary memory chunks. * Implements #GInputStream for arbitrary memory chunks.
**/ **/
typedef struct _GMemoryInputStreamClass GMemoryInputStreamClass; typedef struct _GMemoryInputStreamClass GMemoryInputStreamClass;
@ -56,7 +56,7 @@ struct _GMemoryInputStream
struct _GMemoryInputStreamClass struct _GMemoryInputStreamClass
{ {
GInputStreamClass parent_class; GInputStreamClass parent_class;
/* Padding for future expansion */ /* Padding for future expansion */
void (*_g_reserved1) (void); void (*_g_reserved1) (void);
@ -67,15 +67,15 @@ struct _GMemoryInputStreamClass
}; };
GType g_memory_input_stream_get_type (void) G_GNUC_CONST; GType g_memory_input_stream_get_type (void) G_GNUC_CONST;
GInputStream * g_memory_input_stream_new (void); GInputStream * g_memory_input_stream_new (void);
GInputStream * g_memory_input_stream_new_from_data (const void *data, GInputStream * g_memory_input_stream_new_from_data (const void *data,
gssize len, gssize len,
GDestroyNotify destroy); GDestroyNotify destroy);
void g_memory_input_stream_add_data (GMemoryInputStream *stream, void g_memory_input_stream_add_data (GMemoryInputStream *stream,
const void *data, const void *data,
gssize len, gssize len,
GDestroyNotify destroy); GDestroyNotify destroy);
G_END_DECLS G_END_DECLS

View File

@ -56,7 +56,7 @@ struct _GMemoryOutputStream
struct _GMemoryOutputStreamClass struct _GMemoryOutputStreamClass
{ {
GOutputStreamClass parent_class; GOutputStreamClass parent_class;
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
@ -79,8 +79,8 @@ struct _GMemoryOutputStreamClass
* *
* Returns: a pointer to the reallocated memory * Returns: a pointer to the reallocated memory
*/ */
typedef gpointer (*GReallocFunc) (gpointer data, typedef gpointer (* GReallocFunc) (gpointer data,
gsize size); gsize size);
GType g_memory_output_stream_get_type (void) G_GNUC_CONST; GType g_memory_output_stream_get_type (void) G_GNUC_CONST;

View File

@ -1,7 +1,7 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2008 Red Hat, Inc. * Copyright (C) 2006-2008 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
@ -63,7 +63,7 @@ typedef struct _GMountIface GMountIface;
* type guessing. This operation was added in 2.18. * type guessing. This operation was added in 2.18.
* @guess_content_type_finish: Finishes a contenet type guessing operation. * @guess_content_type_finish: Finishes a contenet type guessing operation.
* @guess_content_type_sync: Synchronous variant of @guess_content_type. * @guess_content_type_sync: Synchronous variant of @guess_content_type.
* *
* Interface for implementing operations for mounts. * Interface for implementing operations for mounts.
**/ **/
struct _GMountIface struct _GMountIface
@ -72,107 +72,110 @@ struct _GMountIface
/* signals */ /* signals */
void (*changed) (GMount *mount); void (* changed) (GMount *mount);
void (*unmounted) (GMount *mount); void (* unmounted) (GMount *mount);
/* Virtual Table */ /* Virtual Table */
GFile * (*get_root) (GMount *mount); GFile * (* get_root) (GMount *mount);
char * (*get_name) (GMount *mount); char * (* get_name) (GMount *mount);
GIcon * (*get_icon) (GMount *mount); GIcon * (* get_icon) (GMount *mount);
char * (*get_uuid) (GMount *mount); char * (* get_uuid) (GMount *mount);
GVolume * (*get_volume) (GMount *mount); GVolume * (* get_volume) (GMount *mount);
GDrive * (*get_drive) (GMount *mount); GDrive * (* get_drive) (GMount *mount);
gboolean (*can_unmount) (GMount *mount); gboolean (* can_unmount) (GMount *mount);
gboolean (*can_eject) (GMount *mount); gboolean (* can_eject) (GMount *mount);
void (*unmount) (GMount *mount,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*unmount_finish) (GMount *mount,
GAsyncResult *result,
GError **error);
void (*eject) (GMount *mount,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*eject_finish) (GMount *mount,
GAsyncResult *result,
GError **error);
void (*remount) (GMount *mount,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*remount_finish) (GMount *mount,
GAsyncResult *result,
GError **error);
void (*guess_content_type) (GMount *mount, void (* unmount) (GMount *mount,
gboolean force_rescan, GMountUnmountFlags flags,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gboolean (* unmount_finish) (GMount *mount,
GAsyncResult *result,
GError **error);
gchar ** (*guess_content_type_finish) (GMount *mount, void (* eject) (GMount *mount,
GAsyncResult *result, GMountUnmountFlags flags,
GError **error); GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* eject_finish) (GMount *mount,
GAsyncResult *result,
GError **error);
gchar ** (*guess_content_type_sync) (GMount *mount, void (* remount) (GMount *mount,
gboolean force_rescan, GMountMountFlags flags,
GCancellable *cancellable, GMountOperation *mount_operation,
GError **error); GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (* remount_finish) (GMount *mount,
GAsyncResult *result,
GError **error);
void (* guess_content_type) (GMount *mount,
gboolean force_rescan,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gchar ** (* guess_content_type_finish) (GMount *mount,
GAsyncResult *result,
GError **error);
gchar ** (* guess_content_type_sync) (GMount *mount,
gboolean force_rescan,
GCancellable *cancellable,
GError **error);
}; };
GType g_mount_get_type (void) G_GNUC_CONST; GType g_mount_get_type (void) G_GNUC_CONST;
GFile * g_mount_get_root (GMount *mount); GFile * g_mount_get_root (GMount *mount);
char * g_mount_get_name (GMount *mount); char * g_mount_get_name (GMount *mount);
GIcon * g_mount_get_icon (GMount *mount); GIcon * g_mount_get_icon (GMount *mount);
char * g_mount_get_uuid (GMount *mount); char * g_mount_get_uuid (GMount *mount);
GVolume * g_mount_get_volume (GMount *mount); GVolume * g_mount_get_volume (GMount *mount);
GDrive * g_mount_get_drive (GMount *mount); GDrive * g_mount_get_drive (GMount *mount);
gboolean g_mount_can_unmount (GMount *mount); gboolean g_mount_can_unmount (GMount *mount);
gboolean g_mount_can_eject (GMount *mount); gboolean g_mount_can_eject (GMount *mount);
void g_mount_unmount (GMount *mount,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean g_mount_unmount_finish (GMount *mount,
GAsyncResult *result,
GError **error);
void g_mount_eject (GMount *mount,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean g_mount_eject_finish (GMount *mount,
GAsyncResult *result,
GError **error);
void g_mount_remount (GMount *mount,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean g_mount_remount_finish (GMount *mount,
GAsyncResult *result,
GError **error);
void g_mount_guess_content_type (GMount *mount, void g_mount_unmount (GMount *mount,
gboolean force_rescan, GMountUnmountFlags flags,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gchar ** g_mount_guess_content_type_finish (GMount *mount, gboolean g_mount_unmount_finish (GMount *mount,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
gchar ** g_mount_guess_content_type_sync (GMount *mount, void g_mount_eject (GMount *mount,
GMountUnmountFlags flags,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean g_mount_eject_finish (GMount *mount,
GAsyncResult *result,
GError **error);
void g_mount_remount (GMount *mount,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean g_mount_remount_finish (GMount *mount,
GAsyncResult *result,
GError **error);
void g_mount_guess_content_type (GMount *mount,
gboolean force_rescan,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gchar ** g_mount_guess_content_type_finish (GMount *mount,
GAsyncResult *result,
GError **error);
gchar ** g_mount_guess_content_type_sync (GMount *mount,
gboolean force_rescan, gboolean force_rescan,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -40,8 +40,8 @@ G_BEGIN_DECLS
/** /**
* GMountOperation: * GMountOperation:
* *
* Class for providing authentication methods for mounting operations, * Class for providing authentication methods for mounting operations,
* such as mounting a file locally, or authenticating with a server. * such as mounting a file locally, or authenticating with a server.
**/ **/
typedef struct _GMountOperationClass GMountOperationClass; typedef struct _GMountOperationClass GMountOperationClass;
@ -60,19 +60,19 @@ struct _GMountOperationClass
/* signals: */ /* signals: */
void (* ask_password) (GMountOperation *op, void (* ask_password) (GMountOperation *op,
const char *message, const char *message,
const char *default_user, const char *default_user,
const char *default_domain, const char *default_domain,
GAskPasswordFlags flags); GAskPasswordFlags flags);
void (* ask_question) (GMountOperation *op,
const char *message,
const char *choices[]);
void (* reply) (GMountOperation *op,
GMountOperationResult result);
void (* ask_question) (GMountOperation *op,
const char *message,
const char *choices[]);
void (* reply) (GMountOperation *op,
GMountOperationResult result);
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
void (*_g_reserved1) (void); void (*_g_reserved1) (void);
@ -89,9 +89,8 @@ struct _GMountOperationClass
void (*_g_reserved12) (void); void (*_g_reserved12) (void);
}; };
GType g_mount_operation_get_type (void) G_GNUC_CONST; GType g_mount_operation_get_type (void) G_GNUC_CONST;
GMountOperation * g_mount_operation_new (void);
GMountOperation * g_mount_operation_new (void);
const char * g_mount_operation_get_username (GMountOperation *op); const char * g_mount_operation_get_username (GMountOperation *op);
void g_mount_operation_set_username (GMountOperation *op, void g_mount_operation_set_username (GMountOperation *op,

View File

@ -16,20 +16,21 @@ G_BEGIN_DECLS
typedef struct _GNativeVolumeMonitor GNativeVolumeMonitor; typedef struct _GNativeVolumeMonitor GNativeVolumeMonitor;
typedef struct _GNativeVolumeMonitorClass GNativeVolumeMonitorClass; typedef struct _GNativeVolumeMonitorClass GNativeVolumeMonitorClass;
struct _GNativeVolumeMonitor { struct _GNativeVolumeMonitor
{
GVolumeMonitor parent_instance; GVolumeMonitor parent_instance;
}; };
struct _GNativeVolumeMonitorClass { struct _GNativeVolumeMonitorClass
{
GVolumeMonitorClass parent_class; GVolumeMonitorClass parent_class;
GMount * (*get_mount_for_mount_path) (const char *mount_path, GMount * (* get_mount_for_mount_path) (const char *mount_path,
GCancellable *cancellable); GCancellable *cancellable);
}; };
GType g_native_volume_monitor_get_type (void) G_GNUC_CONST; GType g_native_volume_monitor_get_type (void) G_GNUC_CONST;
G_END_DECLS G_END_DECLS
#endif /* __G_NATIVE_VOLUME_MONITOR_H__ */ #endif /* __G_NATIVE_VOLUME_MONITOR_H__ */

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -40,10 +40,10 @@ G_BEGIN_DECLS
/** /**
* GOutputStream: * GOutputStream:
* *
* Base class for writing output. * Base class for writing output.
* *
* All classes derived from GOutputStream should implement synchronous * All classes derived from GOutputStream should implement synchronous
* writing, splicing, flushing and closing streams, but may implement * writing, splicing, flushing and closing streams, but may implement
* asynchronous versions. * asynchronous versions.
**/ **/
@ -53,7 +53,7 @@ typedef struct _GOutputStreamPrivate GOutputStreamPrivate;
struct _GOutputStream struct _GOutputStream
{ {
GObject parent_instance; GObject parent_instance;
/*< private >*/ /*< private >*/
GOutputStreamPrivate *priv; GOutputStreamPrivate *priv;
}; };
@ -64,62 +64,62 @@ struct _GOutputStreamClass
GObjectClass parent_class; GObjectClass parent_class;
/* Sync ops: */ /* Sync ops: */
gssize (* write_fn)(GOutputStream *stream, gssize (* write_fn) (GOutputStream *stream,
const void *buffer, const void *buffer,
gsize count, gsize count,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
gssize (* splice) (GOutputStream *stream, gssize (* splice) (GOutputStream *stream,
GInputStream *source, GInputStream *source,
GOutputStreamSpliceFlags flags, GOutputStreamSpliceFlags flags,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
gboolean (* flush) (GOutputStream *stream, gboolean (* flush) (GOutputStream *stream,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
gboolean (* close_fn)(GOutputStream *stream, gboolean (* close_fn) (GOutputStream *stream,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
/* Async ops: (optional in derived classes) */ /* Async ops: (optional in derived classes) */
void (* write_async) (GOutputStream *stream, void (* write_async) (GOutputStream *stream,
const void *buffer, const void *buffer,
gsize count, gsize count,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gssize (* write_finish) (GOutputStream *stream, gssize (* write_finish) (GOutputStream *stream,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
void (* splice_async) (GOutputStream *stream, void (* splice_async) (GOutputStream *stream,
GInputStream *source, GInputStream *source,
GOutputStreamSpliceFlags flags, GOutputStreamSpliceFlags flags,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer data); gpointer data);
gssize (* splice_finish)(GOutputStream *stream, gssize (* splice_finish) (GOutputStream *stream,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
void (* flush_async) (GOutputStream *stream, void (* flush_async) (GOutputStream *stream,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gboolean (* flush_finish) (GOutputStream *stream, gboolean (* flush_finish) (GOutputStream *stream,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
void (* close_async) (GOutputStream *stream, void (* close_async) (GOutputStream *stream,
int io_priority, int io_priority,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gboolean (* close_finish) (GOutputStream *stream, gboolean (* close_finish) (GOutputStream *stream,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
@ -133,8 +133,8 @@ struct _GOutputStreamClass
void (*_g_reserved8) (void); void (*_g_reserved8) (void);
}; };
GType g_output_stream_get_type (void) G_GNUC_CONST; GType g_output_stream_get_type (void) G_GNUC_CONST;
gssize g_output_stream_write (GOutputStream *stream, gssize g_output_stream_write (GOutputStream *stream,
const void *buffer, const void *buffer,
gsize count, gsize count,

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -36,13 +36,14 @@ G_BEGIN_DECLS
typedef struct _GPollFileMonitor GPollFileMonitor; typedef struct _GPollFileMonitor GPollFileMonitor;
typedef struct _GPollFileMonitorClass GPollFileMonitorClass; typedef struct _GPollFileMonitorClass GPollFileMonitorClass;
struct _GPollFileMonitorClass { struct _GPollFileMonitorClass
{
GFileMonitorClass parent_class; GFileMonitorClass parent_class;
}; };
GType _g_poll_file_monitor_get_type (void) G_GNUC_CONST; GType _g_poll_file_monitor_get_type (void) G_GNUC_CONST;
GFileMonitor* _g_poll_file_monitor_new (GFile *file); GFileMonitor * _g_poll_file_monitor_new (GFile *file);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -38,9 +38,9 @@ G_BEGIN_DECLS
/** /**
* GSeekable: * GSeekable:
* *
* Seek object for streaming operations. * Seek object for streaming operations.
**/ **/
typedef struct _GSeekableIface GSeekableIface; typedef struct _GSeekableIface GSeekableIface;
/** /**
@ -51,24 +51,24 @@ typedef struct _GSeekableIface GSeekableIface;
* @seek: Seeks to a location within a stream. * @seek: Seeks to a location within a stream.
* @can_truncate: Chekcs if truncation is suppored by the stream. * @can_truncate: Chekcs if truncation is suppored by the stream.
* @truncate_fn: Truncates a stream. * @truncate_fn: Truncates a stream.
* *
* Provides an interface for implementing seekable functionality on I/O Streams. * Provides an interface for implementing seekable functionality on I/O Streams.
**/ **/
struct _GSeekableIface struct _GSeekableIface
{ {
GTypeInterface g_iface; GTypeInterface g_iface;
/* Virtual Table */ /* Virtual Table */
goffset (* tell) (GSeekable *seekable); goffset (* tell) (GSeekable *seekable);
gboolean (* can_seek) (GSeekable *seekable); gboolean (* can_seek) (GSeekable *seekable);
gboolean (* seek) (GSeekable *seekable, gboolean (* seek) (GSeekable *seekable,
goffset offset, goffset offset,
GSeekType type, GSeekType type,
GCancellable *cancellable, GCancellable *cancellable,
GError **error); GError **error);
gboolean (* can_truncate) (GSeekable *seekable); gboolean (* can_truncate) (GSeekable *seekable);
gboolean (* truncate_fn) (GSeekable *seekable, gboolean (* truncate_fn) (GSeekable *seekable,
goffset offset, goffset offset,
@ -78,7 +78,7 @@ struct _GSeekableIface
/* TODO: Async seek/truncate */ /* TODO: Async seek/truncate */
}; };
GType g_seekable_get_type (void) G_GNUC_CONST; GType g_seekable_get_type (void) G_GNUC_CONST;
goffset g_seekable_tell (GSeekable *seekable); goffset g_seekable_tell (GSeekable *seekable);
gboolean g_seekable_can_seek (GSeekable *seekable); gboolean g_seekable_can_seek (GSeekable *seekable);

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -40,14 +40,14 @@ G_BEGIN_DECLS
/** /**
* GSimpleAsyncResult: * GSimpleAsyncResult:
* *
* A simple implementation of #GAsyncResult. * A simple implementation of #GAsyncResult.
**/ **/
typedef struct _GSimpleAsyncResultClass GSimpleAsyncResultClass; typedef struct _GSimpleAsyncResultClass GSimpleAsyncResultClass;
GType g_simple_async_result_get_type (void) G_GNUC_CONST; GType g_simple_async_result_get_type (void) G_GNUC_CONST;
GSimpleAsyncResult *g_simple_async_result_new (GObject *source_object, GSimpleAsyncResult *g_simple_async_result_new (GObject *source_object,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data, gpointer user_data,
@ -103,20 +103,20 @@ void g_simple_async_result_set_error_va (GSimpleAsyncResult
const char *format, const char *format,
va_list args); va_list args);
void g_simple_async_report_error_in_idle (GObject *object, void g_simple_async_report_error_in_idle (GObject *object,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data, gpointer user_data,
GQuark domain, GQuark domain,
gint code, gint code,
const char *format, const char *format,
...); ...);
void g_simple_async_report_gerror_in_idle (GObject *object, void g_simple_async_report_gerror_in_idle (GObject *object,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data, gpointer user_data,
GError *error); GError *error);
G_END_DECLS G_END_DECLS
#endif /* __G_SIMPLE_ASYNC_RESULT_H__ */ #endif /* __G_SIMPLE_ASYNC_RESULT_H__ */

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -40,20 +40,20 @@ G_BEGIN_DECLS
/** /**
* GThemedIcon: * GThemedIcon:
* *
* An implementation of #GIcon for themed icons. * An implementation of #GIcon for themed icons.
**/ **/
typedef struct _GThemedIconClass GThemedIconClass; typedef struct _GThemedIconClass GThemedIconClass;
GType g_themed_icon_get_type (void) G_GNUC_CONST; GType g_themed_icon_get_type (void) G_GNUC_CONST;
GIcon *g_themed_icon_new (const char *iconname); GIcon *g_themed_icon_new (const char *iconname);
GIcon *g_themed_icon_new_with_default_fallbacks (const char *iconname); GIcon *g_themed_icon_new_with_default_fallbacks (const char *iconname);
GIcon *g_themed_icon_new_from_names (char **iconnames, GIcon *g_themed_icon_new_from_names (char **iconnames,
int len); int len);
void g_themed_icon_prepend_name (GThemedIcon *icon, void g_themed_icon_prepend_name (GThemedIcon *icon,
const char *iconname); const char *iconname);
void g_themed_icon_append_name (GThemedIcon *icon, void g_themed_icon_append_name (GThemedIcon *icon,
const char *iconname); const char *iconname);
const char * const *g_themed_icon_get_names (GThemedIcon *icon); const char * const *g_themed_icon_get_names (GThemedIcon *icon);

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -37,7 +37,8 @@ G_BEGIN_DECLS
typedef struct _GUnionVolumeMonitor GUnionVolumeMonitor; typedef struct _GUnionVolumeMonitor GUnionVolumeMonitor;
typedef struct _GUnionVolumeMonitorClass GUnionVolumeMonitorClass; typedef struct _GUnionVolumeMonitorClass GUnionVolumeMonitorClass;
struct _GUnionVolumeMonitorClass { struct _GUnionVolumeMonitorClass
{
GVolumeMonitorClass parent_class; GVolumeMonitorClass parent_class;
}; };

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -36,7 +36,7 @@ G_BEGIN_DECLS
/** /**
* GUnixInputStream: * GUnixInputStream:
* *
* Implements #GInputStream for reading from selectable unix file descriptors * Implements #GInputStream for reading from selectable unix file descriptors
**/ **/
typedef struct _GUnixInputStream GUnixInputStream; typedef struct _GUnixInputStream GUnixInputStream;
@ -64,10 +64,10 @@ struct _GUnixInputStreamClass
void (*_g_reserved5) (void); void (*_g_reserved5) (void);
}; };
GType g_unix_input_stream_get_type (void) G_GNUC_CONST; GType g_unix_input_stream_get_type (void) G_GNUC_CONST;
GInputStream *g_unix_input_stream_new (int fd, GInputStream * g_unix_input_stream_new (int fd,
gboolean close_fd_at_close); gboolean close_fd_at_close);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -38,20 +38,21 @@ G_BEGIN_DECLS
typedef struct _GUnixMountClass GUnixMountClass; typedef struct _GUnixMountClass GUnixMountClass;
struct _GUnixMountClass { struct _GUnixMountClass
GObjectClass parent_class; {
GObjectClass parent_class;
}; };
GType _g_unix_mount_get_type (void) G_GNUC_CONST; GType _g_unix_mount_get_type (void) G_GNUC_CONST;
GUnixMount *_g_unix_mount_new (GVolumeMonitor *volume_monitor, GUnixMount * _g_unix_mount_new (GVolumeMonitor *volume_monitor,
GUnixMountEntry *mount_entry, GUnixMountEntry *mount_entry,
GUnixVolume *volume); GUnixVolume *volume);
gboolean _g_unix_mount_has_mount_path (GUnixMount *mount, gboolean _g_unix_mount_has_mount_path (GUnixMount *mount,
const char *mount_path); const char *mount_path);
void _g_unix_mount_unset_volume (GUnixMount *mount, void _g_unix_mount_unset_volume (GUnixMount *mount,
GUnixVolume *volume); GUnixVolume *volume);
void _g_unix_mount_unmounted (GUnixMount *mount); void _g_unix_mount_unmounted (GUnixMount *mount);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -29,15 +29,15 @@ G_BEGIN_DECLS
/** /**
* GUnixMountEntry: * GUnixMountEntry:
* *
* Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>). * Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
* This corresponds roughly to a mtab entry. * This corresponds roughly to a mtab entry.
**/ **/
typedef struct _GUnixMountEntry GUnixMountEntry; typedef struct _GUnixMountEntry GUnixMountEntry;
/** /**
* GUnixMountPoint: * GUnixMountPoint:
* *
* Defines a Unix mount point (e.g. <filename>/dev</filename>). * Defines a Unix mount point (e.g. <filename>/dev</filename>).
* This corresponds roughly to a fstab entry. * This corresponds roughly to a fstab entry.
**/ **/
@ -45,7 +45,7 @@ typedef struct _GUnixMountPoint GUnixMountPoint;
/** /**
* GUnixMountMonitor: * GUnixMountMonitor:
* *
* Watches #GUnixMount<!-- -->s for changes. * Watches #GUnixMount<!-- -->s for changes.
**/ **/
typedef struct _GUnixMountMonitor GUnixMountMonitor; typedef struct _GUnixMountMonitor GUnixMountMonitor;

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -36,7 +36,7 @@ G_BEGIN_DECLS
/** /**
* GUnixOutputStream: * GUnixOutputStream:
* *
* Implements #GOutputStream for outputting to selectable unix file descriptors * Implements #GOutputStream for outputting to selectable unix file descriptors
**/ **/
typedef struct _GUnixOutputStream GUnixOutputStream; typedef struct _GUnixOutputStream GUnixOutputStream;
@ -64,10 +64,10 @@ struct _GUnixOutputStreamClass
void (*_g_reserved5) (void); void (*_g_reserved5) (void);
}; };
GType g_unix_output_stream_get_type (void) G_GNUC_CONST; GType g_unix_output_stream_get_type (void) G_GNUC_CONST;
GOutputStream *g_unix_output_stream_new (int fd, GOutputStream * g_unix_output_stream_new (int fd,
gboolean close_fd_at_close); gboolean close_fd_at_close);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -38,21 +38,22 @@ G_BEGIN_DECLS
typedef struct _GUnixVolumeClass GUnixVolumeClass; typedef struct _GUnixVolumeClass GUnixVolumeClass;
struct _GUnixVolumeClass { struct _GUnixVolumeClass
GObjectClass parent_class; {
GObjectClass parent_class;
}; };
GType _g_unix_volume_get_type (void) G_GNUC_CONST; GType _g_unix_volume_get_type (void) G_GNUC_CONST;
GUnixVolume *_g_unix_volume_new (GVolumeMonitor *volume_monitor, GUnixVolume * _g_unix_volume_new (GVolumeMonitor *volume_monitor,
GUnixMountPoint *mountpoint); GUnixMountPoint *mountpoint);
gboolean _g_unix_volume_has_mount_path (GUnixVolume *volume, gboolean _g_unix_volume_has_mount_path (GUnixVolume *volume,
const char *mount_path); const char *mount_path);
void _g_unix_volume_set_mount (GUnixVolume *volume, void _g_unix_volume_set_mount (GUnixVolume *volume,
GUnixMount *mount); GUnixMount *mount);
void _g_unix_volume_unset_mount (GUnixVolume *volume, void _g_unix_volume_unset_mount (GUnixVolume *volume,
GUnixMount *mount); GUnixMount *mount);
void _g_unix_volume_disconnected (GUnixVolume *volume); void _g_unix_volume_disconnected (GUnixVolume *volume);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -47,15 +47,15 @@ typedef struct _GUnixVolumeMonitorClass GUnixVolumeMonitorClass;
typedef struct _GUnixMount GUnixMount; typedef struct _GUnixMount GUnixMount;
typedef struct _GUnixVolume GUnixVolume; typedef struct _GUnixVolume GUnixVolume;
struct _GUnixVolumeMonitorClass { struct _GUnixVolumeMonitorClass
{
GNativeVolumeMonitorClass parent_class; GNativeVolumeMonitorClass parent_class;
}; };
GType _g_unix_volume_monitor_get_type (void) G_GNUC_CONST; GType _g_unix_volume_monitor_get_type (void) G_GNUC_CONST;
GVolumeMonitor * _g_unix_volume_monitor_new (void); GVolumeMonitor * _g_unix_volume_monitor_new (void);
GUnixVolume * _g_unix_volume_monitor_lookup_volume_for_mount_path (GUnixVolumeMonitor *monitor, GUnixVolume * _g_unix_volume_monitor_lookup_volume_for_mount_path (GUnixVolumeMonitor *monitor,
const char *mount_path); const char *mount_path);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -41,19 +41,20 @@ G_BEGIN_DECLS
/** /**
* G_VFS_EXTENSION_POINT_NAME: * G_VFS_EXTENSION_POINT_NAME:
* *
* Extension point for #GVfs functionality. * Extension point for #GVfs functionality.
* See <link linkend="extending-gio">Extending GIO</link>. * See <link linkend="extending-gio">Extending GIO</link>.
*/ */
#define G_VFS_EXTENSION_POINT_NAME "gio-vfs" #define G_VFS_EXTENSION_POINT_NAME "gio-vfs"
/** /**
* GVfs: * GVfs:
* *
* Virtual File System object. * Virtual File System object.
**/ **/
typedef struct _GVfsClass GVfsClass; typedef struct _GVfsClass GVfsClass;
struct _GVfs { struct _GVfs
{
GObject parent_instance; GObject parent_instance;
}; };
@ -63,15 +64,14 @@ struct _GVfsClass
/* Virtual Table */ /* Virtual Table */
gboolean (*is_active) (GVfs *vfs); gboolean (* is_active) (GVfs *vfs);
GFile *(*get_file_for_path) (GVfs *vfs, GFile * (* get_file_for_path) (GVfs *vfs,
const char *path); const char *path);
GFile *(*get_file_for_uri) (GVfs *vfs, GFile * (* get_file_for_uri) (GVfs *vfs,
const char *uri); const char *uri);
const gchar * const *(*get_supported_uri_schemes) (GVfs *vfs); const gchar * const * (* get_supported_uri_schemes) (GVfs *vfs);
GFile *(*parse_name) (GVfs *vfs, GFile * (* parse_name) (GVfs *vfs,
const char *parse_name); const char *parse_name);
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
@ -87,20 +87,19 @@ struct _GVfsClass
void (*_g_reserved10) (void); void (*_g_reserved10) (void);
void (*_g_reserved11) (void); void (*_g_reserved11) (void);
void (*_g_reserved12) (void); void (*_g_reserved12) (void);
}; };
GType g_vfs_get_type (void) G_GNUC_CONST; GType g_vfs_get_type (void) G_GNUC_CONST;
gboolean g_vfs_is_active (GVfs *vfs); gboolean g_vfs_is_active (GVfs *vfs);
GFile * g_vfs_get_file_for_path (GVfs *vfs, GFile * g_vfs_get_file_for_path (GVfs *vfs,
const char *path); const char *path);
GFile * g_vfs_get_file_for_uri (GVfs *vfs, GFile * g_vfs_get_file_for_uri (GVfs *vfs,
const char *uri); const char *uri);
const gchar* const * g_vfs_get_supported_uri_schemes (GVfs *vfs); const gchar* const * g_vfs_get_supported_uri_schemes (GVfs *vfs);
GFile * g_vfs_parse_name (GVfs *vfs, GFile * g_vfs_parse_name (GVfs *vfs,
const char *parse_name); const char *parse_name);
GVfs * g_vfs_get_default (void); GVfs * g_vfs_get_default (void);
GVfs * g_vfs_get_local (void); GVfs * g_vfs_get_local (void);

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -89,14 +89,14 @@ G_BEGIN_DECLS
* @mount_finish: Finishes a mount operation. * @mount_finish: Finishes a mount operation.
* @eject: Ejects a given #GVolume. * @eject: Ejects a given #GVolume.
* @eject_finish: Finishes an eject operation. * @eject_finish: Finishes an eject operation.
* @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if * @get_identifier: Returns the <link linkend="volume-identifier">identifier</link> of the given kind, or %NULL if
* the #GVolume doesn't have one. * the #GVolume doesn't have one.
* @enumerate_identifiers: Returns an array strings listing the kinds * @enumerate_identifiers: Returns an array strings listing the kinds
* of <link linkend="volume-identifier">identifiers</link> which the #GVolume has. * of <link linkend="volume-identifier">identifiers</link> which the #GVolume has.
* @should_automount: Returns %TRUE if the #GVolume should be automatically mounted. * @should_automount: Returns %TRUE if the #GVolume should be automatically mounted.
* @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if * @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if
* it is not known. * it is not known.
* *
* Interface for implementing operations for mountable volumes. * Interface for implementing operations for mountable volumes.
**/ **/
typedef struct _GVolumeIface GVolumeIface; typedef struct _GVolumeIface GVolumeIface;
@ -107,47 +107,47 @@ struct _GVolumeIface
/* signals */ /* signals */
void (*changed) (GVolume *volume); void (* changed) (GVolume *volume);
void (*removed) (GVolume *volume); void (* removed) (GVolume *volume);
/* Virtual Table */ /* Virtual Table */
char * (*get_name) (GVolume *volume); char * (* get_name) (GVolume *volume);
GIcon * (*get_icon) (GVolume *volume); GIcon * (* get_icon) (GVolume *volume);
char * (*get_uuid) (GVolume *volume); char * (* get_uuid) (GVolume *volume);
GDrive * (*get_drive) (GVolume *volume); GDrive * (* get_drive) (GVolume *volume);
GMount * (*get_mount) (GVolume *volume); GMount * (* get_mount) (GVolume *volume);
gboolean (*can_mount) (GVolume *volume); gboolean (* can_mount) (GVolume *volume);
gboolean (*can_eject) (GVolume *volume); gboolean (* can_eject) (GVolume *volume);
void (*mount_fn) (GVolume *volume, void (* mount_fn) (GVolume *volume,
GMountMountFlags flags, GMountMountFlags flags,
GMountOperation *mount_operation, GMountOperation *mount_operation,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gboolean (*mount_finish) (GVolume *volume, gboolean (* mount_finish) (GVolume *volume,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
void (*eject) (GVolume *volume, void (* eject) (GVolume *volume,
GMountUnmountFlags flags, GMountUnmountFlags flags,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gboolean (*eject_finish) (GVolume *volume, gboolean (* eject_finish) (GVolume *volume,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
char * (*get_identifier) (GVolume *volume,
const char *kind);
char ** (*enumerate_identifiers) (GVolume *volume);
gboolean (*should_automount) (GVolume *volume); char * (* get_identifier) (GVolume *volume,
const char *kind);
char ** (* enumerate_identifiers) (GVolume *volume);
gboolean (* should_automount) (GVolume *volume);
GFile * (* get_activation_root) (GVolume *volume);
GFile * (*get_activation_root) (GVolume *volume);
}; };
GType g_volume_get_type (void) G_GNUC_CONST; GType g_volume_get_type (void) G_GNUC_CONST;
char * g_volume_get_name (GVolume *volume); char * g_volume_get_name (GVolume *volume);
GIcon * g_volume_get_icon (GVolume *volume); GIcon * g_volume_get_icon (GVolume *volume);
@ -180,7 +180,6 @@ char ** g_volume_enumerate_identifiers (GVolume *volume);
GFile * g_volume_get_activation_root (GVolume *volume); GFile * g_volume_get_activation_root (GVolume *volume);
G_END_DECLS G_END_DECLS
#endif /* __G_VOLUME_H__ */ #endif /* __G_VOLUME_H__ */

View File

@ -1,7 +1,7 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -57,63 +57,65 @@ G_BEGIN_DECLS
**/ **/
typedef struct _GVolumeMonitorClass GVolumeMonitorClass; typedef struct _GVolumeMonitorClass GVolumeMonitorClass;
struct _GVolumeMonitor { struct _GVolumeMonitor
{
GObject parent_instance; GObject parent_instance;
/*< private >*/ /*< private >*/
gpointer priv; gpointer priv;
}; };
struct _GVolumeMonitorClass { struct _GVolumeMonitorClass
{
GObjectClass parent_class; GObjectClass parent_class;
/*< public >*/ /*< public >*/
/* signals */ /* signals */
void (* volume_added) (GVolumeMonitor *volume_monitor, void (* volume_added) (GVolumeMonitor *volume_monitor,
GVolume *volume); GVolume *volume);
void (* volume_removed) (GVolumeMonitor *volume_monitor, void (* volume_removed) (GVolumeMonitor *volume_monitor,
GVolume *volume); GVolume *volume);
void (* volume_changed) (GVolumeMonitor *volume_monitor, void (* volume_changed) (GVolumeMonitor *volume_monitor,
GVolume *volume); GVolume *volume);
void (* mount_added) (GVolumeMonitor *volume_monitor, void (* mount_added) (GVolumeMonitor *volume_monitor,
GMount *mount); GMount *mount);
void (* mount_removed) (GVolumeMonitor *volume_monitor, void (* mount_removed) (GVolumeMonitor *volume_monitor,
GMount *mount); GMount *mount);
void (* mount_pre_unmount) (GVolumeMonitor *volume_monitor, void (* mount_pre_unmount) (GVolumeMonitor *volume_monitor,
GMount *mount); GMount *mount);
void (* mount_changed) (GVolumeMonitor *volume_monitor, void (* mount_changed) (GVolumeMonitor *volume_monitor,
GMount *mount); GMount *mount);
void (* drive_connected) (GVolumeMonitor *volume_monitor, void (* drive_connected) (GVolumeMonitor *volume_monitor,
GDrive *drive); GDrive *drive);
void (* drive_disconnected) (GVolumeMonitor *volume_monitor, void (* drive_disconnected) (GVolumeMonitor *volume_monitor,
GDrive *drive); GDrive *drive);
void (* drive_changed) (GVolumeMonitor *volume_monitor, void (* drive_changed) (GVolumeMonitor *volume_monitor,
GDrive *drive); GDrive *drive);
/* Vtable */ /* Vtable */
gboolean (*is_supported) (void); gboolean (* is_supported) (void);
GList * (*get_connected_drives) (GVolumeMonitor *volume_monitor); GList * (* get_connected_drives) (GVolumeMonitor *volume_monitor);
GList * (*get_volumes) (GVolumeMonitor *volume_monitor); GList * (* get_volumes) (GVolumeMonitor *volume_monitor);
GList * (*get_mounts) (GVolumeMonitor *volume_monitor); GList * (* get_mounts) (GVolumeMonitor *volume_monitor);
GVolume * (*get_volume_for_uuid) (GVolumeMonitor *volume_monitor, GVolume * (* get_volume_for_uuid) (GVolumeMonitor *volume_monitor,
const char *uuid); const char *uuid);
GMount * (*get_mount_for_uuid) (GVolumeMonitor *volume_monitor, GMount * (* get_mount_for_uuid) (GVolumeMonitor *volume_monitor,
const char *uuid); const char *uuid);
/* These arguments are unfortunately backwards by mistake (bug #520169) */ /* These arguments are unfortunately backwards by mistake (bug #520169) */
GVolume * (*adopt_orphan_mount) (GMount *mount, GVolume * (* adopt_orphan_mount) (GMount *mount,
GVolumeMonitor *volume_monitor); GVolumeMonitor *volume_monitor);
/* signal added in 2.17 */ /* signal added in 2.17 */
void (* drive_eject_button) (GVolumeMonitor *volume_monitor, void (* drive_eject_button) (GVolumeMonitor *volume_monitor,
GDrive *drive); GDrive *drive);
/*< private >*/ /*< private >*/
/* Padding for future expansion */ /* Padding for future expansion */
@ -126,18 +128,18 @@ struct _GVolumeMonitorClass {
void (*_g_reserved7) (void); void (*_g_reserved7) (void);
}; };
GType g_volume_monitor_get_type (void) G_GNUC_CONST; GType g_volume_monitor_get_type (void) G_GNUC_CONST;
GVolumeMonitor *g_volume_monitor_get (void); GVolumeMonitor *g_volume_monitor_get (void);
GList * g_volume_monitor_get_connected_drives (GVolumeMonitor *volume_monitor); GList * g_volume_monitor_get_connected_drives (GVolumeMonitor *volume_monitor);
GList * g_volume_monitor_get_volumes (GVolumeMonitor *volume_monitor); GList * g_volume_monitor_get_volumes (GVolumeMonitor *volume_monitor);
GList * g_volume_monitor_get_mounts (GVolumeMonitor *volume_monitor); GList * g_volume_monitor_get_mounts (GVolumeMonitor *volume_monitor);
GVolume * g_volume_monitor_get_volume_for_uuid (GVolumeMonitor *volume_monitor, GVolume * g_volume_monitor_get_volume_for_uuid (GVolumeMonitor *volume_monitor,
const char *uuid); const char *uuid);
GMount * g_volume_monitor_get_mount_for_uuid (GVolumeMonitor *volume_monitor, GMount * g_volume_monitor_get_mount_for_uuid (GVolumeMonitor *volume_monitor,
const char *uuid); const char *uuid);
GVolume * g_volume_monitor_adopt_orphan_mount (GMount *mount); GVolume * g_volume_monitor_adopt_orphan_mount (GMount *mount);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* Copyright (C) 2008 Hans Breuer * Copyright (C) 2008 Hans Breuer
* *
@ -38,18 +38,19 @@ G_BEGIN_DECLS
typedef struct _GWin32MountClass GWin32MountClass; typedef struct _GWin32MountClass GWin32MountClass;
struct _GWin32MountClass { struct _GWin32MountClass
GObjectClass parent_class; {
GObjectClass parent_class;
}; };
GType _g_win32_mount_get_type (void) G_GNUC_CONST; GType _g_win32_mount_get_type (void) G_GNUC_CONST;
GWin32Mount *_g_win32_mount_new (GVolumeMonitor *volume_monitor, GWin32Mount * _g_win32_mount_new (GVolumeMonitor *volume_monitor,
const char *path, const char *path,
GWin32Volume *volume); GWin32Volume *volume);
void _g_win32_mount_unset_volume (GWin32Mount *mount, void _g_win32_mount_unset_volume (GWin32Mount *mount,
GWin32Volume *volume); GWin32Volume *volume);
void _g_win32_mount_unmounted (GWin32Mount *mount); void _g_win32_mount_unmounted (GWin32Mount *mount);
G_END_DECLS G_END_DECLS

View File

@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc. * Copyright (C) 2006-2007 Red Hat, Inc.
* Copyright (C) 2008 Hans Breuer * Copyright (C) 2008 Hans Breuer
* *
@ -46,20 +46,20 @@ typedef struct _GWin32VolumeMonitorClass GWin32VolumeMonitorClass;
* *
* Implementation of the #GMount interface for Win32 systems. * Implementation of the #GMount interface for Win32 systems.
*/ */
typedef struct _GWin32Mount GWin32Mount; typedef struct _GWin32Mount GWin32Mount;
typedef struct _GWin32Volume GWin32Volume; typedef struct _GWin32Volume GWin32Volume;
struct _GWin32VolumeMonitorClass { struct _GWin32VolumeMonitorClass
{
GNativeVolumeMonitorClass parent_class; GNativeVolumeMonitorClass parent_class;
}; };
GType _g_win32_volume_monitor_get_type (void) G_GNUC_CONST; GType _g_win32_volume_monitor_get_type (void) G_GNUC_CONST;
GVolumeMonitor * _g_win32_volume_monitor_new (void); GVolumeMonitor * _g_win32_volume_monitor_new (void);
GWin32Volume * _g_win32_volume_monitor_lookup_volume_for_mount_path (GWin32VolumeMonitor *monitor, GWin32Volume * _g_win32_volume_monitor_lookup_volume_for_mount_path (GWin32VolumeMonitor *monitor,
const char *mount_path); const char *mount_path);
G_END_DECLS G_END_DECLS
#endif #endif /* __G_WIN32_VOLUME_MONITOR_H__ */