comparison src/protocols/irc/dcc_send.c @ 9466:d27156c9c876

[gaim-migrate @ 10291] (21:36:44) datallah: anyway... i added "Send File" to the prpl core committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 07 Jul 2004 01:49:39 +0000
parents 518455386538
children 1a91e814e9d8
comparison
equal deleted inserted replaced
9465:8a4797a608ae 9466:d27156c9c876
297 /** 297 /**
298 * Gaim calls this function when the user selects Send File from the 298 * Gaim calls this function when the user selects Send File from the
299 * buddy menu 299 * buddy menu
300 * It sets up the GaimXfer struct and tells Gaim to go ahead 300 * It sets up the GaimXfer struct and tells Gaim to go ahead
301 */ 301 */
302 void irc_dccsend_send_ask(GaimConnection *gc, const char *dst) { 302 void irc_dccsend_send_file(GaimConnection *gc, const char *who, const char *file) {
303 GaimXfer *xfer; 303 GaimXfer *xfer;
304 struct irc_xfer_send_data *xd; 304 struct irc_xfer_send_data *xd;
305 305
306 /* Build the file transfer handle */ 306 /* Build the file transfer handle */
307 xfer = gaim_xfer_new(gaim_connection_get_account(gc), GAIM_XFER_SEND, dst); 307 xfer = gaim_xfer_new(gaim_connection_get_account(gc), GAIM_XFER_SEND, who);
308 308
309 309
310 xd = g_new0(struct irc_xfer_send_data, 1); 310 xd = g_new0(struct irc_xfer_send_data, 1);
311 xd->fd = -1; 311 xd->fd = -1;
312 xfer->data = xd; 312 xfer->data = xd;
316 gaim_xfer_set_write_fnc(xfer, irc_dccsend_send_write); 316 gaim_xfer_set_write_fnc(xfer, irc_dccsend_send_write);
317 gaim_xfer_set_end_fnc(xfer, irc_dccsend_send_destroy); 317 gaim_xfer_set_end_fnc(xfer, irc_dccsend_send_destroy);
318 gaim_xfer_set_request_denied_fnc(xfer, irc_dccsend_send_destroy); 318 gaim_xfer_set_request_denied_fnc(xfer, irc_dccsend_send_destroy);
319 gaim_xfer_set_cancel_send_fnc(xfer, irc_dccsend_send_destroy); 319 gaim_xfer_set_cancel_send_fnc(xfer, irc_dccsend_send_destroy);
320 /* Now perform the request */ 320 /* Now perform the request */
321 gaim_xfer_request(xfer); 321 if (file)
322 } 322 gaim_xfer_request_accepted(xfer, file);
323 else
324 gaim_xfer_request(xfer);
325 }