From 2392d67981785dac17f56305f8ee3fc0b5884694 Mon Sep 17 00:00:00 2001 From: bertrand Date: Fri, 3 Mar 2000 02:54:25 +0000 Subject: don't forget to set the state to 0 after 3. (my_read_encode): don't forget 2000-03-02 bertrand * camel-stream-b64.c (my_read_encode): don't forget to set the state to 0 after 3. (my_read_encode): don't forget to encode, even in state 3. * camel-simple-data-wrapper.c: static functions are prefixed with my_ instead of _ * camel-multipart.c: static functions are prefixed with my_ instead of _ (my_write_to_stream): commented. (my_write_to_stream): warning in case the boudary is set but is a zero length string. * camel-mime-part.c (camel_mime_part_encoding_from_string): remove debug trace. * camel-mime-part.c: Replaced all static functions with name begining with _ by the same name begining with "my_" to prevent the possible conflicts with system symbols Dan warned us about. Mime mail generation works now, at least with b64 encoding. QP needs to be done now. svn path=/trunk/; revision=2016 --- tests/test1.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test1.c b/tests/test1.c index 048b36e1ec..d967bb3566 100644 --- a/tests/test1.c +++ b/tests/test1.c @@ -78,7 +78,9 @@ main (int argc, char**argv) if (attachment_stream == NULL) { attachment_part = NULL; } else { - CamelDataWrapper *stream_wrapper; + CamelDataWrapper *attachment_wrapper; + + /*CamelDataWrapper *stream_wrapper; stream_wrapper = camel_stream_data_wrapper_new (attachment_stream); @@ -90,7 +92,21 @@ main (int argc, char**argv) stream_wrapper); camel_multipart_add_part (multipart, attachment_part); - gtk_object_unref (GTK_OBJECT (stream_wrapper)); + gtk_object_unref (GTK_OBJECT (stream_wrapper));*/ + + attachment_wrapper = CAMEL_DATA_WRAPPER (camel_simple_data_wrapper_new ()); + camel_data_wrapper_set_input_stream (attachment_wrapper, + attachment_stream); + + attachment_part = camel_mime_body_part_new (); + camel_mime_part_set_encoding (CAMEL_MIME_PART (attachment_part), + CAMEL_MIME_PART_ENCODING_BASE64); + camel_medium_set_content_object (CAMEL_MEDIUM (attachment_part), + attachment_wrapper); + camel_multipart_add_part (multipart, attachment_part); + + + } camel_medium_set_content_object (CAMEL_MEDIUM (message), CAMEL_DATA_WRAPPER (multipart)); -- cgit v1.2.3