changeset 31239:fd8abea40a0d

Migrate MsnMessage code to use Parts instead of the whole SlpMessage.
author masca@cpw.pidgin.im
date Wed, 16 Jun 2010 22:12:07 +0000
parents e6447e4062da
children 0f26d510af1b
files libpurple/protocols/msn/msg.c
diffstat 1 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msg.c	Wed Jun 16 21:55:23 2010 +0000
+++ b/libpurple/protocols/msn/msg.c	Wed Jun 16 22:12:07 2010 +0000
@@ -259,7 +259,7 @@
 	if (content_type != NULL &&
 		!strcmp(content_type, "application/x-msnmsgrp2p")) {
 		msg->msnslp_message = TRUE;
-		msg->slpmsg = msn_slpmsg_new_from_data(tmp, payload_len - (tmp - tmp_base));
+		msg->part = msn_slpmsgpart_new_from_data(tmp, payload_len - (tmp - tmp_base));
 	}
 
 	if (payload_len - (tmp - tmp_base) > 0) {
@@ -303,7 +303,7 @@
 {
 	char *tmp;
 
-	tmp = msn_slpmsg_serialize(msg->slpmsg, ret_size);
+	tmp = msn_slpmsgpart_serialize(msg->part, ret_size);
 	return tmp;
 }
 
@@ -362,7 +362,7 @@
 		size_t siz;
 		char *body;
 		
-		body = msn_slpmsg_serialize(msg->slpmsg, &siz);
+		body = msn_slpmsgpart_serialize(msg->part, &siz);
 
 		memcpy(n, body, siz);
 		n += siz;
@@ -625,15 +625,15 @@
 
 	if (msg->msnslp_message)
 	{
-		g_string_append_printf(str, "Session ID: %u\r\n", msg->slpmsg->header->session_id);
-		g_string_append_printf(str, "ID:         %u\r\n", msg->slpmsg->header->id);
-		g_string_append_printf(str, "Offset:     %" G_GUINT64_FORMAT "\r\n", msg->slpmsg->header->offset);
-		g_string_append_printf(str, "Total size: %" G_GUINT64_FORMAT "\r\n", msg->slpmsg->header->total_size);
-		g_string_append_printf(str, "Length:     %u\r\n", msg->slpmsg->header->length);
-		g_string_append_printf(str, "Flags:      0x%x\r\n", msg->slpmsg->header->flags);
-		g_string_append_printf(str, "ACK ID:     %u\r\n", msg->slpmsg->header->ack_id);
-		g_string_append_printf(str, "SUB ID:     %u\r\n", msg->slpmsg->header->ack_sub_id);
-		g_string_append_printf(str, "ACK Size:   %" G_GUINT64_FORMAT "\r\n", msg->slpmsg->header->ack_size);
+		g_string_append_printf(str, "Session ID: %u\r\n", msg->part->header->session_id);
+		g_string_append_printf(str, "ID:         %u\r\n", msg->part->header->id);
+		g_string_append_printf(str, "Offset:     %" G_GUINT64_FORMAT "\r\n", msg->part->header->offset);
+		g_string_append_printf(str, "Total size: %" G_GUINT64_FORMAT "\r\n", msg->part->header->total_size);
+		g_string_append_printf(str, "Length:     %u\r\n", msg->part->header->length);
+		g_string_append_printf(str, "Flags:      0x%x\r\n", msg->part->header->flags);
+		g_string_append_printf(str, "ACK ID:     %u\r\n", msg->part->header->ack_id);
+		g_string_append_printf(str, "SUB ID:     %u\r\n", msg->part->header->ack_sub_id);
+		g_string_append_printf(str, "ACK Size:   %" G_GUINT64_FORMAT "\r\n", msg->part->header->ack_size);
 
 		if (purple_debug_is_verbose() && body != NULL)
 		{
@@ -660,7 +660,7 @@
 			}
 		}
 
-		g_string_append_printf(str, "Footer:     %u\r\n", msg->slpmsg->footer->value);
+		g_string_append_printf(str, "Footer:     %u\r\n", msg->part->footer->value);
 	}
 	else
 	{