Mercurial > pidgin
annotate libpurple/protocols/msn/p2p.h @ 30772:1059e5d29cd9
This one is not needed here.
author | masca@cpw.pidgin.im |
---|---|
date | Fri, 04 Jun 2010 00:20:18 +0000 |
parents | f66e289bebc6 |
children | 3ccddae82532 |
rev | line source |
---|---|
30763 | 1 #ifndef MSN_P2P_H |
2 #define MSN_P2P_H | |
3 | |
4 | |
5 #pragma pack(push,1) | |
6 typedef struct { | |
7 guint32 session_id; | |
30764
d4869cd86680
Chang member name so it is compatible with MsnSlpHeader struct names.
masca@cpw.pidgin.im
parents:
30763
diff
changeset
|
8 guint32 id; |
30763 | 9 guint64 offset; |
10 guint64 total_size; | |
11 guint32 length; | |
12 guint32 flags; | |
13 guint32 ack_id; | |
30764
d4869cd86680
Chang member name so it is compatible with MsnSlpHeader struct names.
masca@cpw.pidgin.im
parents:
30763
diff
changeset
|
14 guint32 ack_sub_id; |
30763 | 15 guint64 ack_size; |
16 /* guint8 body[1]; */ | |
30767 | 17 } MsnP2PHeader; |
30763 | 18 #pragma pack(pop) |
19 | |
30766
c2e911eeffc9
Drop MsnSlpFooter in favor of MsnP2pFooter.
masca@cpw.pidgin.im
parents:
30764
diff
changeset
|
20 typedef struct |
c2e911eeffc9
Drop MsnSlpFooter in favor of MsnP2pFooter.
masca@cpw.pidgin.im
parents:
30764
diff
changeset
|
21 { |
c2e911eeffc9
Drop MsnSlpFooter in favor of MsnP2pFooter.
masca@cpw.pidgin.im
parents:
30764
diff
changeset
|
22 guint32 value; |
c2e911eeffc9
Drop MsnSlpFooter in favor of MsnP2pFooter.
masca@cpw.pidgin.im
parents:
30764
diff
changeset
|
23 } MsnP2PFooter; |
c2e911eeffc9
Drop MsnSlpFooter in favor of MsnP2pFooter.
masca@cpw.pidgin.im
parents:
30764
diff
changeset
|
24 |
30763 | 25 typedef enum |
26 { | |
27 P2P_NO_FLAG = 0x0, /**< No flags specified */ | |
28 P2P_OUT_OF_ORDER = 0x1, /**< Chunk out-of-order */ | |
29 P2P_ACK = 0x2, /**< Acknowledgement */ | |
30 P2P_PENDING_INVITE = 0x4, /**< There is a pending invite */ | |
31 P2P_BINARY_ERROR = 0x8, /**< Error on the binary level */ | |
32 P2P_MSN_OBJ_DATA = 0x20, /**< MsnObject data */ | |
33 P2P_WML2009_COMP = 0x1000000, /**< Compatibility with WLM 2009 */ | |
34 P2P_FILE_DATA = 0x1000030 /**< File transfer data */ | |
35 } MsnP2PHeaderFlag; | |
36 /* Info From: | |
37 * http://msnpiki.msnfanatic.com/index.php/MSNC:P2Pv1_Headers#Flags | |
38 * http://trac.kmess.org/changeset/ba04d0c825769d23370511031c47f6be75fe9b86 | |
39 * #7180 | |
40 */ | |
41 | |
30767 | 42 #define P2P_PACKET_HEADER_SIZE sizeof(MsnP2PHeader) |
30763 | 43 |
30768
f66e289bebc6
Move parsing of the p2p header to p2p to avoid duplicated code.
masca@cpw.pidgin.im
parents:
30767
diff
changeset
|
44 MsnP2PHeader * |
f66e289bebc6
Move parsing of the p2p header to p2p to avoid duplicated code.
masca@cpw.pidgin.im
parents:
30767
diff
changeset
|
45 msn_p2p_header_from_wire(MsnP2PHeader *wire); |
f66e289bebc6
Move parsing of the p2p header to p2p to avoid duplicated code.
masca@cpw.pidgin.im
parents:
30767
diff
changeset
|
46 |
f66e289bebc6
Move parsing of the p2p header to p2p to avoid duplicated code.
masca@cpw.pidgin.im
parents:
30767
diff
changeset
|
47 MsnP2PHeader * |
f66e289bebc6
Move parsing of the p2p header to p2p to avoid duplicated code.
masca@cpw.pidgin.im
parents:
30767
diff
changeset
|
48 msn_p2p_header_to_wire(MsnP2PHeader *header); |
30763 | 49 |
50 #endif /* MSN_P2P_H */ |