changeset 30767:e5e712cf9f7e

Drop Binary from the struct name.
author masca@cpw.pidgin.im
date Thu, 03 Jun 2010 21:50:45 +0000
parents c2e911eeffc9
children f66e289bebc6
files libpurple/protocols/msn/directconn.c libpurple/protocols/msn/directconn.h libpurple/protocols/msn/msg.c libpurple/protocols/msn/msg.h libpurple/protocols/msn/p2p.h libpurple/protocols/msn/slplink.c libpurple/protocols/msn/slplink.h
diffstat 7 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c	Thu Jun 03 21:44:36 2010 +0000
+++ b/libpurple/protocols/msn/directconn.c	Thu Jun 03 21:50:45 2010 +0000
@@ -340,14 +340,14 @@
 static void
 msn_dc_parse_binary_header(MsnDirectConn *dc)
 {
-	MsnP2PBinaryHeader *h;
-	MsnP2PBinaryHeader *context;
+	MsnP2PHeader *h;
+	MsnP2PHeader *context;
 
 	g_return_if_fail(dc != NULL);
 
 	h = &dc->header;
 	/* Skip packet size */
-	context = (MsnP2PBinaryHeader *)(dc->in_buffer + 4);
+	context = (MsnP2PHeader *)(dc->in_buffer + 4);
 
 	h->session_id = GUINT32_FROM_LE(context->session_id);
 	h->id = GUINT32_FROM_LE(context->id);
@@ -362,8 +362,8 @@
 
 static const gchar *
 msn_dc_serialize_binary_header(MsnDirectConn *dc) {
-	MsnP2PBinaryHeader *h;
-	static MsnP2PBinaryHeader bin_header;
+	MsnP2PHeader *h;
+	static MsnP2PHeader bin_header;
 
 	g_return_val_if_fail(dc != NULL, NULL);
 
@@ -480,7 +480,7 @@
 	h = msn_dc_serialize_binary_header(dc);
 	memcpy(p->data, h, P2P_PACKET_HEADER_SIZE);
 
-	memcpy(p->data + offsetof(MsnP2PBinaryHeader, ack_id), dc->nonce, 16);
+	memcpy(p->data + offsetof(MsnP2PHeader, ack_id), dc->nonce, 16);
 
 	msn_dc_enqueue_packet(dc, p);
 }
@@ -524,7 +524,7 @@
 	if (packet_length != P2P_PACKET_HEADER_SIZE)
 		return FALSE;
 
-	memcpy(nonce, dc->in_buffer + 4 + offsetof(MsnP2PBinaryHeader, ack_id), 16);
+	memcpy(nonce, dc->in_buffer + 4 + offsetof(MsnP2PHeader, ack_id), 16);
 
 	if (dc->nonce_type == DC_NONCE_PLAIN) {
 		if (memcmp(dc->nonce, nonce, 16) == 0) {
--- a/libpurple/protocols/msn/directconn.h	Thu Jun 03 21:44:36 2010 +0000
+++ b/libpurple/protocols/msn/directconn.h	Thu Jun 03 21:50:45 2010 +0000
@@ -100,7 +100,7 @@
 	GQueue  *out_queue; /**< The outgoing packet queue */
 	int     msg_pos;    /**< The position of next byte to be sent in the actual packet */
 
-	MsnP2PBinaryHeader    header; /**< SLP header for parsing / serializing */
+	MsnP2PHeader    header; /**< SLP header for parsing / serializing */
 
 	/** The callback used for sending information to the peer about the opened socket */
 	void (*send_connection_info_msg_cb)(MsnDirectConn *);
--- a/libpurple/protocols/msn/msg.c	Thu Jun 03 21:44:36 2010 +0000
+++ b/libpurple/protocols/msn/msg.c	Thu Jun 03 21:50:45 2010 +0000
@@ -163,7 +163,7 @@
 void
 msn_message_parse_slp_body(MsnMessage *msg, const char *body, size_t len)
 {
-	MsnP2PBinaryHeader header;
+	MsnP2PHeader header;
 	const char *tmp;
 	int body_len;
 
@@ -298,7 +298,7 @@
 	if (content_type != NULL &&
 		!strcmp(content_type, "application/x-msnmsgrp2p"))
 	{
-		MsnP2PBinaryHeader header;
+		MsnP2PHeader header;
 		MsnP2PFooter footer;
 		int body_len;
 
@@ -384,7 +384,7 @@
 char *
 msn_message_gen_slp_body(MsnMessage *msg, size_t *ret_size)
 {
-	MsnP2PBinaryHeader header;
+	MsnP2PHeader header;
 
 	char *tmp, *base;
 	const void *body;
@@ -475,7 +475,7 @@
 
 	if (msg->msnslp_message)
 	{
-		MsnP2PBinaryHeader header;
+		MsnP2PHeader header;
 		MsnP2PFooter footer;
 
 		header.session_id = GUINT32_TO_LE(msg->msnslp_header.session_id);
--- a/libpurple/protocols/msn/msg.h	Thu Jun 03 21:44:36 2010 +0000
+++ b/libpurple/protocols/msn/msg.h	Thu Jun 03 21:50:45 2010 +0000
@@ -89,7 +89,7 @@
 	guint total_chunks;   /**< How many chunks in this multi-part message */
 	guint received_chunks; /**< How many chunks we've received so far */
 
-	MsnP2PBinaryHeader msnslp_header;
+	MsnP2PHeader msnslp_header;
 	MsnP2PFooter msnslp_footer;
 
 	GHashTable *header_table;
--- a/libpurple/protocols/msn/p2p.h	Thu Jun 03 21:44:36 2010 +0000
+++ b/libpurple/protocols/msn/p2p.h	Thu Jun 03 21:50:45 2010 +0000
@@ -15,7 +15,7 @@
 	guint32 ack_sub_id;
 	guint64 ack_size;
 /*	guint8  body[1]; */
-} MsnP2PBinaryHeader;
+} MsnP2PHeader;
 #pragma pack(pop)
 
 typedef struct
@@ -40,7 +40,7 @@
  * #7180
  */
 
-#define P2P_PACKET_HEADER_SIZE sizeof(MsnP2PBinaryHeader)
+#define P2P_PACKET_HEADER_SIZE sizeof(MsnP2PHeader)
 
 
 #endif /* MSN_P2P_H */
--- a/libpurple/protocols/msn/slplink.c	Thu Jun 03 21:44:36 2010 +0000
+++ b/libpurple/protocols/msn/slplink.c	Thu Jun 03 21:50:45 2010 +0000
@@ -493,7 +493,7 @@
 }
 
 static MsnSlpMessage *
-msn_slplink_create_ack(MsnSlpLink *slplink, MsnP2PBinaryHeader *header)
+msn_slplink_create_ack(MsnSlpLink *slplink, MsnP2PHeader *header)
 {
 	MsnSlpMessage *slpmsg;
 
@@ -511,7 +511,7 @@
 }
 
 static void
-msn_slplink_send_ack(MsnSlpLink *slplink, MsnP2PBinaryHeader *header)
+msn_slplink_send_ack(MsnSlpLink *slplink, MsnP2PHeader *header)
 {
 	MsnSlpMessage *slpmsg = msn_slplink_create_ack(slplink, header);
 
@@ -563,7 +563,7 @@
 }
 
 void
-msn_slplink_process_msg(MsnSlpLink *slplink, MsnP2PBinaryHeader *header, const char *data, gsize len)
+msn_slplink_process_msg(MsnSlpLink *slplink, MsnP2PHeader *header, const char *data, gsize len)
 {
 	MsnSlpMessage *slpmsg;
 	guint64 offset;
--- a/libpurple/protocols/msn/slplink.h	Thu Jun 03 21:44:36 2010 +0000
+++ b/libpurple/protocols/msn/slplink.h	Thu Jun 03 21:50:45 2010 +0000
@@ -81,7 +81,7 @@
 void msn_slplink_send_slpmsg(MsnSlpLink *slplink,
 							 MsnSlpMessage *slpmsg);
 void msn_slplink_send_queued_slpmsgs(MsnSlpLink *slplink);
-void msn_slplink_process_msg(MsnSlpLink *slplink, MsnP2PBinaryHeader *header, const char *data, gsize len);
+void msn_slplink_process_msg(MsnSlpLink *slplink, MsnP2PHeader *header, const char *data, gsize len);
 void msn_slplink_request_ft(MsnSlpLink *slplink, PurpleXfer *xfer);
 
 void msn_slplink_send_msg(MsnSlpLink *slplink, MsnMessage *msg);