aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-import.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-09-26 23:26:17 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-09-26 23:26:17 +0800
commit5507f4dbbd489c5f2bf841207a27efca53d5233b (patch)
treeee3abcb5a51baf1f6b088b203dd4fd3035494b37 /e-util/e-import.h
parentbab29564a3067a8eefbe4c92a7117d54fb031b49 (diff)
downloadgsoc2013-evolution-5507f4dbbd489c5f2bf841207a27efca53d5233b.tar.gz
gsoc2013-evolution-5507f4dbbd489c5f2bf841207a27efca53d5233b.tar.zst
gsoc2013-evolution-5507f4dbbd489c5f2bf841207a27efca53d5233b.zip
Whoops, too soon to kill EImportHook just yet.
Diffstat (limited to 'e-util/e-import.h')
-rw-r--r--e-util/e-import.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/e-util/e-import.h b/e-util/e-import.h
index 8215604c69..b0ffe3b3d5 100644
--- a/e-util/e-import.h
+++ b/e-util/e-import.h
@@ -185,6 +185,76 @@ 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);
+/* ********************************************************************** */
+
+/* import plugin target, they are closely integrated */
+
+/* To implement a basic import plugin, you just need to subclass
+ this and initialise the class target type tables */
+
+#include "e-util/e-plugin.h"
+
+typedef struct _EPluginHookTargetMap EImportHookTargetMap;
+typedef struct _EPluginHookTargetKey EImportHookTargetMask;
+
+typedef struct _EImportHook EImportHook;
+typedef struct _EImportHookClass EImportHookClass;
+
+typedef struct _EImportHookImporter EImportHookImporter;
+
+struct _EImportHookImporter {
+ EImportImporter importer;
+
+ /* user_data == EImportHook */
+
+ gchar *supported;
+ gchar *get_widget;
+ gchar *import;
+ gchar *cancel;
+};
+
+/**
+ * struct _EImportHook - Plugin hook for importuration windows.
+ *
+ * @hook: Superclass.
+ * @groups: A list of EImportHookGroup's of all importuration windows
+ * this plugin hooks into.
+ *
+ **/
+struct _EImportHook {
+ EPluginHook hook;
+
+ GSList *importers;
+};
+
+/**
+ * struct _EImportHookClass - Abstract class for importuration window
+ * plugin hooks.
+ *
+ * @hook_class: Superclass.
+ * @target_map: A table of EImportHookTargetMap structures describing
+ * the possible target types supported by this class.
+ * @import_class: The EImport derived class that this hook
+ * implementation drives.
+ *
+ * This is an abstract class defining the plugin hook point for
+ * importuration windows.
+ *
+ **/
+struct _EImportHookClass {
+ EPluginHookClass hook_class;
+
+ /* EImportHookTargetMap by .type */
+ GHashTable *target_map;
+ /* the import class these imports's belong to */
+ EImportClass *import_class;
+};
+
+GType e_import_hook_get_type(void);
+
+/* for implementors */
+void e_import_hook_class_add_target_map(EImportHookClass *klass, const EImportHookTargetMap *);
+
G_END_DECLS
#endif /* __E_IMPORT_H__ */