aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-import.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-10-25 04:37:38 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-10-27 21:25:01 +0800
commit4bc632c800acd4d8228224bb628f2de38090f550 (patch)
tree15cc0e6245adde8000a8c4cfafe42b8107d2b302 /e-util/e-import.h
parent52585c643332ab7af07a11da25a7818899605662 (diff)
downloadgsoc2013-evolution-4bc632c800acd4d8228224bb628f2de38090f550.tar.gz
gsoc2013-evolution-4bc632c800acd4d8228224bb628f2de38090f550.tar.zst
gsoc2013-evolution-4bc632c800acd4d8228224bb628f2de38090f550.zip
EImport cleanup.
Diffstat (limited to 'e-util/e-import.h')
-rw-r--r--e-util/e-import.h123
1 files changed, 87 insertions, 36 deletions
diff --git a/e-util/e-import.h b/e-util/e-import.h
index b0ffe3b3d5..41524bdddb 100644
--- a/e-util/e-import.h
+++ b/e-util/e-import.h
@@ -21,15 +21,31 @@
*
*/
-#ifndef __E_IMPORT_H__
-#define __E_IMPORT_H__
+#ifndef E_IMPORT_H
+#define E_IMPORT_H
#include <gtk/gtk.h>
-#include <libedataserver/e-msgport.h>
-G_BEGIN_DECLS
+/* Standard GObject macros */
+#define E_TYPE_IMPORT \
+ (e_import_get_type ())
+#define E_IMPORT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_IMPORT, EImport))
+#define E_IMPORT_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_IMPORT, EImportClass))
+#define E_IS_IMPORT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_IMPORT))
+#define E_IS_IMPORT_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_IMPORT))
+#define E_IMPORT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_IMPORT, EImportClass))
-/* This is an importer function */
+G_BEGIN_DECLS
typedef struct _EImport EImport;
typedef struct _EImportClass EImportClass;
@@ -155,35 +171,51 @@ struct _EImport {
struct _EImportClass {
GObjectClass object_class;
- EDList importers;
+ GList *importers;
- void (*target_free)(EImport *ep, EImportTarget *t);
+ void (*target_free) (EImport *import,
+ EImportTarget *target);
};
-GType e_import_get_type(void);
-
-EImport *e_import_new(const gchar *id);
-
-/* Static class methods */
-void e_import_class_add_importer(EImportClass *klass, EImportImporter *importer, EImportImporterFunc freefunc, gpointer data);
-
-GSList *e_import_get_importers(EImport *emp, EImportTarget *target);
-
-EImport *e_import_construct(EImport *, const gchar *id);
-
-void e_import_import(EImport *ei, EImportTarget *, EImportImporter *, EImportStatusFunc status, EImportCompleteFunc done, gpointer data);
-void e_import_cancel(EImport *, EImportTarget *, EImportImporter *);
-
-GtkWidget *e_import_get_widget(EImport *ei, EImportTarget *, EImportImporter *);
-
-void e_import_status(EImport *, EImportTarget *, const gchar *what, gint pc);
-void e_import_complete(EImport *, EImportTarget *);
-
-gpointer e_import_target_new(EImport *ep, gint type, gsize size);
-void e_import_target_free(EImport *ep, gpointer o);
-
-EImportTargetURI *e_import_target_new_uri(EImport *ei, const gchar *suri, const gchar *duri);
-EImportTargetHome *e_import_target_new_home(EImport *ei);
+GType e_import_get_type (void);
+EImport * e_import_new (const gchar *id);
+void e_import_class_add_importer (EImportClass *klass,
+ EImportImporter *importer,
+ EImportImporterFunc freefunc,
+ gpointer data);
+GSList * e_import_get_importers (EImport *import,
+ EImportTarget *target);
+EImport * e_import_construct (EImport *import,
+ const gchar *id);
+void e_import_import (EImport *import,
+ EImportTarget *target,
+ EImportImporter *importer,
+ EImportStatusFunc status,
+ EImportCompleteFunc done,
+ gpointer data);
+void e_import_cancel (EImport *import,
+ EImportTarget *target,
+ EImportImporter *importer);
+GtkWidget * e_import_get_widget (EImport *import,
+ EImportTarget *target,
+ EImportImporter *importer);
+void e_import_status (EImport *import,
+ EImportTarget *target,
+ const gchar *what,
+ gint pc);
+void e_import_complete (EImport *import,
+ EImportTarget *target);
+gpointer e_import_target_new (EImport *import,
+ gint type,
+ gsize size);
+void e_import_target_free (EImport *import,
+ gpointer object);
+EImportTargetURI *
+ e_import_target_new_uri (EImport *import,
+ const gchar *uri_src,
+ const gchar *uri_dst);
+EImportTargetHome *
+ e_import_target_new_home (EImport *import);
/* ********************************************************************** */
@@ -194,6 +226,25 @@ EImportTargetHome *e_import_target_new_home(EImport *ei);
#include "e-util/e-plugin.h"
+/* Standard GObject macros */
+#define E_TYPE_IMPORT_HOOK \
+ (e_import_hook_get_type ())
+#define E_IMPORT_HOOK(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_IMPORT_HOOK, EImportHook))
+#define E_IMPORT_HOOK_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_IMPORT_HOOK, EImportHookClass))
+#define E_IS_IMPORT_HOOK(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_IMPORT_HOOK))
+#define E_IS_IMPORT_HOOK_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_IMPORT_HOOK))
+#define E_IMPORT_HOOK_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_IMPORT_HOOK, EImportHookClass))
+
typedef struct _EPluginHookTargetMap EImportHookTargetMap;
typedef struct _EPluginHookTargetKey EImportHookTargetMask;
@@ -250,11 +301,11 @@ struct _EImportHookClass {
EImportClass *import_class;
};
-GType e_import_hook_get_type(void);
-
-/* for implementors */
-void e_import_hook_class_add_target_map(EImportHookClass *klass, const EImportHookTargetMap *);
+GType e_import_hook_get_type (void);
+void e_import_hook_class_add_target_map
+ (EImportHookClass *klass,
+ const EImportHookTargetMap *map);
G_END_DECLS
-#endif /* __E_IMPORT_H__ */
+#endif /* E_IMPORT_H */