Sun, 06 Jun 2004 02:39:08 +0000
[gaim-migrate @ 9988]
Patch by Felipe Contreras to add MSN file transfer and buddy icons. Please
test and report any bugs!
committer: Christian Hammond <chipx86@chipx86.com>
| 4542 | 1 | /** |
| 2 | * @file msn.h The MSN protocol plugin | |
| 3 | * | |
| 4 | * gaim | |
| 5 | * | |
|
8475
3b5687726055
[gaim-migrate @ 9208]
Christian Hammond <chipx86@chipx86.com>
parents:
7590
diff
changeset
|
6 | * Copyright (C) 2003-2004 Christian Hammond <chipx86@gnupdate.org> |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
7 | * |
| 4542 | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation; either version 2 of the License, or | |
| 11 | * (at your option) any later version. | |
| 12 | * | |
| 13 | * This program is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * along with this program; if not, write to the Free Software | |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 | */ | |
| 22 | #ifndef _MSN_H_ | |
| 23 | #define _MSN_H_ | |
| 24 | ||
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
25 | #include "internal.h" |
| 4542 | 26 | |
| 5717 | 27 | #include "account.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
28 | #include "accountopt.h" |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
29 | #include "blist.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
30 | #include "connection.h" |
| 5717 | 31 | #include "conversation.h" |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
32 | #include "debug.h" |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
33 | #include "md5.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
34 | #include "notify.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
35 | #include "privacy.h" |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
36 | #include "proxy.h" |
| 4542 | 37 | #include "prpl.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
38 | #include "request.h" |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8886
diff
changeset
|
39 | #include "servconn.h" |
|
7590
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
40 | #include "sha.h" |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
41 | #include "sslconn.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
42 | #include "util.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
43 | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8886
diff
changeset
|
44 | #include "ft.h" |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8886
diff
changeset
|
45 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
46 | /* XXX */ |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
47 | #include "gaim.h" |
| 4542 | 48 | |
| 49 | #define MSN_BUF_LEN 8192 | |
| 50 | ||
| 51 | #define USEROPT_MSNSERVER 3 | |
| 52 | #define MSN_SERVER "messenger.hotmail.com" | |
| 53 | #define USEROPT_MSNPORT 4 | |
| 54 | #define MSN_PORT 1863 | |
| 55 | ||
| 56 | #define MSN_TYPING_RECV_TIMEOUT 6 | |
| 57 | #define MSN_TYPING_SEND_TIMEOUT 4 | |
| 58 | ||
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
59 | #define HOTMAIL_URL "http://www.hotmail.com/cgi-bin/folders" |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
60 | #define PASSPORT_URL "http://lc1.law13.hotmail.passport.com/cgi-bin/dologin?login=" |
| 6516 | 61 | #define PROFILE_URL "http://members.msn.com/" |
| 4542 | 62 | |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
63 | #define USEROPT_HOTMAIL 0 |
| 4542 | 64 | |
| 65 | ||
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
66 | #define MSN_FT_GUID "{5D3E02AB-6190-11d3-BBBB-00C04F795683}" |
| 4542 | 67 | |
|
5895
a0eef38294c1
[gaim-migrate @ 6327]
Mark Doliner <markdoliner@pidgin.im>
parents:
5872
diff
changeset
|
68 | #define MSN_CONNECT_STEPS 8 |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
69 | |
|
5316
ec9cbe50e70c
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
70 | #define MSN_CLIENTINFO \ |
|
5475
a2f856cac665
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
71 | "Client-Name: Gaim/" VERSION "\r\n" \ |
|
6786
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
72 | "Chat-Logging: Y\r\n" |
|
5316
ec9cbe50e70c
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
73 | |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
74 | |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
75 | typedef enum |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
76 | { |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
77 | MSN_LIST_FL_OP = 0x01, |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
78 | MSN_LIST_AL_OP = 0x02, |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
79 | MSN_LIST_BL_OP = 0x04, |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
80 | MSN_LIST_RL_OP = 0x08 |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
81 | |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
82 | } MsnListOp; |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
83 | |
|
7590
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
84 | typedef enum |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
85 | { |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
86 | MSN_CLIENT_CAP_WIN_MOBILE = 0x01, |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
87 | MSN_CLIENT_CAP_UNKNOWN_1 = 0x02, |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
88 | MSN_CLIENT_CAP_VIEW_INK = 0x04, |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
89 | MSN_CLIENT_CAP_SEND_INK = 0x08, |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
90 | MSN_CLIENT_CAP_VIDEO_CHAT = 0x10, |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
91 | MSN_CLIENT_CAP_BASE = 0x20, |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
92 | MSN_CLIENT_CAP_UNKNOWN_2 = 0x40, |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
93 | MSN_CLIENT_CAP_UNKNOWN_3 = 0x80 |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
94 | |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
95 | } MsnClientCaps; |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
96 | |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
97 | typedef enum |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
98 | { |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
99 | MSN_CLIENT_VER_5_0 = 0x00, |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
100 | MSN_CLIENT_VER_6_0 = 0x10, |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
101 | MSN_CLIENT_VER_6_1 = 0x20 |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
102 | |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
103 | } MsnClientVerId; |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
104 | |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
105 | #define MSN_CLIENT_ID_VERSION MSN_CLIENT_VER_6_0 |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
106 | #define MSN_CLIENT_ID_RESERVED_1 0x00 |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
107 | #define MSN_CLIENT_ID_RESERVED_2 0x00 |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
108 | #define MSN_CLIENT_ID_CAPABILITIES (MSN_CLIENT_CAP_BASE | MSN_CLIENT_CAP_VIEW_INK) |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
109 | |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
110 | #define MSN_CLIENT_ID \ |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
111 | ((MSN_CLIENT_ID_VERSION << 24) | \ |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
112 | (MSN_CLIENT_ID_RESERVED_1 << 16) | \ |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
113 | (MSN_CLIENT_ID_RESERVED_2 << 8) | \ |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
114 | (MSN_CLIENT_ID_CAPABILITIES)) |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
115 | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8886
diff
changeset
|
116 | void msn_request_buddy_icon(GaimConnection *gc, const char *who); |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8886
diff
changeset
|
117 | |
| 4542 | 118 | #endif /* _MSN_H_ */ |