Mercurial > pidgin
annotate libpurple/protocols/msn/slpmsg_part.h @ 31268:9562a7baa9e4
Add P2Pv2 header information to the P2P info struct. Of course, all
the v2 stuff does nothing right now.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 28 Feb 2011 00:19:29 +0000 |
parents | 34da321b60f1 |
children | 9a23c70bdb7a |
rev | line source |
---|---|
30969
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
1 /** |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
2 * @file slpmsg_part.h MSNSLP Parts |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
3 * |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
4 * purple |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
5 * |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
6 * Purple is the legal property of its developers, whose names are too numerous |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
7 * to list here. Please refer to the COPYRIGHT file distributed with this |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
8 * source distribution. |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
9 * |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
10 * This program is free software; you can redistribute it and/or modify |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
11 * it under the terms of the GNU General Public License as published by |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
12 * the Free Software Foundation; either version 2 of the License, or |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
13 * (at your option) any later version. |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
14 * |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
15 * This program is distributed in the hope that it will be useful, |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
18 * GNU General Public License for more details. |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
19 * |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
20 * You should have received a copy of the GNU General Public License |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
21 * along with this program; if not, write to the Free Software |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
23 */ |
72e6fa6caecc
These new files are missing GPL headers. And fix a couple incorrect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30847
diff
changeset
|
24 |
30796
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
25 #ifndef MSN_SLPMSG_PART_H |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
26 #define MSN_SLPMSG_PART_H |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
27 |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
28 #include "p2p.h" |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
29 |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
30 typedef struct _MsnSlpMessagePart MsnSlpMessagePart; |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
31 typedef void (*MsnSlpPartCb)(MsnSlpMessagePart *part, void *data); |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
32 |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
33 struct _MsnSlpMessagePart |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
34 { |
31031
61db10475bed
As Mark did before, we probably don't need a return value from these
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30969
diff
changeset
|
35 guint ref_count; |
30847
74c4aa38adfc
Add support to ref/unref SlpMessageParts.
masca@cpw.pidgin.im
parents:
30822
diff
changeset
|
36 |
31151
34da321b60f1
Try to hide all P2P fields away behind accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31036
diff
changeset
|
37 MsnP2PInfo *info; |
30796
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
38 |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
39 MsnSlpPartCb ack_cb; |
30822 | 40 MsnSlpPartCb nak_cb; |
30805
dfada77da5cb
Reomove MsnMessage reference from DirectConn.
masca@cpw.pidgin.im
parents:
30796
diff
changeset
|
41 void *ack_data; |
30796
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
42 |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
43 guchar *buffer; |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
44 size_t size; |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
45 }; |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
46 |
31151
34da321b60f1
Try to hide all P2P fields away behind accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31036
diff
changeset
|
47 MsnSlpMessagePart *msn_slpmsgpart_new(MsnP2PInfo *info); |
30796
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
48 |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
49 MsnSlpMessagePart *msn_slpmsgpart_new_from_data(const char *data, size_t data_len); |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
50 |
30847
74c4aa38adfc
Add support to ref/unref SlpMessageParts.
masca@cpw.pidgin.im
parents:
30822
diff
changeset
|
51 MsnSlpMessagePart *msn_slpmsgpart_ref(MsnSlpMessagePart *part); |
74c4aa38adfc
Add support to ref/unref SlpMessageParts.
masca@cpw.pidgin.im
parents:
30822
diff
changeset
|
52 |
31031
61db10475bed
As Mark did before, we probably don't need a return value from these
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30969
diff
changeset
|
53 void msn_slpmsgpart_unref(MsnSlpMessagePart *part); |
30847
74c4aa38adfc
Add support to ref/unref SlpMessageParts.
masca@cpw.pidgin.im
parents:
30822
diff
changeset
|
54 |
30796
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
55 void msn_slpmsgpart_set_bin_data(MsnSlpMessagePart *part, const void *data, size_t len); |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
56 |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
57 char *msn_slpmsgpart_serialize(MsnSlpMessagePart *part, size_t *ret_size); |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
58 |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
59 void msn_slpmsgpart_ack(MsnSlpMessagePart *part, void *data); |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
60 |
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
61 void msn_slpmsgpart_nak(MsnSlpMessagePart *part, void *data); |
31151
34da321b60f1
Try to hide all P2P fields away behind accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31036
diff
changeset
|
62 |
34da321b60f1
Try to hide all P2P fields away behind accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31036
diff
changeset
|
63 void msn_slpmsgpart_to_string(MsnSlpMessagePart *part, GString *str); |
34da321b60f1
Try to hide all P2P fields away behind accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31036
diff
changeset
|
64 |
30796
e545b2b6f66a
Introduce SlpMessagePart, It will replace MsnMessage in every Slp related code so MsnMessage just get used where it makes sense, in the Switchboard.
masca@cpw.pidgin.im
parents:
diff
changeset
|
65 #endif /* MSN_SLPMSG_PART_H */ |
31151
34da321b60f1
Try to hide all P2P fields away behind accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31036
diff
changeset
|
66 |