diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 11 | ||||
-rw-r--r-- | camel/camel-filter-driver.c | 3 | ||||
-rw-r--r-- | camel/camel-mime-message.c | 18 | ||||
-rw-r--r-- | camel/camel-mime-message.h | 3 |
4 files changed, 31 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index f250eba4eb..0106940ea4 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,14 @@ +2001-03-29 Jon Trowbridge <trow@ximian.com> + + * camel-filter-driver.c (camel_filter_driver_filter_message): Save + the source URL using camel_mime_message_set_source. + + * camel-mime-message.c (camel_mime_message_set_source): Renamed + camel_mime_message_set_identity to this. Sets the X-Evolution-Source + header. + (camel_mime_message_get_source): Returns the X-Evolution-Source + header. + 2001-03-29 Kjartan Maraas <kmaraas@gnome.org> * broken-date-parser.c: #include <stdio.h>, <stdlib.h> and <string.h> diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c index db1f86314e..6c650d3c2c 100644 --- a/camel/camel-filter-driver.c +++ b/camel/camel-filter-driver.c @@ -849,7 +849,8 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage p->uid = uid; p->source = source; - /* camel_mime_message_set_identity (message, source_url); */ + if (camel_mime_message_get_source (message) == NULL) + camel_mime_message_set_source (message, source_url); node = (struct _filter_rule *)p->rules.head; while (node->next) { diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c index 3728921612..1437744260 100644 --- a/camel/camel-mime-message.c +++ b/camel/camel-mime-message.c @@ -28,6 +28,7 @@ #include <config.h> #endif +#include <ctype.h> #include <stdio.h> #include <string.h> @@ -401,10 +402,23 @@ camel_mime_message_set_recipients(CamelMimeMessage *mime_message, const char *ty } void -camel_mime_message_set_identity(CamelMimeMessage *mime_message, const char *identity) +camel_mime_message_set_source(CamelMimeMessage *mime_message, const char *src) { g_assert (mime_message); - camel_medium_add_header (CAMEL_MEDIUM (mime_message), "X-Evolution-Identity", identity); + camel_medium_add_header (CAMEL_MEDIUM (mime_message), "X-Evolution-Source", src); +} + +const char * +camel_mime_message_get_source(CamelMimeMessage *mime_message) +{ + const char *src; + g_assert(mime_message); + src = camel_medium_get_header (CAMEL_MEDIUM (mime_message), "X-Evolution-Source"); + if (src) { + while (*src && isspace ((gint) *src)) + ++src; + } + return src; } const CamelInternetAddress * diff --git a/camel/camel-mime-message.h b/camel/camel-mime-message.h index 8d24245638..47c390a5a5 100644 --- a/camel/camel-mime-message.h +++ b/camel/camel-mime-message.h @@ -115,8 +115,9 @@ void camel_mime_message_set_recipients (CamelMimeMess const char *type, const CamelInternetAddress *r); -void camel_mime_message_set_identity (CamelMimeMessage *mime_message, +void camel_mime_message_set_source (CamelMimeMessage *mime_message, const char *identity); +const char *camel_mime_message_get_source (CamelMimeMessage *mime_message); /* utility functions */ |