aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--tests/test1.c27
-rw-r--r--tests/test10.c25
3 files changed, 33 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a0b46a5b7..116493cebf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-04-27 NotZed <NotZed@HelixCode.com>
+
+ * tests/test10.c: Fix for removal of camelmimebodypart, and changes
+ to recipient stuff.
+
+ * tests/test1.c: Fix for removal of camelmimebodypart, and changes
+ to recipient stuff.
+
2000-04-27 Christopher James Lahey <clahey@helixcode.com>
* configure.in: Added addressbook/ename/Makefile.
diff --git a/tests/test1.c b/tests/test1.c
index 29e5f1dac1..97c6b3ebed 100644
--- a/tests/test1.c
+++ b/tests/test1.c
@@ -3,7 +3,6 @@
#include <stdio.h>
#include "camel-mime-message.h"
-#include "camel-mime-body-part.h"
#include "camel-multipart.h"
#include "camel-stream.h"
#include "camel-stream-fs.h"
@@ -15,8 +14,8 @@ main (int argc, char**argv)
{
CamelMimeMessage *message;
CamelMultipart *multipart;
- CamelMimeBodyPart *body_part;
- CamelMimeBodyPart *attachment_part;
+ CamelMimePart *body_part;
+ CamelMimePart *attachment_part;
CamelStream *attachment_stream;
/* FILE *output_file; */
@@ -56,21 +55,22 @@ main (int argc, char**argv)
camel_mime_message_set_from (message, g_strdup ("Bertrand.Guiheneuf@aful.org"));
camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO,
- g_strdup ("franck.dechamps@alseve.fr"));
+ "Franck DeChamps", "franck.dechamps@alseve.fr");
camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO,
- g_strdup ("mc@alseve.fr"));
+ NULL, "mc@alseve.fr");
camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO,
- g_strdup ("richard.lengagne@inria.fr"));
+ "Richo", "richard.lengagne@inria.fr");
camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC,
- g_strdup ("Francois.fleuret@inria.fr"));
+ "Frank", "Francois.fleuret@inria.fr");
camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC,
- g_strdup ("maury@justmagic.com"));
+ NULL, "maury@justmagic.com");
camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_BCC,
- g_strdup ("Bertrand.Guiheneuf@aful.org"));
+ "Bertie", "Bertrand.Guiheneuf@aful.org");
multipart = camel_multipart_new ();
- body_part = camel_mime_body_part_new ();
- camel_mime_part_set_text (CAMEL_MIME_PART (body_part), "This is a test.\nThis is only a test.\n");
+ body_part = camel_mime_part_new ();
+ camel_mime_part_set_content (CAMEL_MIME_PART (body_part), "This is a test.\nThis is only a test.\n",
+ strlen("This is a test.\nThis is only a test.\n"), "text/plain");
camel_multipart_add_part (multipart, body_part);
if (attachment_stream == NULL) {
@@ -96,15 +96,12 @@ main (int argc, char**argv)
camel_data_wrapper_construct_from_stream (attachment_wrapper,
attachment_stream);
- attachment_part = camel_mime_body_part_new ();
+ attachment_part = camel_mime_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));
diff --git a/tests/test10.c b/tests/test10.c
index 0beecb598e..5e20d2f6db 100644
--- a/tests/test10.c
+++ b/tests/test10.c
@@ -18,7 +18,7 @@ static CamelMimeMessage *
create_sample_mime_message ()
{
CamelMimeMessage *message;
- CamelMimeBodyPart *body_part;
+ CamelMimePart *body_part;
CamelMultipart *multipart;
@@ -30,26 +30,27 @@ create_sample_mime_message ()
camel_medium_add_header (CAMEL_MEDIUM (message), "X-test2", "the value of another test");
camel_mime_message_set_date (message, time(0), 200);
- camel_mime_message_set_subject (message, g_strdup ("A test message"));
- camel_mime_message_set_reply_to (message, g_strdup ("toto@toto.com"));
- camel_mime_message_set_from (message, g_strdup ("Bertrand.Guiheneuf@aful.org"));
+ camel_mime_message_set_subject (message, "A test message");
+ camel_mime_message_set_reply_to (message, "toto@toto.com");
+ camel_mime_message_set_from (message, "Bertrand.Guiheneuf@aful.org");
camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO,
- g_strdup ("franck.dechamps@alseve.fr"));
+ "Franck DeChamps", "franck.dechamps@alseve.fr");
camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO,
- g_strdup ("mc@alseve.fr"));
+ NULL, "mc@alseve.fr");
camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO,
- g_strdup ("richard.lengagne@inria.fr"));
+ "Richo", "richard.lengagne@inria.fr");
camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC,
- g_strdup ("Francois.fleuret@inria.fr"));
+ "Frank", "Francois.fleuret@inria.fr");
camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC,
- g_strdup ("maury@justmagic.com"));
+ NULL, "maury@justmagic.com");
camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_BCC,
- g_strdup ("Bertrand.Guiheneuf@aful.org"));
+ "Bertie", "Bertrand.Guiheneuf@aful.org");
multipart = camel_multipart_new ();
- body_part = camel_mime_body_part_new ();
- camel_mime_part_set_text (CAMEL_MIME_PART (body_part), "This is a test.\nThis is only a test.\n");
+ body_part = camel_mime_part_new ();
+ camel_mime_part_set_content (CAMEL_MIME_PART (body_part), "This is a test.\nThis is only a test.\n",
+ strlen("This is a test.\nThis is only a test.\n"), "text/plain");
camel_multipart_add_part (multipart, body_part);
camel_medium_set_content_object (CAMEL_MEDIUM (message), CAMEL_DATA_WRAPPER (multipart));