gmime r1421 - trunk/examples
- From: fejj svn gnome org
- To: svn-commits-list gnome org
- Subject: gmime r1421 - trunk/examples
- Date: Sun, 31 Aug 2008 19:04:08 +0000 (UTC)
Author: fejj
Date: Sun Aug 31 19:04:08 2008
New Revision: 1421
URL: http://svn.gnome.org/viewvc/gmime?rev=1421&view=rev
Log:
updated
Modified:
trunk/examples/basic-example.c
trunk/examples/imap-example.c
Modified: trunk/examples/basic-example.c
==============================================================================
--- trunk/examples/basic-example.c (original)
+++ trunk/examples/basic-example.c Sun Aug 31 19:04:08 2008
@@ -295,13 +295,15 @@
multipart = g_mime_multipart_new_with_subtype ("mixed");
/* add our new text part to it */
- g_mime_multipart_add_part (multipart, (GMimeObject *) mime_part);
+ g_mime_multipart_add (multipart, (GMimeObject *) mime_part);
+ g_object_unref (mime_part);
/* now append the message's toplevel part to our multipart */
- g_mime_multipart_add_part (multipart, message->mime_part);
+ g_mime_multipart_add (multipart, message->mime_part);
/* now replace the message's toplevel mime part with our new multipart */
g_mime_message_set_mime_part (message, (GMimeObject *) multipart);
+ g_object_unref (multipart);
}
static void
@@ -317,7 +319,7 @@
multipart = (GMimeMultipart *) message->mime_part;
/* subpart indexes start at 0 */
- g_mime_multipart_remove_part_at (multipart, 0);
+ g_mime_multipart_remove_at (multipart, 0);
/* now we should be left with a toplevel multipart/mixed which
contains the mime parts of the original message */
Modified: trunk/examples/imap-example.c
==============================================================================
--- trunk/examples/imap-example.c (original)
+++ trunk/examples/imap-example.c Sun Aug 31 19:04:08 2008
@@ -107,7 +107,7 @@
GMimeObject *subpart;
int i, n;
- n = g_mime_multipart_get_number (multipart);
+ n = g_mime_multipart_get_count (multipart);
for (i = 0; i < n; i++) {
subpart = g_mime_multipart_get_part (multipart, i);
write_part_bodystructure (subpart, fp);
@@ -298,7 +298,7 @@
id = g_stpcpy (buf, spec);
*id++ = '.';
- n = g_mime_multipart_get_number (multipart);
+ n = g_mime_multipart_get_count (multipart);
for (i = 0; i < n; i++) {
subpart = g_mime_multipart_get_part (multipart, i);
sprintf (id, "%d", i + 1);
@@ -839,7 +839,7 @@
reconstruct_part_content ((GMimePart *) subpart, uid, subspec);
}
- g_mime_multipart_add_part (multipart, subpart);
+ g_mime_multipart_add (multipart, subpart);
g_object_unref (subpart);
part = part->next;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]