Mercurial > pidgin.yaz
comparison src/protocols/oscar/oscar.c @ 4508:4c40fccbd7c9
[gaim-migrate @ 4784]
We don't actually want file transfer anymore. More trouble than it's worth,
so we decided to just pull it, rather than deal with the support "requests"
(read: complaints).
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 02 Feb 2003 07:43:27 +0000 |
parents | 3196d9044a45 |
children | 2427d847e39c |
comparison
equal
deleted
inserted
replaced
4507:1761c8cb8a23 | 4508:4c40fccbd7c9 |
---|---|
176 char *sn; | 176 char *sn; |
177 char ip[64]; | 177 char ip[64]; |
178 fu8_t cookie[8]; | 178 fu8_t cookie[8]; |
179 }; | 179 }; |
180 | 180 |
181 #if 0 | |
181 struct oscar_file_transfer { | 182 struct oscar_file_transfer { |
182 enum { OFT_SENDFILE_IN, OFT_SENDFILE_OUT } type; | 183 enum { OFT_SENDFILE_IN, OFT_SENDFILE_OUT } type; |
183 aim_conn_t *conn; | 184 aim_conn_t *conn; |
184 struct file_transfer *xfer; | 185 struct file_transfer *xfer; |
185 char *sn; | 186 char *sn; |
189 int totsize; | 190 int totsize; |
190 int filesdone; | 191 int filesdone; |
191 int totfiles; | 192 int totfiles; |
192 int watcher; | 193 int watcher; |
193 }; | 194 }; |
195 #endif | |
194 | 196 |
195 struct icon_req { | 197 struct icon_req { |
196 char *user; | 198 char *user; |
197 time_t timestamp; | 199 time_t timestamp; |
198 unsigned long length; | 200 unsigned long length; |
284 } | 286 } |
285 | 287 |
286 return c; | 288 return c; |
287 } | 289 } |
288 | 290 |
291 #if 0 | |
289 /* XXX there must be a better way than this.... -- wtm */ | 292 /* XXX there must be a better way than this.... -- wtm */ |
290 static struct oscar_file_transfer *find_oft_by_conn(struct gaim_connection *gc, | 293 static struct oscar_file_transfer *find_oft_by_conn(struct gaim_connection *gc, |
291 aim_conn_t *conn) { | 294 aim_conn_t *conn) { |
292 GSList *g = ((struct oscar_data *)gc->proto_data)->file_transfers; | 295 GSList *g = ((struct oscar_data *)gc->proto_data)->file_transfers; |
293 struct oscar_file_transfer *f = NULL; | 296 struct oscar_file_transfer *f = NULL; |
332 f = NULL; | 335 f = NULL; |
333 } | 336 } |
334 | 337 |
335 return f; | 338 return f; |
336 } | 339 } |
340 #endif | |
337 | 341 |
338 static int gaim_parse_auth_resp (aim_session_t *, aim_frame_t *, ...); | 342 static int gaim_parse_auth_resp (aim_session_t *, aim_frame_t *, ...); |
339 static int gaim_parse_login (aim_session_t *, aim_frame_t *, ...); | 343 static int gaim_parse_login (aim_session_t *, aim_frame_t *, ...); |
340 static int gaim_handle_redirect (aim_session_t *, aim_frame_t *, ...); | 344 static int gaim_handle_redirect (aim_session_t *, aim_frame_t *, ...); |
341 static int gaim_info_change (aim_session_t *, aim_frame_t *, ...); | 345 static int gaim_info_change (aim_session_t *, aim_frame_t *, ...); |
391 static int gaim_directim_initiate(aim_session_t *, aim_frame_t *, ...); | 395 static int gaim_directim_initiate(aim_session_t *, aim_frame_t *, ...); |
392 static int gaim_directim_incoming(aim_session_t *, aim_frame_t *, ...); | 396 static int gaim_directim_incoming(aim_session_t *, aim_frame_t *, ...); |
393 static int gaim_directim_typing (aim_session_t *, aim_frame_t *, ...); | 397 static int gaim_directim_typing (aim_session_t *, aim_frame_t *, ...); |
394 static int gaim_update_ui (aim_session_t *, aim_frame_t *, ...); | 398 static int gaim_update_ui (aim_session_t *, aim_frame_t *, ...); |
395 | 399 |
400 #if 0 | |
396 static int oscar_file_transfer_do(aim_session_t *, aim_frame_t *, ...); | 401 static int oscar_file_transfer_do(aim_session_t *, aim_frame_t *, ...); |
397 static void oscar_file_transfer_disconnect(aim_session_t *, | 402 static void oscar_file_transfer_disconnect(aim_session_t *, |
398 aim_conn_t *); | 403 aim_conn_t *); |
399 static void oscar_file_transfer_cancel(struct gaim_connection *, | 404 static void oscar_file_transfer_cancel(struct gaim_connection *, |
400 struct file_transfer *); | 405 struct file_transfer *); |
401 static int oscar_sendfile_request(aim_session_t *sess, | 406 static int oscar_sendfile_request(aim_session_t *sess, |
402 struct oscar_file_transfer *oft); | 407 struct oscar_file_transfer *oft); |
403 static int oscar_sendfile_timeout(aim_session_t *sess, aim_frame_t *fr, ...); | 408 static int oscar_sendfile_timeout(aim_session_t *sess, aim_frame_t *fr, ...); |
409 #endif | |
404 | 410 |
405 static fu32_t check_encoding(const char *utf8); | 411 static fu32_t check_encoding(const char *utf8); |
406 static fu32_t parse_encoding(const char *enc); | 412 static fu32_t parse_encoding(const char *enc); |
407 | 413 |
408 static char *msgerrreason[] = { | 414 static char *msgerrreason[] = { |
432 N_("Queue full"), | 438 N_("Queue full"), |
433 N_("Not while on AOL") | 439 N_("Not while on AOL") |
434 }; | 440 }; |
435 static int msgerrreasonlen = 25; | 441 static int msgerrreasonlen = 25; |
436 | 442 |
443 #if 0 | |
437 /* | 444 /* |
438 * This is called to clean up whenever a file transfer is no longer in progress, | 445 * This is called to clean up whenever a file transfer is no longer in progress, |
439 * whether because it finished sucessfully, it was canceled, or there was an error. | 446 * whether because it finished sucessfully, it was canceled, or there was an error. |
440 */ | 447 */ |
441 static void oscar_file_transfer_disconnect(aim_session_t *sess, aim_conn_t *conn) { | 448 static void oscar_file_transfer_disconnect(aim_session_t *sess, aim_conn_t *conn) { |
454 aim_conn_kill(sess, &conn); | 461 aim_conn_kill(sess, &conn); |
455 | 462 |
456 g_free(oft->sn); | 463 g_free(oft->sn); |
457 g_free(oft); | 464 g_free(oft); |
458 } | 465 } |
466 #endif | |
459 | 467 |
460 static void gaim_directim_disconnect(aim_session_t *sess, aim_conn_t *conn) { | 468 static void gaim_directim_disconnect(aim_session_t *sess, aim_conn_t *conn) { |
461 struct gaim_connection *gc = sess->aux_data; | 469 struct gaim_connection *gc = sess->aux_data; |
462 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | 470 struct oscar_data *od = (struct oscar_data *)gc->proto_data; |
463 struct gaim_conversation *cnv; | 471 struct gaim_conversation *cnv; |
569 aim_conn_kill(odata->sess, &conn); | 577 aim_conn_kill(odata->sess, &conn); |
570 } else if (conn->type == AIM_CONN_TYPE_RENDEZVOUS) { | 578 } else if (conn->type == AIM_CONN_TYPE_RENDEZVOUS) { |
571 if (conn->subtype == AIM_CONN_SUBTYPE_OFT_DIRECTIM) | 579 if (conn->subtype == AIM_CONN_SUBTYPE_OFT_DIRECTIM) |
572 gaim_directim_disconnect(odata->sess, conn); | 580 gaim_directim_disconnect(odata->sess, conn); |
573 else if (conn->subtype == AIM_CONN_SUBTYPE_OFT_SENDFILE) { | 581 else if (conn->subtype == AIM_CONN_SUBTYPE_OFT_SENDFILE) { |
582 #if 0 | |
574 struct oscar_file_transfer *oft = find_oft_by_conn(gc, conn); | 583 struct oscar_file_transfer *oft = find_oft_by_conn(gc, conn); |
575 if (oft) { | 584 if (oft) { |
576 transfer_abort(oft->xfer, _("Buddy canceled transfer")); | 585 transfer_abort(oft->xfer, _("Buddy canceled transfer")); |
577 } | 586 } |
578 oscar_file_transfer_disconnect(odata->sess, conn); | 587 oscar_file_transfer_disconnect(odata->sess, conn); |
588 #endif | |
579 } | 589 } |
580 else { | 590 else { |
581 debug_printf("No handler for rendezvous disconnect (%d).\n", | 591 debug_printf("No handler for rendezvous disconnect (%d).\n", |
582 source); | 592 source); |
583 } | 593 } |
708 if (n->watcher > 0) | 718 if (n->watcher > 0) |
709 gaim_input_remove(n->watcher); | 719 gaim_input_remove(n->watcher); |
710 odata->direct_ims = g_slist_remove(odata->direct_ims, n); | 720 odata->direct_ims = g_slist_remove(odata->direct_ims, n); |
711 g_free(n); | 721 g_free(n); |
712 } | 722 } |
723 | |
724 #if 0 | |
713 while (odata->file_transfers) { | 725 while (odata->file_transfers) { |
714 struct oscar_file_transfer *n = odata->file_transfers->data; | 726 struct oscar_file_transfer *n = odata->file_transfers->data; |
715 if (n->watcher > 0) | 727 if (n->watcher > 0) |
716 gaim_input_remove(n->watcher); | 728 gaim_input_remove(n->watcher); |
717 odata->file_transfers = g_slist_remove(odata->file_transfers, n); | 729 odata->file_transfers = g_slist_remove(odata->file_transfers, n); |
718 g_free(n); | 730 g_free(n); |
719 } | 731 } |
732 #endif | |
733 | |
720 while (odata->hasicons) { | 734 while (odata->hasicons) { |
721 struct icon_req *n = odata->hasicons->data; | 735 struct icon_req *n = odata->hasicons->data; |
722 g_free(n->user); | 736 g_free(n->user); |
723 odata->hasicons = g_slist_remove(odata->hasicons, n); | 737 odata->hasicons = g_slist_remove(odata->hasicons, n); |
724 g_free(n); | 738 g_free(n); |
782 gc->inpa = gaim_input_add(bosconn->fd, GAIM_INPUT_READ, | 796 gc->inpa = gaim_input_add(bosconn->fd, GAIM_INPUT_READ, |
783 oscar_callback, bosconn); | 797 oscar_callback, bosconn); |
784 set_login_progress(gc, 4, _("Connection established, cookie sent")); | 798 set_login_progress(gc, 4, _("Connection established, cookie sent")); |
785 } | 799 } |
786 | 800 |
801 #if 0 | |
787 static void oscar_ask_send_file(struct gaim_connection *gc, char *destsn) { | 802 static void oscar_ask_send_file(struct gaim_connection *gc, char *destsn) { |
788 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | 803 struct oscar_data *od = (struct oscar_data *)gc->proto_data; |
789 | 804 |
790 struct oscar_file_transfer *oft = g_new0(struct oscar_file_transfer, | 805 struct oscar_file_transfer *oft = g_new0(struct oscar_file_transfer, |
791 1); | 806 1); |
795 | 810 |
796 od->file_transfers = g_slist_append(od->file_transfers, oft); | 811 od->file_transfers = g_slist_append(od->file_transfers, oft); |
797 | 812 |
798 oft->xfer = transfer_out_add(gc, oft->sn); | 813 oft->xfer = transfer_out_add(gc, oft->sn); |
799 } | 814 } |
815 #endif | |
800 | 816 |
801 static int gaim_parse_auth_resp(aim_session_t *sess, aim_frame_t *fr, ...) { | 817 static int gaim_parse_auth_resp(aim_session_t *sess, aim_frame_t *fr, ...) { |
802 va_list ap; | 818 va_list ap; |
803 struct aim_authresp_info *info; | 819 struct aim_authresp_info *info; |
804 int i, rc; | 820 int i, rc; |
913 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTH, gaim_ssi_authgiven, 0); | 929 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTH, gaim_ssi_authgiven, 0); |
914 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTHREQ, gaim_ssi_authrequest, 0); | 930 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTHREQ, gaim_ssi_authrequest, 0); |
915 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTHREP, gaim_ssi_authreply, 0); | 931 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_RECVAUTHREP, gaim_ssi_authreply, 0); |
916 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_ADDED, gaim_ssi_gotadded, 0); | 932 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SSI, AIM_CB_SSI_ADDED, gaim_ssi_gotadded, 0); |
917 #endif | 933 #endif |
934 | |
935 #if 0 | |
918 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_MSGTIMEOUT, oscar_sendfile_timeout, 0); | 936 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_MSGTIMEOUT, oscar_sendfile_timeout, 0); |
937 #endif | |
919 | 938 |
920 ((struct oscar_data *)gc->proto_data)->conn = bosconn; | 939 ((struct oscar_data *)gc->proto_data)->conn = bosconn; |
921 for (i = 0; i < (int)strlen(info->bosip); i++) { | 940 for (i = 0; i < (int)strlen(info->bosip); i++) { |
922 if (info->bosip[i] == ':') { | 941 if (info->bosip[i] == ':') { |
923 port = atoi(&(info->bosip[i+1])); | 942 port = atoi(&(info->bosip[i+1])); |
1522 | 1541 |
1523 dim->watcher = gaim_input_add(dim->conn->fd, GAIM_INPUT_READ, | 1542 dim->watcher = gaim_input_add(dim->conn->fd, GAIM_INPUT_READ, |
1524 oscar_callback, dim->conn); | 1543 oscar_callback, dim->conn); |
1525 } | 1544 } |
1526 | 1545 |
1546 #if 0 | |
1527 /* | 1547 /* |
1528 * This is called every time we are finished sending a file and the receiving buddy | 1548 * This is called every time we are finished sending a file and the receiving buddy |
1529 * has sent back an acknowledgement; we start the next file or tear down the | 1549 * has sent back an acknowledgement; we start the next file or tear down the |
1530 * connection as appropriate. | 1550 * connection as appropriate. |
1531 */ | 1551 */ |
1715 od->file_transfers = g_slist_remove(od->file_transfers, oft); | 1735 od->file_transfers = g_slist_remove(od->file_transfers, oft); |
1716 aim_conn_kill(od->sess, &oft->conn); | 1736 aim_conn_kill(od->sess, &oft->conn); |
1717 g_free(oft->sn); | 1737 g_free(oft->sn); |
1718 g_free(oft); | 1738 g_free(oft); |
1719 } | 1739 } |
1740 #endif | |
1720 | 1741 |
1721 static void accept_direct_im(struct ask_direct *d) { | 1742 static void accept_direct_im(struct ask_direct *d) { |
1722 struct gaim_connection *gc = d->gc; | 1743 struct gaim_connection *gc = d->gc; |
1723 struct oscar_data *od; | 1744 struct oscar_data *od; |
1724 struct direct_im *dim; | 1745 struct direct_im *dim; |
1896 return 0; | 1917 return 0; |
1897 | 1918 |
1898 debug_printf("rendezvous status %hu (%s)\n", args->status, userinfo->sn); | 1919 debug_printf("rendezvous status %hu (%s)\n", args->status, userinfo->sn); |
1899 | 1920 |
1900 if (args->status == AIM_RENDEZVOUS_CANCEL) { | 1921 if (args->status == AIM_RENDEZVOUS_CANCEL) { |
1922 #if 0 | |
1901 struct oscar_file_transfer *oft; | 1923 struct oscar_file_transfer *oft; |
1902 if (!args->cookie) | 1924 if (!args->cookie) |
1903 return 1; | 1925 return 1; |
1904 oft = find_oft_by_cookie(gc, args->cookie); | 1926 oft = find_oft_by_cookie(gc, args->cookie); |
1905 if (oft) { | 1927 if (oft) { |
1906 transfer_abort(oft->xfer, _("Buddy canceled transfer")); | 1928 transfer_abort(oft->xfer, _("Buddy canceled transfer")); |
1907 oscar_file_transfer_disconnect(sess, oft->conn); | 1929 oscar_file_transfer_disconnect(sess, oft->conn); |
1908 } | 1930 } |
1909 return 0; | 1931 return 0; |
1932 #endif | |
1910 } | 1933 } |
1911 else if (args->status == AIM_RENDEZVOUS_ACCEPT) { | 1934 else if (args->status == AIM_RENDEZVOUS_ACCEPT) { |
1935 #if 0 | |
1912 /* The user accepted our transfer request, but we don't | 1936 /* The user accepted our transfer request, but we don't |
1913 * really need to do anything yet. | 1937 * really need to do anything yet. |
1914 * -- wtm | 1938 * -- wtm |
1915 */ | 1939 */ |
1916 return 0; | 1940 return 0; |
1941 #endif | |
1917 } | 1942 } |
1918 else if (args->status != AIM_RENDEZVOUS_PROPOSE) { | 1943 else if (args->status != AIM_RENDEZVOUS_PROPOSE) { |
1919 debug_printf("unknown rendezvous status\n"); | 1944 debug_printf("unknown rendezvous status\n"); |
1920 return 1; | 1945 return 1; |
1921 } | 1946 } |
1938 (char *)args->msg, | 1963 (char *)args->msg, |
1939 m); | 1964 m); |
1940 if (name) | 1965 if (name) |
1941 g_free(name); | 1966 g_free(name); |
1942 } else if (args->reqclass & AIM_CAPS_SENDFILE) { | 1967 } else if (args->reqclass & AIM_CAPS_SENDFILE) { |
1968 #if 0 | |
1943 struct oscar_file_transfer *oft; | 1969 struct oscar_file_transfer *oft; |
1944 struct oscar_data *od = gc->proto_data; | 1970 struct oscar_data *od = gc->proto_data; |
1945 char *tmp; | 1971 char *tmp; |
1946 | 1972 |
1947 if (!args->cookie || !args->verifiedip || !args->port || | 1973 if (!args->cookie || !args->verifiedip || !args->port || |
2026 oft->xfer = transfer_in_add(gc, userinfo->sn, | 2052 oft->xfer = transfer_in_add(gc, userinfo->sn, |
2027 args->info.sendfile.filename, | 2053 args->info.sendfile.filename, |
2028 args->info.sendfile.totsize, | 2054 args->info.sendfile.totsize, |
2029 args->info.sendfile.totfiles, | 2055 args->info.sendfile.totfiles, |
2030 args->msg); | 2056 args->msg); |
2057 #endif | |
2031 } else if (args->reqclass & AIM_CAPS_GETFILE) { | 2058 } else if (args->reqclass & AIM_CAPS_GETFILE) { |
2032 } else if (args->reqclass & AIM_CAPS_VOICE) { | 2059 } else if (args->reqclass & AIM_CAPS_VOICE) { |
2033 } else if (args->reqclass & AIM_CAPS_BUDDYICON) { | 2060 } else if (args->reqclass & AIM_CAPS_BUDDYICON) { |
2034 set_icon_data(gc, normalize(userinfo->sn), args->info.icon.icon, | 2061 set_icon_data(gc, normalize(userinfo->sn), args->info.icon.icon, |
2035 args->info.icon.length); | 2062 args->info.icon.length); |
2452 static int gaim_parse_clientauto_ch2(aim_session_t *sess, const char *who, fu16_t reason, const char *cookie) { | 2479 static int gaim_parse_clientauto_ch2(aim_session_t *sess, const char *who, fu16_t reason, const char *cookie) { |
2453 struct gaim_connection *gc = sess->aux_data; | 2480 struct gaim_connection *gc = sess->aux_data; |
2454 | 2481 |
2455 switch (reason) { | 2482 switch (reason) { |
2456 case 3: { /* Decline sendfile. */ | 2483 case 3: { /* Decline sendfile. */ |
2484 #if 0 | |
2457 struct oscar_file_transfer *oft = find_oft_by_cookie(gc, cookie); | 2485 struct oscar_file_transfer *oft = find_oft_by_cookie(gc, cookie); |
2458 | 2486 |
2459 if (oft) { | 2487 if (oft) { |
2460 char *buf = g_strdup_printf(_("%s has declined to receive a file from %s.\n"), | 2488 char *buf = g_strdup_printf(_("%s has declined to receive a file from %s.\n"), |
2461 who, gc->username); | 2489 who, gc->username); |
2462 transfer_abort(oft->xfer, buf); | 2490 transfer_abort(oft->xfer, buf); |
2463 g_free(buf); | 2491 g_free(buf); |
2464 oscar_file_transfer_disconnect(sess, oft->conn); | 2492 oscar_file_transfer_disconnect(sess, oft->conn); |
2465 } | 2493 } |
2494 #endif | |
2466 } break; | 2495 } break; |
2467 | 2496 |
2468 default: { | 2497 default: { |
2469 debug_printf("Received an unknown rendezvous client auto-response from %s. Type 0x%04hx\n", who, reason); | 2498 debug_printf("Received an unknown rendezvous client auto-response from %s. Type 0x%04hx\n", who, reason); |
2470 } | 2499 } |
2572 va_list ap; | 2601 va_list ap; |
2573 char *data; | 2602 char *data; |
2574 fu16_t reason; | 2603 fu16_t reason; |
2575 char buf[1024]; | 2604 char buf[1024]; |
2576 struct gaim_connection *gc = sess->aux_data; | 2605 struct gaim_connection *gc = sess->aux_data; |
2606 | |
2607 #if 0 | |
2577 struct oscar_file_transfer *oft; | 2608 struct oscar_file_transfer *oft; |
2578 | 2609 #endif |
2610 | |
2579 va_start(ap, fr); | 2611 va_start(ap, fr); |
2580 reason = (fu16_t) va_arg(ap, unsigned int); | 2612 reason = (fu16_t) va_arg(ap, unsigned int); |
2581 data = va_arg(ap, char *); | 2613 data = va_arg(ap, char *); |
2582 va_end(ap); | 2614 va_end(ap); |
2583 | 2615 |
2616 #if 0 | |
2584 /* If this was a file transfer request, data is a cookie. */ | 2617 /* If this was a file transfer request, data is a cookie. */ |
2585 if ((oft = find_oft_by_cookie(gc, data))) { | 2618 if ((oft = find_oft_by_cookie(gc, data))) { |
2586 transfer_abort(oft->xfer, | 2619 transfer_abort(oft->xfer, |
2587 (reason < msgerrreasonlen) ? gettext(msgerrreason[reason]) : _("No reason given.")); | 2620 (reason < msgerrreasonlen) ? gettext(msgerrreason[reason]) : _("No reason given.")); |
2588 | 2621 |
2589 oscar_file_transfer_disconnect(sess, oft->conn); | 2622 oscar_file_transfer_disconnect(sess, oft->conn); |
2590 return 1; | 2623 return 1; |
2591 } | 2624 } |
2625 #endif | |
2592 | 2626 |
2593 /* Data is assumed to be the destination sn. */ | 2627 /* Data is assumed to be the destination sn. */ |
2594 snprintf(buf, sizeof(buf), _("Your message to %s did not get sent:"), data); | 2628 snprintf(buf, sizeof(buf), _("Your message to %s did not get sent:"), data); |
2595 do_error_dialog(buf, (reason < msgerrreasonlen) ? gettext(msgerrreason[reason]) : _("No reason given."), GAIM_ERROR); | 2629 do_error_dialog(buf, (reason < msgerrreasonlen) ? gettext(msgerrreason[reason]) : _("No reason given."), GAIM_ERROR); |
2596 | 2630 |
4641 if (uc & UC_NORMAL) | 4675 if (uc & UC_NORMAL) |
4642 return (char **)free_icon_xpm; | 4676 return (char **)free_icon_xpm; |
4643 return NULL; | 4677 return NULL; |
4644 } | 4678 } |
4645 | 4679 |
4680 #if 0 | |
4646 /* | 4681 /* |
4647 * This is called after the raw data for a file has been transferred (whether | 4682 * This is called after the raw data for a file has been transferred (whether |
4648 * we are sending or receiving), but there are other files remaining. | 4683 * we are sending or receiving), but there are other files remaining. |
4649 */ | 4684 */ |
4650 void oscar_file_transfer_nextfile(struct gaim_connection *gc, | 4685 void oscar_file_transfer_nextfile(struct gaim_connection *gc, |
4731 oscar_file_transfer_disconnect(sess, oft->conn); | 4766 oscar_file_transfer_disconnect(sess, oft->conn); |
4732 } | 4767 } |
4733 | 4768 |
4734 return 0; | 4769 return 0; |
4735 } | 4770 } |
4771 #endif | |
4736 | 4772 |
4737 static int gaim_directim_initiate(aim_session_t *sess, aim_frame_t *fr, ...) { | 4773 static int gaim_directim_initiate(aim_session_t *sess, aim_frame_t *fr, ...) { |
4738 va_list ap; | 4774 va_list ap; |
4739 struct gaim_connection *gc = sess->aux_data; | 4775 struct gaim_connection *gc = sess->aux_data; |
4740 struct oscar_data *od = (struct oscar_data *)gc->proto_data; | 4776 struct oscar_data *od = (struct oscar_data *)gc->proto_data; |
5097 pbm->label = _("Direct IM"); | 5133 pbm->label = _("Direct IM"); |
5098 pbm->callback = oscar_ask_direct_im; | 5134 pbm->callback = oscar_ask_direct_im; |
5099 pbm->gc = gc; | 5135 pbm->gc = gc; |
5100 m = g_list_append(m, pbm); | 5136 m = g_list_append(m, pbm); |
5101 | 5137 |
5138 #if 0 | |
5102 pbm = g_new0(struct proto_buddy_menu, 1); | 5139 pbm = g_new0(struct proto_buddy_menu, 1); |
5103 pbm->label = _("Send File"); | 5140 pbm->label = _("Send File"); |
5104 pbm->callback = oscar_ask_send_file; | 5141 pbm->callback = oscar_ask_send_file; |
5105 pbm->gc = gc; | 5142 pbm->gc = gc; |
5106 m = g_list_append(m, pbm); | 5143 m = g_list_append(m, pbm); |
5144 #endif | |
5107 } | 5145 } |
5108 } | 5146 } |
5109 | 5147 |
5110 pbm = g_new0(struct proto_buddy_menu, 1); | 5148 pbm = g_new0(struct proto_buddy_menu, 1); |
5111 pbm->label = _("Get Capabilities"); | 5149 pbm->label = _("Get Capabilities"); |
5455 ret->add_permit = oscar_add_permit; | 5493 ret->add_permit = oscar_add_permit; |
5456 ret->add_deny = oscar_add_deny; | 5494 ret->add_deny = oscar_add_deny; |
5457 ret->rem_permit = oscar_rem_permit; | 5495 ret->rem_permit = oscar_rem_permit; |
5458 ret->rem_deny = oscar_rem_deny; | 5496 ret->rem_deny = oscar_rem_deny; |
5459 ret->set_permit_deny = oscar_set_permit_deny; | 5497 ret->set_permit_deny = oscar_set_permit_deny; |
5498 | |
5499 #if 0 | |
5460 ret->file_transfer_cancel = oscar_file_transfer_cancel; | 5500 ret->file_transfer_cancel = oscar_file_transfer_cancel; |
5461 ret->file_transfer_in = oscar_file_transfer_in; | 5501 ret->file_transfer_in = oscar_file_transfer_in; |
5462 ret->file_transfer_out = oscar_file_transfer_out; | 5502 ret->file_transfer_out = oscar_file_transfer_out; |
5463 ret->file_transfer_data_chunk = oscar_file_transfer_data_chunk; | 5503 ret->file_transfer_data_chunk = oscar_file_transfer_data_chunk; |
5464 ret->file_transfer_nextfile = oscar_file_transfer_nextfile; | 5504 ret->file_transfer_nextfile = oscar_file_transfer_nextfile; |
5465 ret->file_transfer_done = oscar_file_transfer_done; | 5505 ret->file_transfer_done = oscar_file_transfer_done; |
5506 #endif | |
5507 | |
5466 ret->warn = oscar_warn; | 5508 ret->warn = oscar_warn; |
5467 ret->chat_info = oscar_chat_info; | 5509 ret->chat_info = oscar_chat_info; |
5468 ret->join_chat = oscar_join_chat; | 5510 ret->join_chat = oscar_join_chat; |
5469 ret->chat_invite = oscar_chat_invite; | 5511 ret->chat_invite = oscar_chat_invite; |
5470 ret->chat_leave = oscar_chat_leave; | 5512 ret->chat_leave = oscar_chat_leave; |