annotate libpurple/protocols/msn/slpcall.h @ 29778:cece09dbb119

merge of 'e9d34ab5e47f22b35fd2d69d61a2c943cc0653db' and 'fc3d5c2a3920e0875ac235415cea9fc7f5ed780c'
author Mark Doliner <mark@kingant.net>
date Thu, 18 Feb 2010 08:10:58 +0000
parents 462cb893521b
children 119bd7b072eb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 slpcall.h SLP Call functions
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 *
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
4 * purple
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 *
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
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_SLPCALL_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_SLPCALL_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
26
462cb893521b Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents: 29073
diff changeset
27 typedef struct _MsnSlpCall MsnSlpCall;
462cb893521b Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents: 29073
diff changeset
28
462cb893521b Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents: 29073
diff changeset
29 typedef enum
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 {
462cb893521b Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents: 29073
diff changeset
31 MSN_SLPCALL_ANY,
462cb893521b Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents: 29073
diff changeset
32 MSN_SLPCALL_DC
462cb893521b Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents: 29073
diff changeset
33 } MsnSlpCallType;
15374
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 #include "internal.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
36
23719
7b2fdeb078cd take an extra reference to PurpleXfer so we can check whether the whole
Ka-Hing Cheung <khc@hxbc.us>
parents: 23671
diff changeset
37 #include "ft.h"
15374
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 #include "slplink.h"
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 /* The official client seems to timeout slp calls after 5 minutes */
24342
9bdaf273c0ff Use purple_timeout_add_seconds() instead of purple_timeout_add() in a
Mark Doliner <mark@kingant.net>
parents: 24341
diff changeset
42 #define MSN_SLPCALL_TIMEOUT 300
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
44 struct _MsnSlpCall
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45 {
24341
b27908701f66 For some reason the slpmsg and slplink functions don't have underscores
Mark Doliner <mark@kingant.net>
parents: 24338
diff changeset
46 /* Our parent slplink */
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 MsnSlpLink *slplink;
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 MsnSlpCallType type;
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 /* Call-ID */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 char *id;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 char *branch;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
55 long session_id;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 long app_id;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
58 gboolean pending; /**< A flag that states if we should wait for this
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59 slpcall to start and do not time out. */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 gboolean progress; /**< A flag that states if there has been progress since
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 the last time out. */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62 gboolean wasted; /**< A flag that states if this slpcall is going to be
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
63 destroyed. */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64 gboolean started; /**< A flag that states if this slpcall's session has
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65 been initiated. */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
67 void (*progress_cb)(MsnSlpCall *slpcall,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
68 gsize total_length, gsize len, gsize offset);
23671
96e78c0fa32b Get rid of MsnSlpSession entirely. It only seems to link to MsnSlpCall
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 19680
diff changeset
69 void (*session_init_cb)(MsnSlpCall *slpcall);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
70
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71 /* Can be checksum, or smile */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72 char *data_info;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
73
23719
7b2fdeb078cd take an extra reference to PurpleXfer so we can check whether the whole
Ka-Hing Cheung <khc@hxbc.us>
parents: 23671
diff changeset
74 PurpleXfer *xfer;
29073
59b0c556f787 A quick and dirty hack to make MSN use the in-core code to perform FT.
Paul Aurich <paul@darkrain42.org>
parents: 24635
diff changeset
75 union {
59b0c556f787 A quick and dirty hack to make MSN use the in-core code to perform FT.
Paul Aurich <paul@darkrain42.org>
parents: 24635
diff changeset
76 GByteArray *incoming_data;
59b0c556f787 A quick and dirty hack to make MSN use the in-core code to perform FT.
Paul Aurich <paul@darkrain42.org>
parents: 24635
diff changeset
77 struct {
59b0c556f787 A quick and dirty hack to make MSN use the in-core code to perform FT.
Paul Aurich <paul@darkrain42.org>
parents: 24635
diff changeset
78 gsize len;
59b0c556f787 A quick and dirty hack to make MSN use the in-core code to perform FT.
Paul Aurich <paul@darkrain42.org>
parents: 24635
diff changeset
79 const guchar *data;
59b0c556f787 A quick and dirty hack to make MSN use the in-core code to perform FT.
Paul Aurich <paul@darkrain42.org>
parents: 24635
diff changeset
80 } outgoing;
59b0c556f787 A quick and dirty hack to make MSN use the in-core code to perform FT.
Paul Aurich <paul@darkrain42.org>
parents: 24635
diff changeset
81 } u;
59b0c556f787 A quick and dirty hack to make MSN use the in-core code to perform FT.
Paul Aurich <paul@darkrain42.org>
parents: 24635
diff changeset
82 MsnSlpMessage *xfer_msg; /* A dirty hack */
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
83
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84 MsnSlpCb cb;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 void (*end_cb)(MsnSlpCall *slpcall, MsnSession *session);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
86
24338
9b253ce969d0 msn_slplink_remove_slpcall() shouldn't be responsible for setting
Mark Doliner <mark@kingant.net>
parents: 24337
diff changeset
87 guint timer;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88 };
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89
24341
b27908701f66 For some reason the slpmsg and slplink functions don't have underscores
Mark Doliner <mark@kingant.net>
parents: 24338
diff changeset
90 MsnSlpCall *msn_slpcall_new(MsnSlpLink *slplink);
b27908701f66 For some reason the slpmsg and slplink functions don't have underscores
Mark Doliner <mark@kingant.net>
parents: 24338
diff changeset
91 void msn_slpcall_init(MsnSlpCall *slpcall, MsnSlpCallType type);
b27908701f66 For some reason the slpmsg and slplink functions don't have underscores
Mark Doliner <mark@kingant.net>
parents: 24338
diff changeset
92 void msn_slpcall_session_init(MsnSlpCall *slpcall);
b27908701f66 For some reason the slpmsg and slplink functions don't have underscores
Mark Doliner <mark@kingant.net>
parents: 24338
diff changeset
93 void msn_slpcall_destroy(MsnSlpCall *slpcall);
b27908701f66 For some reason the slpmsg and slplink functions don't have underscores
Mark Doliner <mark@kingant.net>
parents: 24338
diff changeset
94 void msn_slpcall_invite(MsnSlpCall *slpcall, const char *euf_guid,
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
95 int app_id, const char *context);
24341
b27908701f66 For some reason the slpmsg and slplink functions don't have underscores
Mark Doliner <mark@kingant.net>
parents: 24338
diff changeset
96 void msn_slpcall_close(MsnSlpCall *slpcall);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
97
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
98 #endif /* MSN_SLPCALL_H */