Mercurial > pidgin
diff src/protocols/sametime/sametime.c @ 12143:cbebda5f019c
[gaim-migrate @ 14444]
SF Patch #1360399 from Evan Schoenberg (evands)
"I discussed this previously with Mark and he said it'd be fine.
This factors out the part of the send_file function which creates a new
GaimXfer into a separate prpl function, new_xfer. It's called in each of the
existing send_file functions.
This is needed so that another client (okay, Adium) can get a new
outgoing GaimXfer from a prpl without depending upon the specific ft.c
logic of send_file; previously I was adding a duplicate method to each prpl
and then calling it directly."
I fixed a couple small bugs in this. Otherwise, it looks good, and seems like a reasonable libgaim request.
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Sat, 19 Nov 2005 00:26:12 +0000 |
| parents | e09bf5bc81d8 |
| children | 9ce0a5f9443b |
line wrap: on
line diff
--- a/src/protocols/sametime/sametime.c Sat Nov 19 00:16:45 2005 +0000 +++ b/src/protocols/sametime/sametime.c Sat Nov 19 00:26:12 2005 +0000 @@ -5029,9 +5029,7 @@ } -static void mw_prpl_send_file(GaimConnection *gc, - const char *who, const char *file) { - +static GaimXfer *mw_prpl_new_xfer(GaimConnect *gc, const char *who) { GaimAccount *acct; GaimXfer *xfer; @@ -5041,6 +5039,14 @@ gaim_xfer_set_init_fnc(xfer, ft_outgoing_init); gaim_xfer_set_cancel_send_fnc(xfer, ft_outgoing_cancel); + return xfer; +} + +static void mw_prpl_send_file(GaimConnection *gc, + const char *who, const char *file) { + + GaimXfer *xfer = mw_prpl_new_xfer(gc, who); + if(file) { DEBUG_INFO("file != NULL\n"); gaim_xfer_request_accepted(xfer, file); @@ -5109,6 +5115,7 @@ .roomlist_expand_category = NULL, .can_receive_file = mw_prpl_can_receive_file, .send_file = mw_prpl_send_file, + .new_xfer = mw_prpl_new_xfer, };
