diff options
author | Not Zed <NotZed@Ximian.com> | 2002-09-19 21:26:38 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-09-19 21:26:38 +0800 |
commit | 509ffe7ce332614f516a32739b96da048a9e21f7 (patch) | |
tree | 57138f347944689367e99183b7aa850ceee2d745 /camel/camel-filter-driver.c | |
parent | 41693f9a19aca811bf6edab18b967855ec2b129a (diff) | |
download | gsoc2013-evolution-509ffe7ce332614f516a32739b96da048a9e21f7.tar.gz gsoc2013-evolution-509ffe7ce332614f516a32739b96da048a9e21f7.tar.zst gsoc2013-evolution-509ffe7ce332614f516a32739b96da048a9e21f7.zip |
Take new session arg. Update callers. (symbols[]): changed get-source to
2002-09-19 Not Zed <NotZed@Ximian.com>
* camel-filter-search.c (camel_filter_search_match): Take new
session arg. Update callers.
(symbols[]): changed get-source to header-source
(header_source): Chagned from get_source. Now a boolean, returns
true if source matches one of the arguments. Uses the provider
url comparison directly for accurate checking. Makes 'filter on
source' work.
* camel-filter-driver.c (camel_filter_driver_new): Take new arg,
session.
(camel_filter_driver_finalise): Free session.
svn path=/trunk/; revision=18112
Diffstat (limited to 'camel/camel-filter-driver.c')
-rw-r--r-- | camel/camel-filter-driver.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c index eef5c2fa9e..7b229d5633 100644 --- a/camel/camel-filter-driver.c +++ b/camel/camel-filter-driver.c @@ -72,7 +72,9 @@ struct _filter_rule { struct _CamelFilterDriverPrivate { GHashTable *globals; /* global variables */ - + + CamelSession *session; + CamelFolder *defaultfolder; /* defualt folder */ CamelFilterStatusFunc *statusfunc; /* status callback */ @@ -256,7 +258,9 @@ camel_filter_driver_finalise (CamelObject *obj) g_free(node->name); g_free(node); } - + + camel_object_unref(p->session); + g_free (p); } @@ -266,9 +270,14 @@ camel_filter_driver_finalise (CamelObject *obj) * Return value: A new CamelFilterDriver object **/ CamelFilterDriver * -camel_filter_driver_new (void) +camel_filter_driver_new (CamelSession *session) { - return CAMEL_FILTER_DRIVER (camel_object_new(camel_filter_driver_get_type ())); + CamelFilterDriver *d = (CamelFilterDriver *)camel_object_new(camel_filter_driver_get_type()); + + d->priv->session = session; + camel_object_ref((CamelObject *)session); + + return d; } void @@ -1226,7 +1235,7 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage data.p = p; data.source_url = original_source_url; - result = camel_filter_search_match (get_message_cb, &data, p->info, + result = camel_filter_search_match (p->session, get_message_cb, &data, p->info, original_source_url ? original_source_url : source_url, node->match, p->ex); |