comparison libpurple/protocols/yahoo/yahoo_filexfer.c @ 32767:2ec94166be43

On the way to hiding the PurpleConnection struct. * Added purple_connection_get_flags() and purple_connection_set_flags() * Use purple_connection_ accessor functions.
author andrew.victor@mxit.com
date Tue, 18 Oct 2011 18:47:48 +0000
parents 9bbfb9d74085
children 5bd5e024c977
comparison
equal deleted inserted replaced
32766:ea2b621fd3ba 32767:2ec94166be43
690 690
691 /* Dereference xfer_data from old xfer */ 691 /* Dereference xfer_data from old xfer */
692 purple_xfer_set_protocol_data(xfer_old, NULL); 692 purple_xfer_set_protocol_data(xfer_old, NULL);
693 693
694 /* Build the file transfer handle. */ 694 /* Build the file transfer handle. */
695 xfer = purple_xfer_new(gc->account, PURPLE_XFER_RECEIVE, purple_xfer_get_remote_user(xfer_old)); 695 xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_RECEIVE, purple_xfer_get_remote_user(xfer_old));
696 696
697 697
698 if (xfer) { 698 if (xfer) {
699 /* Set the info about the incoming file. */ 699 /* Set the info about the incoming file. */
700 char *utf8_filename = yahoo_string_decode(gc, filename, TRUE); 700 char *utf8_filename = yahoo_string_decode(gc, filename, TRUE);
877 877
878 purple_debug_misc("yahoo_filexfer", "Host is %s, port is %d, path is %s, and the full url was %s.\n", 878 purple_debug_misc("yahoo_filexfer", "Host is %s, port is %d, path is %s, and the full url was %s.\n",
879 xfer_data->host, xfer_data->port, xfer_data->path, url); 879 xfer_data->host, xfer_data->port, xfer_data->path, url);
880 880
881 /* Build the file transfer handle. */ 881 /* Build the file transfer handle. */
882 xfer = purple_xfer_new(gc->account, PURPLE_XFER_RECEIVE, from); 882 xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_RECEIVE, from);
883 if (xfer == NULL) { 883 if (xfer == NULL) {
884 g_free(xfer_data); 884 g_free(xfer_data);
885 g_return_if_reached(); 885 g_return_if_reached();
886 } 886 }
887 887
933 933
934 xfer_data = g_new0(struct yahoo_xfer_data, 1); 934 xfer_data = g_new0(struct yahoo_xfer_data, 1);
935 xfer_data->gc = gc; 935 xfer_data->gc = gc;
936 936
937 /* Build the file transfer handle. */ 937 /* Build the file transfer handle. */
938 xfer = purple_xfer_new(gc->account, PURPLE_XFER_SEND, who); 938 xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_SEND, who);
939 if (xfer == NULL) 939 if (xfer == NULL)
940 { 940 {
941 g_free(xfer_data); 941 g_free(xfer_data);
942 g_return_val_if_reached(NULL); 942 g_return_val_if_reached(NULL);
943 } 943 }
1728 xfer_data->xfer_peer_idstring = g_strdup(xfer_peer_idstring); 1728 xfer_data->xfer_peer_idstring = g_strdup(xfer_peer_idstring);
1729 xfer_data->filename_list = filename_list; 1729 xfer_data->filename_list = filename_list;
1730 xfer_data->size_list = size_list; 1730 xfer_data->size_list = size_list;
1731 1731
1732 /* Build the file transfer handle. */ 1732 /* Build the file transfer handle. */
1733 xfer = purple_xfer_new(gc->account, PURPLE_XFER_RECEIVE, from); 1733 xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_RECEIVE, from);
1734 if (xfer == NULL) 1734 if (xfer == NULL)
1735 { 1735 {
1736 g_free(xfer_data); 1736 g_free(xfer_data);
1737 g_return_if_reached(); 1737 g_return_if_reached();
1738 } 1738 }