Mercurial > pidgin.yaz
comparison src/protocols/oscar/oscar.c @ 2742:6f527cbd899d
[gaim-migrate @ 2755]
i'll commit it later.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 18 Nov 2001 00:21:49 +0000 |
parents | 9fc65bb80596 |
children | 642413968b03 |
comparison
equal
deleted
inserted
replaced
2741:38cb5fa48bec | 2742:6f527cbd899d |
---|---|
227 static int gaim_parse_ratechange (aim_session_t *, aim_frame_t *, ...); | 227 static int gaim_parse_ratechange (aim_session_t *, aim_frame_t *, ...); |
228 static int gaim_parse_evilnotify (aim_session_t *, aim_frame_t *, ...); | 228 static int gaim_parse_evilnotify (aim_session_t *, aim_frame_t *, ...); |
229 static int gaim_parse_searcherror(aim_session_t *, aim_frame_t *, ...); | 229 static int gaim_parse_searcherror(aim_session_t *, aim_frame_t *, ...); |
230 static int gaim_parse_searchreply(aim_session_t *, aim_frame_t *, ...); | 230 static int gaim_parse_searchreply(aim_session_t *, aim_frame_t *, ...); |
231 static int gaim_bosrights (aim_session_t *, aim_frame_t *, ...); | 231 static int gaim_bosrights (aim_session_t *, aim_frame_t *, ...); |
232 static int conninitdone_bos (aim_session_t *sess, aim_frame_t *fr, ...); | 232 static int conninitdone_bos (aim_session_t *, aim_frame_t *, ...); |
233 static int conninitdone_admin (aim_session_t *sess, aim_frame_t *fr, ...); | 233 static int conninitdone_admin (aim_session_t *, aim_frame_t *, ...); |
234 static int conninitdone_chat (aim_session_t *sess, aim_frame_t *fr, ...); | 234 static int conninitdone_chat (aim_session_t *, aim_frame_t *, ...); |
235 static int conninitdone_chatnav (aim_session_t *sess, aim_frame_t *fr, ...); | 235 static int conninitdone_chatnav (aim_session_t *, aim_frame_t *, ...); |
236 static int gaim_parse_msgerr (aim_session_t *, aim_frame_t *, ...); | 236 static int gaim_parse_msgerr (aim_session_t *, aim_frame_t *, ...); |
237 static int gaim_parse_buddyrights(aim_session_t *, aim_frame_t *, ...); | 237 static int gaim_parse_buddyrights(aim_session_t *, aim_frame_t *, ...); |
238 static int gaim_parse_locerr (aim_session_t *, aim_frame_t *, ...); | 238 static int gaim_parse_locerr (aim_session_t *, aim_frame_t *, ...); |
239 static int gaim_icbm_param_info (aim_session_t *, aim_frame_t *, ...); | 239 static int gaim_icbm_param_info (aim_session_t *, aim_frame_t *, ...); |
240 static int gaim_parse_genericerr (aim_session_t *, aim_frame_t *, ...); | 240 static int gaim_parse_genericerr (aim_session_t *, aim_frame_t *, ...); |
241 static int gaim_memrequest (aim_session_t *, aim_frame_t*, ...); | 241 static int gaim_memrequest (aim_session_t *, aim_frame_t *, ...); |
242 static int gaim_selfinfo (aim_session_t *, aim_frame_t*, ...); | 242 static int gaim_selfinfo (aim_session_t *, aim_frame_t *, ...); |
243 static int gaim_offlinemsg (aim_session_t *, aim_frame_t*, ...); | 243 static int gaim_offlinemsg (aim_session_t *, aim_frame_t *, ...); |
244 static int gaim_offlinemsgdone (aim_session_t *, aim_frame_t*, ...); | 244 static int gaim_offlinemsgdone (aim_session_t *, aim_frame_t *, ...); |
245 | 245 static int gaim_simpleinfo (aim_session_t *, aim_frame_t *, ...); |
246 static int gaim_directim_initiate (aim_session_t *, aim_frame_t *, ...); | 246 |
247 static int gaim_directim_incoming (aim_session_t *, aim_frame_t *, ...); | 247 static int gaim_directim_initiate(aim_session_t *, aim_frame_t *, ...); |
248 static int gaim_directim_typing (aim_session_t *, aim_frame_t *, ...); | 248 static int gaim_directim_incoming(aim_session_t *, aim_frame_t *, ...); |
249 static int gaim_directim_typing (aim_session_t *, aim_frame_t *, ...); | |
249 | 250 |
250 static char *msgerrreason[] = { | 251 static char *msgerrreason[] = { |
251 "Invalid error", | 252 "Invalid error", |
252 "Invalid SNAC", | 253 "Invalid SNAC", |
253 "Rate to host", | 254 "Rate to host", |
650 aim_conn_addhandler(sess, bosconn, 0x0009, 0x0001, gaim_parse_genericerr, 0); | 651 aim_conn_addhandler(sess, bosconn, 0x0009, 0x0001, gaim_parse_genericerr, 0); |
651 aim_conn_addhandler(sess, bosconn, 0x0001, 0x001f, gaim_memrequest, 0); | 652 aim_conn_addhandler(sess, bosconn, 0x0001, 0x001f, gaim_memrequest, 0); |
652 aim_conn_addhandler(sess, bosconn, 0x0001, 0x000f, gaim_selfinfo, 0); | 653 aim_conn_addhandler(sess, bosconn, 0x0001, 0x000f, gaim_selfinfo, 0); |
653 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_OFFLINEMSG, gaim_offlinemsg, 0); | 654 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_OFFLINEMSG, gaim_offlinemsg, 0); |
654 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_OFFLINEMSGCOMPLETE, gaim_offlinemsgdone, 0); | 655 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_OFFLINEMSGCOMPLETE, gaim_offlinemsgdone, 0); |
656 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_ICQ, AIM_CB_ICQ_SIMPLEINFO, gaim_simpleinfo, 0); | |
655 | 657 |
656 ((struct oscar_data *)gc->proto_data)->conn = bosconn; | 658 ((struct oscar_data *)gc->proto_data)->conn = bosconn; |
657 for (i = 0; i < (int)strlen(info->bosip); i++) { | 659 for (i = 0; i < (int)strlen(info->bosip); i++) { |
658 if (info->bosip[i] == ':') { | 660 if (info->bosip[i] == ':') { |
659 port = atoi(&(info->bosip[i+1])); | 661 port = atoi(&(info->bosip[i+1])); |
2023 { | 2025 { |
2024 aim_icq_ackofflinemsgs(sess); | 2026 aim_icq_ackofflinemsgs(sess); |
2025 return 1; | 2027 return 1; |
2026 } | 2028 } |
2027 | 2029 |
2030 static int gaim_simpleinfo(aim_session_t *sess, aim_frame_t *fr, ...) | |
2031 { | |
2032 va_list ap; | |
2033 struct aim_icq_simpleinfo *info; | |
2034 char buf[16 * 1024]; | |
2035 | |
2036 va_start(ap, fr); | |
2037 info = va_arg(ap, struct aim_icq_simpleinfo *); | |
2038 va_end(ap); | |
2039 | |
2040 g_snprintf(buf, sizeof buf, | |
2041 "<B>UIN:</B> %lu<BR>" | |
2042 "<B>Nick:</B> %s<BR>" | |
2043 "<B>Name:</B> %s %s<BR>" | |
2044 "<B>Email:</B> %s\n", | |
2045 info->uin, | |
2046 info->nick, | |
2047 info->first, info->last, | |
2048 info->email); | |
2049 | |
2050 g_show_info_text(buf, NULL); | |
2051 | |
2052 return 1; | |
2053 } | |
2054 | |
2028 static int gaim_parse_searchreply(aim_session_t *sess, aim_frame_t *fr, ...) { | 2055 static int gaim_parse_searchreply(aim_session_t *sess, aim_frame_t *fr, ...) { |
2029 va_list ap; | 2056 va_list ap; |
2030 char *address, *SNs; | 2057 char *address, *SNs; |
2031 int i, num; | 2058 int i, num; |
2032 char *buf; | 2059 char *buf; |
2187 return ret; | 2214 return ret; |
2188 } | 2215 } |
2189 | 2216 |
2190 static void oscar_get_info(struct gaim_connection *g, char *name) { | 2217 static void oscar_get_info(struct gaim_connection *g, char *name) { |
2191 struct oscar_data *odata = (struct oscar_data *)g->proto_data; | 2218 struct oscar_data *odata = (struct oscar_data *)g->proto_data; |
2192 aim_getinfo(odata->sess, odata->conn, name, AIM_GETINFO_GENERALINFO); | 2219 if (odata->icq) |
2220 aim_icq_getsimpleinfo(odata->sess, name); | |
2221 else | |
2222 aim_getinfo(odata->sess, odata->conn, name, AIM_GETINFO_GENERALINFO); | |
2193 } | 2223 } |
2194 | 2224 |
2195 static void oscar_get_away_msg(struct gaim_connection *g, char *name) { | 2225 static void oscar_get_away_msg(struct gaim_connection *g, char *name) { |
2196 struct oscar_data *odata = (struct oscar_data *)g->proto_data; | 2226 struct oscar_data *odata = (struct oscar_data *)g->proto_data; |
2197 aim_getinfo(odata->sess, odata->conn, name, AIM_GETINFO_AWAYMESSAGE); | 2227 aim_getinfo(odata->sess, odata->conn, name, AIM_GETINFO_AWAYMESSAGE); |