annotate src/protocols/msn/msn.h @ 12823:292a846fdeea

[gaim-migrate @ 15171] It seems like saved status sorting should be UTF-8 aware. I haven't tested this, but it seems right and compiles. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 11 Jan 2006 05:45:48 +0000
parents 32287ea1fce0
children cf1139f1ea01
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file msn.h The MSN protocol plugin
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 *
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 * gaim
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
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: 6516
diff changeset
9 *
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * (at your option) any later version.
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 *
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * GNU General Public License for more details.
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 *
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 */
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 #ifndef _MSN_H_
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 #define _MSN_H_
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26
10519
bec9130b24d2 [gaim-migrate @ 11833]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10504
diff changeset
27 /* #define MSN_DEBUG_MSG 1 */
bec9130b24d2 [gaim-migrate @ 11833]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10504
diff changeset
28 /* #define MSN_DEBUG_SLPMSG 1 */
bec9130b24d2 [gaim-migrate @ 11833]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10504
diff changeset
29 /* #define MSN_DEBUG_HTTP 1 */
bec9130b24d2 [gaim-migrate @ 11833]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10504
diff changeset
30
bec9130b24d2 [gaim-migrate @ 11833]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10504
diff changeset
31 /* #define MSN_DEBUG_SLP 1 */
bec9130b24d2 [gaim-migrate @ 11833]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10504
diff changeset
32 /* #define MSN_DEBUG_SLP_VERBOSE 1 */
bec9130b24d2 [gaim-migrate @ 11833]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10504
diff changeset
33 /* #define MSN_DEBUG_SLP_FILES 1 */
bec9130b24d2 [gaim-migrate @ 11833]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10504
diff changeset
34
11321
95fa774d216d [gaim-migrate @ 13525]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10684
diff changeset
35 /* #define MSN_DEBUG_NS 1 */
95fa774d216d [gaim-migrate @ 13525]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10684
diff changeset
36 /* #define MSN_DEBUG_SB 1 */
95fa774d216d [gaim-migrate @ 13525]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10684
diff changeset
37
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5717
diff changeset
38 #include "internal.h"
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents: 5564
diff changeset
40 #include "account.h"
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5717
diff changeset
41 #include "accountopt.h"
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
42 #include "blist.h"
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5717
diff changeset
43 #include "connection.h"
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents: 5564
diff changeset
44 #include "conversation.h"
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
45 #include "debug.h"
10684
72a5babfa8b4 [gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents: 10519
diff changeset
46 #include "cipher.h"
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5717
diff changeset
47 #include "notify.h"
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5717
diff changeset
48 #include "privacy.h"
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
49 #include "proxy.h"
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50 #include "prpl.h"
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5717
diff changeset
51 #include "request.h"
9193
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 8886
diff changeset
52 #include "servconn.h"
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 6516
diff changeset
53 #include "sslconn.h"
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5717
diff changeset
54 #include "util.h"
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5717
diff changeset
55
9193
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 8886
diff changeset
56 #include "ft.h"
502707ca1836 [gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents: 8886
diff changeset
57
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58 #define MSN_BUF_LEN 8192
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60 #define USEROPT_MSNSERVER 3
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
61 #define MSN_SERVER "messenger.hotmail.com"
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62 #define USEROPT_MSNPORT 4
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63 #define MSN_PORT 1863
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 #define MSN_TYPING_RECV_TIMEOUT 6
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 #define MSN_TYPING_SEND_TIMEOUT 4
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
68 #define HOTMAIL_URL "http://www.hotmail.com/cgi-bin/folders"
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
69 #define PASSPORT_URL "http://lc1.law13.hotmail.passport.com/cgi-bin/dologin?login="
6516
7c14b35bc984 [gaim-migrate @ 7033]
Luke Schierer <lschiere@pidgin.im>
parents: 6371
diff changeset
70 #define PROFILE_URL "http://members.msn.com/"
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
72 #define USEROPT_HOTMAIL 0
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73
10504
1a97d5e88d12 [gaim-migrate @ 11796]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10481
diff changeset
74 #define BUDDY_ALIAS_MAXLEN 387
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75
5309
e2e53316a21d [gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents: 5166
diff changeset
76 #define MSN_FT_GUID "{5D3E02AB-6190-11d3-BBBB-00C04F795683}"
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77
5316
d5690ed70085 [gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents: 5309
diff changeset
78 #define MSN_CLIENTINFO \
5475
ad9887c91a59 [gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents: 5316
diff changeset
79 "Client-Name: Gaim/" VERSION "\r\n" \
6786
8efafdc38718 [gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents: 6701
diff changeset
80 "Chat-Logging: Y\r\n"
5316
d5690ed70085 [gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents: 5309
diff changeset
81
6701
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 6516
diff changeset
82
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 6516
diff changeset
83 typedef enum
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 6516
diff changeset
84 {
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 6516
diff changeset
85 MSN_LIST_FL_OP = 0x01,
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 6516
diff changeset
86 MSN_LIST_AL_OP = 0x02,
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 6516
diff changeset
87 MSN_LIST_BL_OP = 0x04,
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 6516
diff changeset
88 MSN_LIST_RL_OP = 0x08
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 6516
diff changeset
89
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 6516
diff changeset
90 } MsnListOp;
b7e113a59b51 [gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents: 6516
diff changeset
91
7590
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
92 typedef enum
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
93 {
11622
32287ea1fce0 [gaim-migrate @ 13897]
Richard Laager <rlaager@wiktel.com>
parents: 11321
diff changeset
94 MSN_CLIENT_CAP_WIN_MOBILE = 0x00001,
32287ea1fce0 [gaim-migrate @ 13897]
Richard Laager <rlaager@wiktel.com>
parents: 11321
diff changeset
95 MSN_CLIENT_CAP_UNKNOWN_1 = 0x00002,
32287ea1fce0 [gaim-migrate @ 13897]
Richard Laager <rlaager@wiktel.com>
parents: 11321
diff changeset
96 MSN_CLIENT_CAP_INK_GIF = 0x00004,
32287ea1fce0 [gaim-migrate @ 13897]
Richard Laager <rlaager@wiktel.com>
parents: 11321
diff changeset
97 MSN_CLIENT_CAP_INK_ISF = 0x00008,
32287ea1fce0 [gaim-migrate @ 13897]
Richard Laager <rlaager@wiktel.com>
parents: 11321
diff changeset
98 MSN_CLIENT_CAP_VIDEO_CHAT = 0x00010,
32287ea1fce0 [gaim-migrate @ 13897]
Richard Laager <rlaager@wiktel.com>
parents: 11321
diff changeset
99 MSN_CLIENT_CAP_BASE = 0x00020,
32287ea1fce0 [gaim-migrate @ 13897]
Richard Laager <rlaager@wiktel.com>
parents: 11321
diff changeset
100 MSN_CLIENT_CAP_MSNMOBILE = 0x00040,
32287ea1fce0 [gaim-migrate @ 13897]
Richard Laager <rlaager@wiktel.com>
parents: 11321
diff changeset
101 MSN_CLIENT_CAP_MSNDIRECT = 0x00080,
32287ea1fce0 [gaim-migrate @ 13897]
Richard Laager <rlaager@wiktel.com>
parents: 11321
diff changeset
102 MSN_CLIENT_CAP_WEBMSGR = 0x00100,
32287ea1fce0 [gaim-migrate @ 13897]
Richard Laager <rlaager@wiktel.com>
parents: 11321
diff changeset
103 MSN_CLIENT_CAP_DIRECTIM = 0x04000,
32287ea1fce0 [gaim-migrate @ 13897]
Richard Laager <rlaager@wiktel.com>
parents: 11321
diff changeset
104 MSN_CLIENT_CAP_WINKS = 0x08000,
32287ea1fce0 [gaim-migrate @ 13897]
Richard Laager <rlaager@wiktel.com>
parents: 11321
diff changeset
105 MSN_CLIENT_CAP_SEARCH = 0x10000
7590
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
106
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
107 } MsnClientCaps;
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
108
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
109 typedef enum
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
110 {
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
111 MSN_CLIENT_VER_5_0 = 0x00,
11321
95fa774d216d [gaim-migrate @ 13525]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10684
diff changeset
112 MSN_CLIENT_VER_6_0 = 0x10, /* MSNC1 */
95fa774d216d [gaim-migrate @ 13525]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10684
diff changeset
113 MSN_CLIENT_VER_6_1 = 0x20, /* MSNC2 */
95fa774d216d [gaim-migrate @ 13525]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10684
diff changeset
114 MSN_CLIENT_VER_6_2 = 0x30, /* MSNC3 */
95fa774d216d [gaim-migrate @ 13525]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10684
diff changeset
115 MSN_CLIENT_VER_7_0 = 0x40, /* MSNC4 */
95fa774d216d [gaim-migrate @ 13525]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10684
diff changeset
116 MSN_CLIENT_VER_7_5 = 0x50 /* MSNC5 */
7590
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
117
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
118 } MsnClientVerId;
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
119
11321
95fa774d216d [gaim-migrate @ 13525]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10684
diff changeset
120 #define MSN_CLIENT_ID_VERSION MSN_CLIENT_VER_7_0
7590
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
121 #define MSN_CLIENT_ID_RESERVED_1 0x00
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
122 #define MSN_CLIENT_ID_RESERVED_2 0x00
10438
d90ece33e72f [gaim-migrate @ 11696]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10275
diff changeset
123 #define MSN_CLIENT_ID_CAPABILITIES MSN_CLIENT_CAP_BASE
7590
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
124
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
125 #define MSN_CLIENT_ID \
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
126 ((MSN_CLIENT_ID_VERSION << 24) | \
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
127 (MSN_CLIENT_ID_RESERVED_1 << 16) | \
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
128 (MSN_CLIENT_ID_RESERVED_2 << 8) | \
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
129 (MSN_CLIENT_ID_CAPABILITIES))
3a48ade4f510 [gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents: 6832
diff changeset
130
4542
86b0a0243be8 [gaim-migrate @ 4821]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131 #endif /* _MSN_H_ */