changeset 31220:3ccddae82532

Add P2PFooter helper functions.
author masca@cpw.pidgin.im
date Tue, 08 Jun 2010 21:08:13 +0000
parents 74e372b31486
children 09f2a7d2ac99
files libpurple/protocols/msn/p2p.c libpurple/protocols/msn/p2p.h
diffstat 2 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/p2p.c	Tue Jun 08 01:45:49 2010 +0000
+++ b/libpurple/protocols/msn/p2p.c	Tue Jun 08 21:08:13 2010 +0000
@@ -43,3 +43,27 @@
 
 }
 
+MsnP2PFooter *
+msn_p2p_footer_from_wire(MsnP2PFooter *wire)
+{
+	MsnP2PFooter *footer;
+
+	footer = g_new(MsnP2PFooter, 1);
+
+	footer->value = GUINT32_FROM_BE(wire->value);
+
+	return footer;
+}
+
+MsnP2PFooter *
+msn_p2p_footer_to_wire(MsnP2PFooter *footer)
+{
+	MsnP2PFooter *wire;
+
+	wire = g_new(MsnP2PFooter, 1);
+
+	wire->value = GUINT32_TO_BE(footer->value);
+
+	return wire;
+}
+
--- a/libpurple/protocols/msn/p2p.h	Tue Jun 08 01:45:49 2010 +0000
+++ b/libpurple/protocols/msn/p2p.h	Tue Jun 08 21:08:13 2010 +0000
@@ -47,4 +47,10 @@
 MsnP2PHeader *
 msn_p2p_header_to_wire(MsnP2PHeader *header);
 
+MsnP2PFooter *
+msn_p2p_footer_from_wire(MsnP2PFooter *wire);
+
+MsnP2PFooter *
+msn_p2p_footer_to_wire(MsnP2PFooter *footer);
+
 #endif /* MSN_P2P_H */