Commit f2a2d6c9 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

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
parent 920f3bff
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.
......
/* 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; ...@@ -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; ...@@ -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 ...@@ -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, ...@@ -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 ...@@ -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 ...@@ -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,
......
/* 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 @@ ...@@ -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,
......
/* 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 ...@@ -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; ...@@ -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 ...@@ -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);
......
/* 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 @@ ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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__ */
/* 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 ...@@ -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 ...@@ -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 ...@@ -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);
......
/* 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 @@ ...@@ -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, ...@@ -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);
......
/* 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 ...@@ -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 ...@@ -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 ...@@ -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);
......
/* 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 ...@@ -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 ...@@ -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 ...@@ -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);
......
/* 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 ...@@ -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); ...@@ -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 ...@@ -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__ */
/* 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 ...@@ -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 ...@@ -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 */ /* Virtual Table */
char * (*get_name) (GDrive *drive); char * (* get_name) (GDrive *drive);
GIcon * (*get_icon) (GDrive *drive); GIcon * (* get_icon) (GDrive *drive);
gboolean (*has_volumes) (GDrive *drive); gboolean (* has_volumes) (GDrive *drive);
GList * (*get_volumes) (GDrive *drive); GList * (* get_volumes) (GDrive *drive);
gboolean (*is_media_removable) (GDrive *drive); gboolean (* is_media_removable) (GDrive *drive);
gboolean (*has_media) (GDrive *drive); gboolean (* has_media) (GDrive *drive);
gboolean (*is_media_check_automatic) (GDrive *drive); gboolean (* is_media_check_automatic) (GDrive *drive);
gboolean (*can_eject) (GDrive *drive); gboolean (* can_eject) (GDrive *drive);
gboolean (*can_poll_for_media) (GDrive *drive); gboolean (* can_poll_for_media) (GDrive *drive);
void (*eject) (GDrive *drive, void (* eject) (GDrive *drive,
GMountUnmountFlags flags, GMountUnmountFlags flags,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gboolean (*eject_finish) (GDrive *drive, gboolean (* eject_finish) (GDrive *drive,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
void (*poll_for_media) (GDrive *drive, void (* poll_for_media) (GDrive *drive,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data); gpointer user_data);
gboolean (*poll_for_media_finish) (GDrive *drive, gboolean (* poll_for_media_finish) (GDrive *drive,
GAsyncResult *result, GAsyncResult *result,
GError **error); GError **error);
char * (*get_identifier) (GDrive *drive, char * (* get_identifier) (GDrive *drive,
const char *kind); const char *kind);
char ** (*enumerate_identifiers) (GDrive *drive); 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);
......
/* GIO - GLib Input, Output and Streaming Library /* GIO - GLib Input, Output and Streaming Library
* *
* Copyright (C) 2006-2007 Red Hat, Inc.