aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorBertrand Guiheneuf <bertrand@src.gnome.org>1999-05-19 03:06:00 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-05-19 03:06:00 +0800
commit6476c5f2331cd73d0deb7d459d701ee9e13c7b88 (patch)
tree5c7fd3991cb36f55fe6a405e0d5496177a75aeb7 /camel
parentbf0960ab57f14c6abd9fa85dbb6ff379d23d9425 (diff)
downloadgsoc2013-evolution-6476c5f2331cd73d0deb7d459d701ee9e13c7b88.tar.gz
gsoc2013-evolution-6476c5f2331cd73d0deb7d459d701ee9e13c7b88.tar.zst
gsoc2013-evolution-6476c5f2331cd73d0deb7d459d701ee9e13c7b88.zip
tests
* tests/test1.c (main): tests * camel/camel-mime-message.c (_write_to_file): started write_to framework for mime_messages svn path=/trunk/; revision=931
Diffstat (limited to 'camel')
-rw-r--r--camel/camel-mime-message.c29
-rw-r--r--camel/camel-mime-part.c3
2 files changed, 30 insertions, 2 deletions
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index a92d0ccb44..69f1c93773 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -57,6 +57,8 @@ static gboolean _get_flag (CamelMimeMessage *mime_message, GString *flag);
static void _set_message_number (CamelMimeMessage *mime_message, guint number);
static guint _get_message_number (CamelMimeMessage *mime_message);
+static void _write_to_file(CamelDataWrapper *data_wrapper, FILE *file);
+
/* Returns the class for a CamelMimeMessage */
#define CMM_CLASS(so) CAMEL_MIME_MESSAGE_CLASS (GTK_OBJECT(so)->klass)
@@ -65,6 +67,9 @@ static guint _get_message_number (CamelMimeMessage *mime_message);
static void
camel_mime_message_class_init (CamelMimeMessageClass *camel_mime_message_class)
{
+ CamelDataWrapperClass *camel_data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS (camel_mime_message_class);
+ CamelMimePartClass *camel_mime_part_class = CAMEL_MIME_PART_CLASS (camel_mime_message_class);
+
parent_class = gtk_type_class (camel_mime_part_get_type ());
received_date_str = g_string_new("");
@@ -92,6 +97,7 @@ camel_mime_message_class_init (CamelMimeMessageClass *camel_mime_message_class)
camel_mime_message_class->get_message_number = _get_message_number;
/* virtual method overload */
+ camel_data_wrapper_class->write_to_file = _write_to_file;
}
@@ -144,7 +150,7 @@ static void
_set_field (CamelMimeMessage *mime_message, GString *name, GString *value, GString **variable)
{
if (variable) {
- if (*variable) G_string_free (*variable, FALSE);
+ if (*variable) g_string_free (*variable, FALSE);
*variable = value;
}
}
@@ -463,3 +469,24 @@ get_message_number (CamelMimeMessage *mime_message)
{
return CMM_CLASS (mime_message)->get_message_number (mime_message);
}
+
+
+
+
+#ifdef WHPTF
+#warning : WHPTF is already defined !!!!!!
+#endif
+#define WHPTF gmime_write_header_pair_to_file
+
+
+
+
+static void
+_write_to_file(CamelDataWrapper *data_wrapper, FILE *file)
+{
+ CamelMimeMessage *mm = CAMEL_MIME_MESSAGE (data_wrapper);
+
+ WHPTF ("Date", mm->sent_date);
+ CAMEL_DATA_WRAPPER_CLASS (parent_class)->write_to_file (data_wrapper, file);
+
+}
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index a79ef7efcc..416244ead9 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -460,6 +460,7 @@ camel_mime_part_get_content_object(CamelMimePart *mime_part)
#define WHPTF gmime_write_header_pair_to_file
+/* This is not used for the moment */
static void
_write_content_to_file (CamelMimePart *mime_part, FILE *file)
{
@@ -490,7 +491,7 @@ _write_to_file(CamelDataWrapper *data_wrapper, FILE *file)
CamelMimePart *mp = CAMEL_MIME_PART (data_wrapper);
gmime_content_field_write_to_file(data_wrapper->content_type, file);
gmime_content_field_write_to_file(mp->disposition, file);
- WHPTF (file, "Content-Transfer-Encoding:", mp->encoding);
+ WHPTF (file, "Content-Transfer-Encoding", mp->encoding);
WHPTF (file, "Content-Description", mp->description);
WHPTF (file, "Content-MD5", mp->content_MD5);
WHPTF (file, "Content-id", mp->content_id);