diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-08-29 08:21:54 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-08-30 05:23:20 +0800 |
commit | 32f545cdf031ebe3718791f18e8fb6b6141fd081 (patch) | |
tree | 980723161c32da855ca91b135318d7fa67dc18c7 /mail/em-junk-hook.h | |
parent | e8382099228d46ebef684c5384bab6ec710283ce (diff) | |
download | gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar.gz gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar.bz2 gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar.lz gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar.xz gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar.zst gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.zip |
Simplify EPlugin loading at startup.
- Require all EPlugin and EPluginHook subtypes be registered before
loading plugins. This drastically simplifies the EPlugin/EPluginHook
negotiation.
- Turn most EPluginHook subtypes into GTypeModules and register their
types from an e_module_load() function (does not include shell hooks).
- Convert EPluginLib and the Mono and Python bindings to GTypeModules
and register their types from an e_module_load() function, and kill
EPluginTypeHook.
Diffstat (limited to 'mail/em-junk-hook.h')
-rw-r--r-- | mail/em-junk-hook.h | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/mail/em-junk-hook.h b/mail/em-junk-hook.h deleted file mode 100644 index 39d18421ef..0000000000 --- a/mail/em-junk-hook.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see <http://www.gnu.org/licenses/> - * - * - * Authors: - * Vivek Jain <jvivek@novell.com> - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifndef __EM_JUNK_HOOK_H__ -#define __EM_JUNK_HOOK_H__ - -#include "e-util/e-plugin.h" - -#include <camel/camel-junk-plugin.h> -#include <camel/camel-mime-message.h> - -G_BEGIN_DECLS - -typedef struct _EMJunkHookItem EMJunkHookItem; -typedef struct _EMJunkHookGroup EMJunkHookGroup; -typedef struct _EMJunkHook EMJunkHook; -typedef struct _EMJunkHookClass EMJunkHookClass; -typedef struct _EMJunk EMJunk; -typedef struct _EMJunkClass EMJunkClass; - -typedef struct _EMJunkHookTarget EMJunkHookTarget; - -typedef void (*EMJunkHookFunc)(struct _EPlugin *plugin, EMJunkHookTarget *data); - -GQuark em_junk_error_quark (void); - -#define EM_JUNK_ERROR em_junk_error_quark () - -struct _EMJunkHookTarget { - CamelMimeMessage *m; - GError *error; -}; - -struct _EMJunkHookItem { - CamelJunkPlugin csp; - struct _EMJunkHook *hook; /* parent pointer */ - gchar *check_junk; - gchar *report_junk; - gchar *report_non_junk; - gchar *commit_reports; - gchar *validate_binary; - gchar *plugin_name; -}; - -struct _EMJunkHookGroup { - struct _EMJunkHook *hook; /* parent pointer */ - gchar *id; /* target id */ - GSList *items; /* items to consider */ -}; - -struct _EMJunkHook { - EPluginHook hook; - GSList *groups; -}; - -struct _EMJunkHookClass { - EPluginHookClass hook_class; - - /* which class to add matching items to */ - GHashTable *junk_classes; -}; - -GType em_junk_hook_get_type(void); -void em_junk_hook_register_type(GType type); - -struct _EMJunk { - GObject object; - - CamelJunkPlugin csp; -}; - -struct _EMJunkClass { - GObjectClass parent_class; - /* which class to add matching items to */ - GHashTable *junk_classes; -}; - -GType emj_get_type(void); - -G_END_DECLS - -#endif /* __EM_JUNK_HOOK_H__ */ |