Mercurial > pidgin
annotate src/protocols/msn/session.h @ 10346:bbf738a0ce7b
[gaim-migrate @ 11560]
More more MSN bug fixes from Felipe Contreras, and I fixed up the
display of messages that failed to send so that it matches what you
tried to send and doesn't have kittens with html entities and such.
I added a GAIM_MESSAGE_RAW type in HEAD to make the display of such
messages even more accurate, but I don't think such a cosmetic change,
which would bump us to 1.2.0, is all that important for oldstatus.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 12 Dec 2004 17:37:36 +0000 |
parents | a7b2fd5efcf2 |
children | e5455f1dc9b6 |
rev | line source |
---|---|
5309 | 1 /** |
2 * @file session.h MSN session functions | |
3 * | |
4 * gaim | |
5 * | |
9198
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
6 * Gaim is the legal property of its developers, whose names are too numerous |
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
7 * to list here. Please refer to the COPYRIGHT file distributed with this |
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
8 * source distribution. |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5898
diff
changeset
|
9 * |
5309 | 10 * This program is free software; you can redistribute it and/or modify |
11 * it under the terms of the GNU General Public License as published by | |
12 * the Free Software Foundation; either version 2 of the License, or | |
13 * (at your option) any later version. | |
14 * | |
15 * This program is distributed in the hope that it will be useful, | |
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 * GNU General Public License for more details. | |
19 * | |
20 * You should have received a copy of the GNU General Public License | |
21 * along with this program; if not, write to the Free Software | |
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
23 */ | |
24 #ifndef _MSN_SESSION_H_ | |
25 #define _MSN_SESSION_H_ | |
26 | |
27 typedef struct _MsnSession MsnSession; | |
28 | |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5898
diff
changeset
|
29 #include "sslconn.h" |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
30 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
31 #include "notification.h" |
5309 | 32 #include "switchboard.h" |
33 #include "user.h" | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
34 #include "group.h" |
8171
d0ba2f7b40e7
[gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
7631
diff
changeset
|
35 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
36 #include "cmdproc.h" |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
37 #include "nexus.h" |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
38 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
39 #include "userlist.h" |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
40 #include "sync.h" |
5309 | 41 |
42 struct _MsnSession | |
43 { | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
44 GaimAccount *account; |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5327
diff
changeset
|
45 MsnUser *user; |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
46 int state; |
5309 | 47 |
7631 | 48 guint protocol_ver; |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5898
diff
changeset
|
49 |
9158
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8808
diff
changeset
|
50 char *dispatch_host; |
5309 | 51 int dispatch_port; |
52 | |
53 gboolean connected; | |
10296 | 54 gboolean logged_in; /**< A temporal flag to ignore local buddy list adds. */ |
55 gboolean destroying; /**< A flag that states if the session is being destroyed. */ | |
5309 | 56 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
57 MsnNotification *notification; |
8171
d0ba2f7b40e7
[gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
7631
diff
changeset
|
58 MsnNexus *nexus; |
d0ba2f7b40e7
[gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
7631
diff
changeset
|
59 |
7288
ff9127038a5a
[gaim-migrate @ 7869]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
60 gboolean http_method; |
8298
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
8171
diff
changeset
|
61 gint http_poll_timer; |
7288
ff9127038a5a
[gaim-migrate @ 7869]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
62 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
63 MsnUserList *userlist; |
10044 | 64 MsnUserList *sync_userlist; |
5309 | 65 |
8808
bbd8cdaf0ad5
[gaim-migrate @ 9570]
Christian Hammond <chipx86@chipx86.com>
parents:
8583
diff
changeset
|
66 int servconns_count; |
5309 | 67 GList *switches; |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
68 GList *directconns; |
5309 | 69 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
70 int conv_seq; |
5309 | 71 |
72 struct | |
73 { | |
74 char *kv; | |
75 char *sid; | |
76 char *mspauth; | |
77 unsigned long sl; | |
78 char *file; | |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5898
diff
changeset
|
79 char *client_ip; |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5898
diff
changeset
|
80 int client_port; |
5309 | 81 |
82 } passport_info; | |
83 | |
5322
a4d017bee1de
[gaim-migrate @ 5694]
Christian Hammond <chipx86@chipx86.com>
parents:
5318
diff
changeset
|
84 /* You have no idea how much I hate all that is below. */ |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
85 /* shx: What? ;) */ |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
86 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
87 MsnSync *sync; |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5898
diff
changeset
|
88 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
89 GList *slplinks; |
5309 | 90 }; |
91 | |
92 /** | |
93 * Creates an MSN session. | |
94 * | |
95 * @param account The account. | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
96 * @param host The dispatch server host. |
9158
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8808
diff
changeset
|
97 * @param port The dispatch server port. |
5309 | 98 * |
99 * @return The new MSN session. | |
100 */ | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
101 MsnSession *msn_session_new(GaimAccount *account, |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
102 const char *host, int port, |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
103 gboolean http_method); |
5309 | 104 |
105 /** | |
106 * Destroys an MSN session. | |
107 * | |
108 * @param session The MSN session to destroy. | |
109 */ | |
110 void msn_session_destroy(MsnSession *session); | |
111 | |
112 /** | |
113 * Connects to and initiates an MSN session. | |
114 * | |
115 * @param session The MSN session. | |
116 * | |
117 * @return @c TRUE on success, @c FALSE on failure. | |
118 */ | |
119 gboolean msn_session_connect(MsnSession *session); | |
120 | |
121 /** | |
122 * Disconnects from an MSN session. | |
123 * | |
124 * @param session The MSN session. | |
125 */ | |
126 void msn_session_disconnect(MsnSession *session); | |
127 | |
128 /** | |
129 * Finds a switchboard with the given chat ID. | |
130 * | |
131 * @param session The MSN session. | |
132 * @param chat_id The chat ID to search for. | |
133 * | |
134 * @return The switchboard, if found. | |
135 */ | |
136 MsnSwitchBoard *msn_session_find_switch_with_id(const MsnSession *session, | |
137 int chat_id); | |
138 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
139 MsnSwitchBoard *msn_session_find_swboard(MsnSession *session, |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
140 const char *username); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
141 MsnSwitchBoard *msn_session_get_swboard(MsnSession *session, |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
9158
diff
changeset
|
142 const char *username); |
5309 | 143 |
10044 | 144 void msn_session_finish_login(MsnSession *session); |
145 | |
5309 | 146 #endif /* _MSN_SESSION_H_ */ |