Mercurial > pidgin
comparison src/protocols/oscar/aim.h @ 2821:9467e4ee81be
[gaim-migrate @ 2834]
new libfaim stuff.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 01 Dec 2001 00:56:31 +0000 |
parents | b8967c961056 |
children | 6d62d4520460 |
comparison
equal
deleted
inserted
replaced
2820:b917845dad3c | 2821:9467e4ee81be |
---|---|
128 #define AIM_COOKIELEN 0x100 | 128 #define AIM_COOKIELEN 0x100 |
129 | 129 |
130 #define AIM_MD5_STRING "AOL Instant Messenger (SM)" | 130 #define AIM_MD5_STRING "AOL Instant Messenger (SM)" |
131 | 131 |
132 /* | 132 /* |
133 * Client info. Filled in by the client and passed | 133 * Client info. Filled in by the client and passed in to |
134 * in to aim_login(). The information ends up | 134 * aim_send_login(). The information ends up getting passed to OSCAR |
135 * getting passed to OSCAR through the initial | 135 * through the initial login command. |
136 * login command. | |
137 * | |
138 * XXX: Should this be per-session? -mid | |
139 * | 136 * |
140 */ | 137 */ |
141 struct client_info_s { | 138 struct client_info_s { |
142 char clientstring[100]; /* arbitrary size */ | 139 const char *clientstring; |
140 fu16_t clientid; | |
143 int major; | 141 int major; |
144 int minor; | 142 int minor; |
143 int point; | |
145 int build; | 144 int build; |
146 char country[3]; | 145 const char *country; /* two-letter abbrev */ |
147 char lang[3]; | 146 const char *lang; /* two-letter abbrev */ |
148 int major2; | |
149 int minor2; | |
150 long unknown; | |
151 }; | 147 }; |
152 | 148 |
153 #define AIM_CLIENTINFO_KNOWNGOOD_3_5_1670 { \ | 149 #define AIM_CLIENTINFO_KNOWNGOOD_3_5_1670 { \ |
154 "AOL Instant Messenger (SM), version 3.5.1670/WIN32", \ | 150 "AOL Instant Messenger (SM), version 3.5.1670/WIN32", \ |
151 0x0004, \ | |
155 0x0003, \ | 152 0x0003, \ |
156 0x0005, \ | 153 0x0005, \ |
154 0x0000, \ | |
157 0x0686, \ | 155 0x0686, \ |
158 "us", \ | 156 "us", \ |
159 "en", \ | 157 "en", \ |
160 0x0004, \ | |
161 0x0000, \ | |
162 0x0000002a, \ | |
163 } | 158 } |
164 | 159 |
165 #define AIM_CLIENTINFO_KNOWNGOOD_4_1_2010 { \ | 160 #define AIM_CLIENTINFO_KNOWNGOOD_4_1_2010 { \ |
166 "AOL Instant Messenger (SM), version 4.1.2010/WIN32", \ | 161 "AOL Instant Messenger (SM), version 4.1.2010/WIN32", \ |
167 0x0004, \ | 162 0x0004, \ |
163 0x0004, \ | |
168 0x0001, \ | 164 0x0001, \ |
165 0x0000, \ | |
169 0x07da, \ | 166 0x07da, \ |
170 "us", \ | 167 "us", \ |
171 "en", \ | 168 "en", \ |
172 0x0004, \ | |
173 0x0000, \ | |
174 0x0000004b, \ | |
175 } | 169 } |
176 | 170 |
177 /* | 171 /* |
178 * I would make 4.1.2010 the default, but they seem to have found | 172 * I would make 4.1.2010 the default, but they seem to have found |
179 * an alternate way of breaking that one. | 173 * an alternate way of breaking that one. |
334 * | 328 * |
335 */ | 329 */ |
336 int (*tx_enqueue)(struct aim_session_s *, aim_frame_t *); | 330 int (*tx_enqueue)(struct aim_session_s *, aim_frame_t *); |
337 | 331 |
338 /* | 332 /* |
339 * This is a dreadful solution to the what-room-are-we-joining | |
340 * problem. (There's no connection between the service | |
341 * request and the resulting redirect.) | |
342 */ | |
343 char *pendingjoin; | |
344 fu16_t pendingjoinexchange; | |
345 | |
346 /* | |
347 * Outstanding snac handling | 333 * Outstanding snac handling |
348 * | 334 * |
349 * XXX: Should these be per-connection? -mid | 335 * XXX: Should these be per-connection? -mid |
350 */ | 336 */ |
351 void *snac_hash[FAIM_SNAC_HASH_SIZE]; | 337 void *snac_hash[FAIM_SNAC_HASH_SIZE]; |
463 faim_internal char *aim_gettlv_str(aim_tlvlist_t *, const fu16_t t, const int n); | 449 faim_internal char *aim_gettlv_str(aim_tlvlist_t *, const fu16_t t, const int n); |
464 faim_internal fu8_t aim_gettlv8(aim_tlvlist_t *list, const fu16_t type, const int num); | 450 faim_internal fu8_t aim_gettlv8(aim_tlvlist_t *list, const fu16_t type, const int num); |
465 faim_internal fu16_t aim_gettlv16(aim_tlvlist_t *list, const fu16_t t, const int n); | 451 faim_internal fu16_t aim_gettlv16(aim_tlvlist_t *list, const fu16_t t, const int n); |
466 faim_internal fu32_t aim_gettlv32(aim_tlvlist_t *list, const fu16_t t, const int n); | 452 faim_internal fu32_t aim_gettlv32(aim_tlvlist_t *list, const fu16_t t, const int n); |
467 faim_internal int aim_writetlvchain(aim_bstream_t *bs, aim_tlvlist_t **list); | 453 faim_internal int aim_writetlvchain(aim_bstream_t *bs, aim_tlvlist_t **list); |
454 faim_internal int aim_addtlvtochain8(aim_tlvlist_t **list, const fu16_t t, const fu8_t v); | |
468 faim_internal int aim_addtlvtochain16(aim_tlvlist_t **list, const fu16_t t, const fu16_t v); | 455 faim_internal int aim_addtlvtochain16(aim_tlvlist_t **list, const fu16_t t, const fu16_t v); |
469 faim_internal int aim_addtlvtochain32(aim_tlvlist_t **list, const fu16_t type, const fu32_t v); | 456 faim_internal int aim_addtlvtochain32(aim_tlvlist_t **list, const fu16_t type, const fu32_t v); |
470 faim_internal int aim_addtlvtochain_raw(aim_tlvlist_t **list, const fu16_t t, const fu16_t l, const fu8_t *v); | 457 faim_internal int aim_addtlvtochain_raw(aim_tlvlist_t **list, const fu16_t t, const fu16_t l, const fu8_t *v); |
471 faim_internal int aim_addtlvtochain_caps(aim_tlvlist_t **list, const fu16_t t, const fu16_t caps); | 458 faim_internal int aim_addtlvtochain_caps(aim_tlvlist_t **list, const fu16_t t, const fu16_t caps); |
472 faim_internal int aim_addtlvtochain_noval(aim_tlvlist_t **list, const fu16_t type); | 459 faim_internal int aim_addtlvtochain_noval(aim_tlvlist_t **list, const fu16_t type); |
516 char *email; | 503 char *email; |
517 char *bosip; | 504 char *bosip; |
518 fu8_t *cookie; | 505 fu8_t *cookie; |
519 struct aim_clientrelease latestrelease; | 506 struct aim_clientrelease latestrelease; |
520 struct aim_clientrelease latestbeta; | 507 struct aim_clientrelease latestbeta; |
508 }; | |
509 | |
510 /* Callback data for redirect. */ | |
511 struct aim_redirect_data { | |
512 fu16_t group; | |
513 const char *ip; | |
514 const fu8_t *cookie; | |
515 struct { /* group == AIM_CONN_TYPE_CHAT */ | |
516 fu16_t exchange; | |
517 const char *room; | |
518 fu16_t instance; | |
519 } chat; | |
521 }; | 520 }; |
522 | 521 |
523 faim_export int aim_clientready(aim_session_t *sess, aim_conn_t *conn); | 522 faim_export int aim_clientready(aim_session_t *sess, aim_conn_t *conn); |
524 faim_export int aim_sendflapver(aim_session_t *sess, aim_conn_t *conn); | 523 faim_export int aim_sendflapver(aim_session_t *sess, aim_conn_t *conn); |
525 faim_export int aim_request_login(aim_session_t *sess, aim_conn_t *conn, const char *sn); | 524 faim_export int aim_request_login(aim_session_t *sess, aim_conn_t *conn, const char *sn); |
924 faim_export int aim_remove_buddy(aim_session_t *, aim_conn_t *, const char *); | 923 faim_export int aim_remove_buddy(aim_session_t *, aim_conn_t *, const char *); |
925 | 924 |
926 /* aim_search.c */ | 925 /* aim_search.c */ |
927 faim_export int aim_usersearch_address(aim_session_t *, aim_conn_t *, const char *); | 926 faim_export int aim_usersearch_address(aim_session_t *, aim_conn_t *, const char *); |
928 | 927 |
928 /* These apply to exchanges as well. */ | |
929 #define AIM_CHATROOM_FLAG_EVILABLE 0x0001 | |
930 #define AIM_CHATROOM_FLAG_NAV_ONLY 0x0002 | |
931 #define AIM_CHATROOM_FLAG_INSTANCING_ALLOWED 0x0004 | |
932 #define AIM_CHATROOM_FLAG_OCCUPANT_PEEK_ALLOWED 0x0008 | |
933 | |
929 struct aim_chat_exchangeinfo { | 934 struct aim_chat_exchangeinfo { |
930 fu16_t number; | 935 fu16_t number; |
936 fu16_t flags; | |
931 char *name; | 937 char *name; |
932 char *charset1; | 938 char *charset1; |
933 char *lang1; | 939 char *lang1; |
934 char *charset2; | 940 char *charset2; |
935 char *lang2; | 941 char *lang2; |
937 | 943 |
938 #define AIM_CHATFLAGS_NOREFLECT 0x0001 | 944 #define AIM_CHATFLAGS_NOREFLECT 0x0001 |
939 #define AIM_CHATFLAGS_AWAY 0x0002 | 945 #define AIM_CHATFLAGS_AWAY 0x0002 |
940 faim_export int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, fu16_t flags, const char *msg, int msglen); | 946 faim_export int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, fu16_t flags, const char *msg, int msglen); |
941 faim_export int aim_chat_join(aim_session_t *sess, aim_conn_t *conn, fu16_t exchange, const char *roomname, fu16_t instance); | 947 faim_export int aim_chat_join(aim_session_t *sess, aim_conn_t *conn, fu16_t exchange, const char *roomname, fu16_t instance); |
942 faim_export int aim_chat_attachname(aim_conn_t *conn, const char *roomname); | 948 faim_export int aim_chat_attachname(aim_conn_t *conn, fu16_t exchange, const char *roomname, fu16_t instance); |
943 faim_export char *aim_chat_getname(aim_conn_t *conn); | 949 faim_export char *aim_chat_getname(aim_conn_t *conn); |
944 faim_export aim_conn_t *aim_chat_getconn(aim_session_t *, const char *name); | 950 faim_export aim_conn_t *aim_chat_getconn(aim_session_t *, const char *name); |
945 | 951 |
946 faim_export int aim_chatnav_reqrights(aim_session_t *sess, aim_conn_t *conn); | 952 faim_export int aim_chatnav_reqrights(aim_session_t *sess, aim_conn_t *conn); |
947 | 953 |