aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-part.c
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@inria.fr>1999-05-12 05:20:28 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-05-12 05:20:28 +0800
commitbdc34487d7041757b5644103fcd2aad389d399c4 (patch)
tree949efa8a4d8bfaea4fe7ba7833c1cb5f3133a8ef /camel/camel-mime-part.c
parentfac699cd43f7f0939b473464d431e11213a150e5 (diff)
downloadgsoc2013-evolution-bdc34487d7041757b5644103fcd2aad389d399c4.tar.gz
gsoc2013-evolution-bdc34487d7041757b5644103fcd2aad389d399c4.tar.zst
gsoc2013-evolution-bdc34487d7041757b5644103fcd2aad389d399c4.zip
overload wrapper class method. (_write_to_file): start to write some text
1999-05-11 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/camel-mime-part.c (_write_to_file): overload wrapper class method. (_write_to_file): start to write some text in file. svn path=/trunk/; revision=904
Diffstat (limited to 'camel/camel-mime-part.c')
-rw-r--r--camel/camel-mime-part.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index 5bcd99332f..3427dccf8f 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -25,6 +25,8 @@
*/
#include "camel-mime-part.h"
+#include <stdio.h>
+
static CamelDataWrapperClass *parent_class=NULL;
@@ -51,6 +53,8 @@ static GList *_get_content_languages (CamelMimePart *mime_part);
static void _set_header_lines (CamelMimePart *mime_part, GList *header_lines);
static GList *_get_header_lines (CamelMimePart *mime_part);
+static CamelDataWrapper *_get_content_object(CamelMimePart *mime_part);
+static void _write_to_file(CamelDataWrapper *data_wrapper, FILE *file);
@@ -58,6 +62,7 @@ static GList *_get_header_lines (CamelMimePart *mime_part);
static void
camel_mime_part_class_init (CamelMimePartClass *camel_mime_part_class)
{
+ CamelDataWrapperClass *camel_data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS (camel_mime_part_class);
parent_class = gtk_type_class (camel_data_wrapper_get_type ());
/* virtual method definition */
@@ -81,8 +86,10 @@ camel_mime_part_class_init (CamelMimePartClass *camel_mime_part_class)
camel_mime_part_class->set_header_lines=_set_header_lines;
camel_mime_part_class->get_header_lines=_get_header_lines;
-
+ camel_mime_part_class->get_content_object = _get_content_object;
+
/* virtual method overload */
+ camel_data_wrapper_class->write_to_file = _write_to_file;
}
@@ -421,3 +428,30 @@ camel_mime_part_get_header_lines (CamelMimePart *mime_part)
+
+static CamelDataWrapper *
+_get_content_object(CamelMimePart *mime_part)
+{
+ return mime_part->content;
+
+}
+CamelDataWrapper *
+camel_mime_part_get_content_object(CamelMimePart *mime_part)
+{
+ return CMP_CLASS(mime_part)->get_content_object (mime_part);
+}
+
+#ifdef WHPTF
+#warning : WHPTF is already defined !!!!!!
+#endif
+#define WHPTF camel_mime_utils_write_header_pair_to_file
+
+static void
+_write_to_file(CamelDataWrapper *data_wrapper, FILE *file)
+{
+ CamelMimePart *mp = CAMEL_MIME_PART (data_wrapper);
+ WHPTF (file, "Content-type", CAMEL_DATA_WRAPPER(mp)->mime_type);
+ WHPTF (file, "Content-Description", mp->description);
+
+}
+