Mercurial > pidgin.yaz
annotate libpurple/protocols/msn/slplink.h @ 31430:94b3092c904d
Apparently, UBM was updated with more parameters in MSNp16. One is
your own email address, but I'm not sure what the 4th parameter is.
Anyway, update payload length to use the correct parameter now.
Fixes #13022.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Thu, 02 Dec 2010 03:59:58 +0000 |
parents | 2d00d29a45fd |
children | 61db10475bed |
rev | line source |
---|---|
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 * @file slplink.h MSNSLP Link support |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * |
15823 | 4 * purple |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 * |
15823 | 6 * Purple is the legal property of its developers, whose names are too numerous |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 * to list here. Please refer to the COPYRIGHT file distributed with this |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 * source distribution. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * This program is free software; you can redistribute it and/or modify |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * it under the terms of the GNU General Public License as published by |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * the Free Software Foundation; either version 2 of the License, or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * This program is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * GNU General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 * along with this program; if not, write to the Free Software |
19680
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15823
diff
changeset
|
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 */ |
29373
462cb893521b
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents:
29073
diff
changeset
|
24 #ifndef MSN_SLPLINK_H |
462cb893521b
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents:
29073
diff
changeset
|
25 #define MSN_SLPLINK_H |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
27 typedef struct _MsnSlpLink MsnSlpLink; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
28 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 #include "directconn.h" |
29373
462cb893521b
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents:
29073
diff
changeset
|
30 #include "session.h" |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 #include "slpcall.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
32 #include "slpmsg.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 #include "switchboard.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
34 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 typedef void (*MsnSlpCb)(MsnSlpCall *slpcall, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 const guchar *data, gsize size); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 typedef void (*MsnSlpEndCb)(MsnSlpCall *slpcall, MsnSession *session); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
38 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
39 struct _MsnSlpLink |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
40 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
41 MsnSession *session; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
42 MsnSwitchBoard *swboard; |
30433
119bd7b072eb
Initial support for direct connections. Preliminary patch from ticket #247
kukkerman@gmail.com
parents:
29373
diff
changeset
|
43 MsnDirectConn *dc; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
44 |
30174
b0bc67f42027
Fix a possible use-after-free.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29373
diff
changeset
|
45 int refs; |
b0bc67f42027
Fix a possible use-after-free.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29373
diff
changeset
|
46 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
47 char *remote_user; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
48 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
49 int slp_seq_id; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
50 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
51 GList *slp_calls; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
52 GList *slp_msgs; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
53 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
54 GQueue *slp_msg_queue; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
55 }; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
56 |
30174
b0bc67f42027
Fix a possible use-after-free.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29373
diff
changeset
|
57 MsnSlpLink *msn_slplink_ref(MsnSlpLink *slplink); |
b0bc67f42027
Fix a possible use-after-free.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29373
diff
changeset
|
58 void msn_slplink_unref(MsnSlpLink *slplink); |
b0bc67f42027
Fix a possible use-after-free.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29373
diff
changeset
|
59 |
23307
27f7fae4a361
Add a few bits of documentation
Mark Doliner <mark@kingant.net>
parents:
23306
diff
changeset
|
60 /** |
27f7fae4a361
Add a few bits of documentation
Mark Doliner <mark@kingant.net>
parents:
23306
diff
changeset
|
61 * @return An MsnSlpLink for the given user, or NULL if there is no |
27f7fae4a361
Add a few bits of documentation
Mark Doliner <mark@kingant.net>
parents:
23306
diff
changeset
|
62 * existing MsnSlpLink. |
27f7fae4a361
Add a few bits of documentation
Mark Doliner <mark@kingant.net>
parents:
23306
diff
changeset
|
63 */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
64 MsnSlpLink *msn_session_find_slplink(MsnSession *session, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
65 const char *who); |
23307
27f7fae4a361
Add a few bits of documentation
Mark Doliner <mark@kingant.net>
parents:
23306
diff
changeset
|
66 |
27f7fae4a361
Add a few bits of documentation
Mark Doliner <mark@kingant.net>
parents:
23306
diff
changeset
|
67 /** |
27f7fae4a361
Add a few bits of documentation
Mark Doliner <mark@kingant.net>
parents:
23306
diff
changeset
|
68 * @return An MsnSlpLink for the given user. One will be created if |
27f7fae4a361
Add a few bits of documentation
Mark Doliner <mark@kingant.net>
parents:
23306
diff
changeset
|
69 * it does not already exist. |
27f7fae4a361
Add a few bits of documentation
Mark Doliner <mark@kingant.net>
parents:
23306
diff
changeset
|
70 */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
71 MsnSlpLink *msn_session_get_slplink(MsnSession *session, const char *username); |
23307
27f7fae4a361
Add a few bits of documentation
Mark Doliner <mark@kingant.net>
parents:
23306
diff
changeset
|
72 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
73 void msn_slplink_add_slpcall(MsnSlpLink *slplink, MsnSlpCall *slpcall); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
74 void msn_slplink_remove_slpcall(MsnSlpLink *slplink, MsnSlpCall *slpcall); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
75 MsnSlpCall *msn_slplink_find_slp_call(MsnSlpLink *slplink, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
76 const char *id); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
77 MsnSlpCall *msn_slplink_find_slp_call_with_session_id(MsnSlpLink *slplink, long id); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
78 void msn_slplink_queue_slpmsg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
79 void msn_slplink_send_slpmsg(MsnSlpLink *slplink, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
80 MsnSlpMessage *slpmsg); |
24344
bceefbae1ca6
Reame msn_slplink_unleash to msn_slplink_send_queued_slpmsgs, which I
Mark Doliner <mark@kingant.net>
parents:
24339
diff
changeset
|
81 void msn_slplink_send_queued_slpmsgs(MsnSlpLink *slplink); |
31296
2d00d29a45fd
Process SlpMessageParts, a sequence of parts will generate a SlpMessage.
masca@cpw.pidgin.im
parents:
31269
diff
changeset
|
82 void msn_slplink_process_msg(MsnSlpLink *slplink, MsnSlpMessagePart *part); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
83 |
29073
59b0c556f787
A quick and dirty hack to make MSN use the in-core code to perform FT.
Paul Aurich <paul@darkrain42.org>
parents:
24346
diff
changeset
|
84 /* Only exported for msn_xfer_write */ |
59b0c556f787
A quick and dirty hack to make MSN use the in-core code to perform FT.
Paul Aurich <paul@darkrain42.org>
parents:
24346
diff
changeset
|
85 void msn_slplink_send_msgpart(MsnSlpLink *slplink, MsnSlpMessage *slpmsg); |
59b0c556f787
A quick and dirty hack to make MSN use the in-core code to perform FT.
Paul Aurich <paul@darkrain42.org>
parents:
24346
diff
changeset
|
86 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
87 void msn_slplink_request_object(MsnSlpLink *slplink, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
88 const char *info, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
89 MsnSlpCb cb, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
90 MsnSlpEndCb end_cb, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
91 const MsnObject *obj); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
92 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
93 MsnSlpCall *msn_slp_process_msg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
94 |
29373
462cb893521b
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents:
29073
diff
changeset
|
95 #endif /* MSN_SLPLINK_H */ |