Mercurial > pidgin.yaz
comparison libpurple/ft.c @ 15641:35fa1d1c4ef2
Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 15 Feb 2007 22:43:24 +0000 |
parents | 5fe8042783c1 |
children | 32c366eeeb99 |
comparison
equal
deleted
inserted
replaced
15640:233c4a2f7b77 | 15641:35fa1d1c4ef2 |
---|---|
33 | 33 |
34 #define FT_INITIAL_BUFFER_SIZE 4096 | 34 #define FT_INITIAL_BUFFER_SIZE 4096 |
35 #define FT_MAX_BUFFER_SIZE 65535 | 35 #define FT_MAX_BUFFER_SIZE 65535 |
36 | 36 |
37 static GaimXferUiOps *xfer_ui_ops = NULL; | 37 static GaimXferUiOps *xfer_ui_ops = NULL; |
38 static GList *xfers; | |
38 | 39 |
39 static int gaim_xfer_choose_file(GaimXfer *xfer); | 40 static int gaim_xfer_choose_file(GaimXfer *xfer); |
41 | |
42 GList * | |
43 gaim_xfers_get_all() | |
44 { | |
45 return xfers; | |
46 } | |
40 | 47 |
41 GaimXfer * | 48 GaimXfer * |
42 gaim_xfer_new(GaimAccount *account, GaimXferType type, const char *who) | 49 gaim_xfer_new(GaimAccount *account, GaimXferType type, const char *who) |
43 { | 50 { |
44 GaimXfer *xfer; | 51 GaimXfer *xfer; |
61 ui_ops = gaim_xfer_get_ui_ops(xfer); | 68 ui_ops = gaim_xfer_get_ui_ops(xfer); |
62 | 69 |
63 if (ui_ops != NULL && ui_ops->new_xfer != NULL) | 70 if (ui_ops != NULL && ui_ops->new_xfer != NULL) |
64 ui_ops->new_xfer(xfer); | 71 ui_ops->new_xfer(xfer); |
65 | 72 |
73 xfers = g_list_prepend(xfers, xfer); | |
66 return xfer; | 74 return xfer; |
67 } | 75 } |
68 | 76 |
69 static void | 77 static void |
70 gaim_xfer_destroy(GaimXfer *xfer) | 78 gaim_xfer_destroy(GaimXfer *xfer) |
88 g_free(xfer->filename); | 96 g_free(xfer->filename); |
89 g_free(xfer->remote_ip); | 97 g_free(xfer->remote_ip); |
90 g_free(xfer->local_filename); | 98 g_free(xfer->local_filename); |
91 | 99 |
92 g_free(xfer); | 100 g_free(xfer); |
101 xfers = g_list_remove(xfers, xfer); | |
93 } | 102 } |
94 | 103 |
95 void | 104 void |
96 gaim_xfer_ref(GaimXfer *xfer) | 105 gaim_xfer_ref(GaimXfer *xfer) |
97 { | 106 { |