From 5d5f3b88c3ad76e0b81763f9c48b7fee84df2292 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 17 Jun 2004 07:34:07 +0000 Subject: ** See #59885. 2004-06-17 Not Zed ** See #59885. ** Moved all of the mailer specific filter stuff into mail/*. * filter-element.c (copy_value): implement for base types. * filter-element.c (filter_element_copy_value): do this as a virtual method. * filter.glade: moved the vfolder stuff to mail/ * libfilter-i18n.h: removed, moved to mailer. * filter-errors.xml: moved the vfolder/filtering errors to the mail error file. * Makefile.am (EXTRA_DIST): moved *types.xml to mail. (INCLUDES): removed a bunch of mail dependencies. * filter-*.[ch], vfolder-*.[ch]: Moved all mail related filter and vfolder stuff to mail directory. * score-*.[ch]: Removed all of it. * vfolder-context.c (vfolder_new_element): and for vfolders. * filter-context.c (filter_new_element): implement for filter element types. * rule-context.c (rc_new_element): replacement for old filter_element_new_type_name. only has the basics. * filter-part.c (filter_part_xml_create): take a rule context as an argument & and look up the element name off the context. * rule-context.c (rule_context_new_element): new virtual method to get an element for a given name. * filter-element.c (filter_element_new_type_name): removed. svn path=/trunk/; revision=26379 --- filter/rule-context.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'filter/rule-context.h') diff --git a/filter/rule-context.h b/filter/rule-context.h index 2f54a574f8..25b0c0e4c9 100644 --- a/filter/rule-context.h +++ b/filter/rule-context.h @@ -68,7 +68,7 @@ typedef void (*RCRegisterFunc) (RuleContext *rc, FilterRule *rule, gpointer user struct _RuleContextClass { GObjectClass parent_class; - + /* virtual methods */ int (*load) (RuleContext *rc, const char *system, const char *user); int (*save) (RuleContext *rc, const char *user); @@ -76,6 +76,8 @@ struct _RuleContextClass { GList *(*delete_uri) (RuleContext *rc, const char *uri, GCompareFunc cmp); GList *(*rename_uri) (RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp); + + FilterElement *(*new_element)(RuleContext *rc, const char *name); /* signals */ void (*rule_added) (RuleContext *rc, FilterRule *rule); @@ -103,9 +105,11 @@ struct _rule_set_map { }; GType rule_context_get_type (void); -RuleContext *rule_context_new (void); /* methods */ +RuleContext *rule_context_new (void); + +/* io */ int rule_context_load (RuleContext *rc, const char *system, const char *user); int rule_context_save (RuleContext *rc, const char *user); int rule_context_revert (RuleContext *rc, const char *user); @@ -132,6 +136,9 @@ void rule_context_add_part_set (RuleContext *rc, const char *setname, GType part void rule_context_add_rule_set (RuleContext *rc, const char *setname, GType rule_type, RCRuleFunc append, RCNextRuleFunc next); +/* dynamic element types */ +FilterElement *rule_context_new_element(RuleContext *rc, const char *name); + /* uri's disappear/renamed externally */ GList *rule_context_delete_uri (RuleContext *rc, const char *uri, GCompareFunc cmp); GList *rule_context_rename_uri (RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp); -- cgit