# HG changeset patch # User masca@cpw.pidgin.im # Date 1276031293 0 # Node ID 3ccddae8253233f524134b8b423caca091e2564c # Parent 74e372b31486d3da2a7a58730cfe70c92c76e1d1 Add P2PFooter helper functions. diff -r 74e372b31486 -r 3ccddae82532 libpurple/protocols/msn/p2p.c --- 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; +} + diff -r 74e372b31486 -r 3ccddae82532 libpurple/protocols/msn/p2p.h --- 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 */