Sun, 25 Sep 2011 19:28:12 +0000
Remove the special case of fd=0 in purple_xfer_start().
All the included protocol prpl's seem to do the right thing.
| 4514 | 1 | /** |
|
7820
06fc9f66d2cb
[gaim-migrate @ 8472]
Mark Doliner <markdoliner@pidgin.im>
parents:
7805
diff
changeset
|
2 | * @file ft.h File Transfer API |
|
5034
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4675
diff
changeset
|
3 | * @ingroup core |
|
20889
3d0ef192f98c
All the links to libpurple signal pages were in the comment containing the
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
4 | * @see @ref xfer-signals |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
6 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
7 | /* purple |
| 4514 | 8 | * |
| 15884 | 9 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 10 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 11 | * source distribution. | |
| 8231 | 12 | * |
| 4514 | 13 | * This program is free software; you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License as published by | |
| 15 | * the Free Software Foundation; either version 2 of the License, or | |
| 16 | * (at your option) any later version. | |
| 17 | * | |
| 18 | * This program is distributed in the hope that it will be useful, | |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 21 | * GNU General Public License for more details. | |
| 22 | * | |
| 23 | * You should have received a copy of the GNU General Public License | |
| 24 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
17852
diff
changeset
|
25 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 4514 | 26 | */ |
| 15884 | 27 | #ifndef _PURPLE_FT_H_ |
| 28 | #define _PURPLE_FT_H_ | |
| 4514 | 29 | |
| 30 | /**************************************************************************/ | |
| 31 | /** Data Structures */ | |
| 32 | /**************************************************************************/ | |
| 15884 | 33 | typedef struct _PurpleXfer PurpleXfer; |
| 4514 | 34 | |
|
12151
8002bb57756b
[gaim-migrate @ 14452]
Richard Laager <rlaager@pidgin.im>
parents:
12150
diff
changeset
|
35 | #include <glib.h> |
|
8002bb57756b
[gaim-migrate @ 14452]
Richard Laager <rlaager@pidgin.im>
parents:
12150
diff
changeset
|
36 | #include <stdio.h> |
|
8002bb57756b
[gaim-migrate @ 14452]
Richard Laager <rlaager@pidgin.im>
parents:
12150
diff
changeset
|
37 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
38 | #include "account.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
39 | |
| 4514 | 40 | /** |
| 41 | * Types of file transfers. | |
| 42 | */ | |
| 43 | typedef enum | |
| 44 | { | |
| 15884 | 45 | PURPLE_XFER_UNKNOWN = 0, /**< Unknown file transfer type. */ |
| 46 | PURPLE_XFER_SEND, /**< File sending. */ | |
| 47 | PURPLE_XFER_RECEIVE /**< File receiving. */ | |
| 4514 | 48 | |
| 15884 | 49 | } PurpleXferType; |
| 4514 | 50 | |
| 7805 | 51 | /** |
| 52 | * The different states of the xfer. | |
| 53 | */ | |
| 7738 | 54 | typedef enum |
| 55 | { | |
| 15884 | 56 | PURPLE_XFER_STATUS_UNKNOWN = 0, /**< Unknown, the xfer may be null. */ |
| 57 | PURPLE_XFER_STATUS_NOT_STARTED, /**< It hasn't started yet. */ | |
| 58 | PURPLE_XFER_STATUS_ACCEPTED, /**< Receive accepted, but destination file not selected yet */ | |
| 59 | PURPLE_XFER_STATUS_STARTED, /**< purple_xfer_start has been called. */ | |
| 60 | PURPLE_XFER_STATUS_DONE, /**< The xfer completed successfully. */ | |
|
30708
535bec1e66fb
Standardize on "cancelled".
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30131
diff
changeset
|
61 | PURPLE_XFER_STATUS_CANCEL_LOCAL, /**< The xfer was cancelled by us. */ |
|
535bec1e66fb
Standardize on "cancelled".
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30131
diff
changeset
|
62 | PURPLE_XFER_STATUS_CANCEL_REMOTE /**< The xfer was cancelled by the other end, or we couldn't connect. */ |
| 15884 | 63 | } PurpleXferStatusType; |
| 7738 | 64 | |
| 4514 | 65 | /** |
| 66 | * File transfer UI operations. | |
| 67 | * | |
| 68 | * Any UI representing a file transfer must assign a filled-out | |
| 15884 | 69 | * PurpleXferUiOps structure to the purple_xfer. |
| 4514 | 70 | */ |
|
6240
0390b27fe09d
[gaim-migrate @ 6734]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
71 | typedef struct |
| 4514 | 72 | { |
| 15884 | 73 | void (*new_xfer)(PurpleXfer *xfer); |
| 74 | void (*destroy)(PurpleXfer *xfer); | |
| 75 | void (*add_xfer)(PurpleXfer *xfer); | |
| 76 | void (*update_progress)(PurpleXfer *xfer, double percent); | |
| 77 | void (*cancel_local)(PurpleXfer *xfer); | |
| 78 | void (*cancel_remote)(PurpleXfer *xfer); | |
|
6240
0390b27fe09d
[gaim-migrate @ 6734]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
79 | |
|
28150
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
80 | /** |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
81 | * UI op to write data received from the prpl. The UI must deal with the |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
82 | * entire buffer and return size, or it is treated as an error. |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
83 | * |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
84 | * @param xfer The file transfer structure |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
85 | * @param buffer The buffer to write |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
86 | * @param size The size of the buffer |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
87 | * |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
88 | * @return size if the write was successful, or a value between 0 and |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
89 | * size on error. |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
90 | */ |
|
28159
567c6a03a6ea
Fix building on win32, which has #define write wpurple_write (and similar for read).
Paul Aurich <darkrain42@pidgin.im>
parents:
28156
diff
changeset
|
91 | gssize (*ui_write)(PurpleXfer *xfer, const guchar *buffer, gssize size); |
|
28150
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
92 | |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
93 | /** |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
94 | * UI op to read data to send to the prpl for a file transfer. |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
95 | * |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
96 | * @param xfer The file transfer structure |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
97 | * @param buffer A pointer to a buffer. The UI must allocate this buffer. |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
98 | * libpurple will free the data. |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
99 | * @param size The maximum amount of data to put in the buffer. |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
100 | * |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
101 | * @returns The amount of data in the buffer, 0 if nothing is available, |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
102 | * and a negative value if an error occurred and the transfer |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
103 | * should be cancelled (libpurple will cancel). |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
104 | */ |
|
28159
567c6a03a6ea
Fix building on win32, which has #define write wpurple_write (and similar for read).
Paul Aurich <darkrain42@pidgin.im>
parents:
28156
diff
changeset
|
105 | gssize (*ui_read)(PurpleXfer *xfer, guchar **buffer, gssize size); |
|
28150
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
106 | |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
107 | /** |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
108 | * Op to notify the UI that not all the data read in was written. The UI |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
109 | * should re-enqueue this data and return it the next time read is called. |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
110 | * |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
111 | * This MUST be implemented if read and write are implemented. |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
112 | * |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
113 | * @param xfer The file transfer structure |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
114 | * @param buffer A pointer to the beginning of the unwritten data. |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
115 | * @param size The amount of unwritten data. |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
116 | */ |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
117 | void (*data_not_sent)(PurpleXfer *xfer, const guchar *buffer, gsize size); |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
118 | |
|
28683
2fda587fb3e6
Add a comment about the add thumbnail op for PurpleXfer
Marcus Lundblad <malu@pidgin.im>
parents:
28263
diff
changeset
|
119 | /** |
|
2fda587fb3e6
Add a comment about the add thumbnail op for PurpleXfer
Marcus Lundblad <malu@pidgin.im>
parents:
28263
diff
changeset
|
120 | * Op to create a thumbnail image for a file transfer |
|
2fda587fb3e6
Add a comment about the add thumbnail op for PurpleXfer
Marcus Lundblad <malu@pidgin.im>
parents:
28263
diff
changeset
|
121 | * |
|
2fda587fb3e6
Add a comment about the add thumbnail op for PurpleXfer
Marcus Lundblad <malu@pidgin.im>
parents:
28263
diff
changeset
|
122 | * @param xfer The file transfer structure |
|
2fda587fb3e6
Add a comment about the add thumbnail op for PurpleXfer
Marcus Lundblad <malu@pidgin.im>
parents:
28263
diff
changeset
|
123 | */ |
|
30114
8472e53fbbfc
Set desired image formats for thumbnails as a parameter to
Marcus Lundblad <malu@pidgin.im>
parents:
30113
diff
changeset
|
124 | void (*add_thumbnail)(PurpleXfer *xfer, const gchar *formats); |
| 15884 | 125 | } PurpleXferUiOps; |
| 4514 | 126 | |
| 127 | /** | |
| 128 | * A core representation of a file transfer. | |
| 129 | */ | |
| 15884 | 130 | struct _PurpleXfer |
| 4514 | 131 | { |
|
15280
9df6112da532
[gaim-migrate @ 18008]
Mark Doliner <markdoliner@pidgin.im>
parents:
15000
diff
changeset
|
132 | guint ref; /**< The reference count. */ |
| 15884 | 133 | PurpleXferType type; /**< The type of transfer. */ |
| 4514 | 134 | |
| 15884 | 135 | PurpleAccount *account; /**< The account. */ |
| 4514 | 136 | |
| 137 | char *who; /**< The person on the other end of the | |
| 138 | transfer. */ | |
| 139 | ||
|
9933
61bd3fadbfe6
[gaim-migrate @ 10825]
Dave West <kat@users.sourceforge.net>
parents:
9511
diff
changeset
|
140 | char *message; /**< A message sent with the request */ |
|
4605
67526771e679
[gaim-migrate @ 4892]
Mark Doliner <markdoliner@pidgin.im>
parents:
4595
diff
changeset
|
141 | char *filename; /**< The name sent over the network. */ |
|
67526771e679
[gaim-migrate @ 4892]
Mark Doliner <markdoliner@pidgin.im>
parents:
4595
diff
changeset
|
142 | char *local_filename; /**< The name on the local hard drive. */ |
| 4514 | 143 | size_t size; /**< The size of the file. */ |
| 144 | ||
| 145 | FILE *dest_fp; /**< The destination file pointer. */ | |
| 146 | ||
| 147 | char *remote_ip; /**< The remote IP address. */ | |
| 148 | int local_port; /**< The local port. */ | |
| 149 | int remote_port; /**< The remote port. */ | |
| 150 | ||
| 151 | int fd; /**< The socket file descriptor. */ | |
| 152 | int watcher; /**< Watcher. */ | |
| 153 | ||
| 154 | size_t bytes_sent; /**< The number of bytes sent. */ | |
| 155 | size_t bytes_remaining; /**< The number of bytes remaining. */ | |
|
13599
b6369e541654
[gaim-migrate @ 15984]
Mark Doliner <markdoliner@pidgin.im>
parents:
13009
diff
changeset
|
156 | time_t start_time; /**< When the transfer of data began. */ |
|
b6369e541654
[gaim-migrate @ 15984]
Mark Doliner <markdoliner@pidgin.im>
parents:
13009
diff
changeset
|
157 | time_t end_time; /**< When the transfer of data ended. */ |
| 4514 | 158 | |
|
15280
9df6112da532
[gaim-migrate @ 18008]
Mark Doliner <markdoliner@pidgin.im>
parents:
15000
diff
changeset
|
159 | size_t current_buffer_size; /**< This gradually increases for fast |
|
9df6112da532
[gaim-migrate @ 18008]
Mark Doliner <markdoliner@pidgin.im>
parents:
15000
diff
changeset
|
160 | network connections. */ |
|
9df6112da532
[gaim-migrate @ 18008]
Mark Doliner <markdoliner@pidgin.im>
parents:
15000
diff
changeset
|
161 | |
| 15884 | 162 | PurpleXferStatusType status; /**< File Transfer's status. */ |
| 4538 | 163 | |
|
28971
26b55b57d27e
*** Plucked rev 3ad8ea46 (resiak@pidgin.im):
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
28688
diff
changeset
|
164 | /** I/O operations, which should be set by the prpl using |
|
26b55b57d27e
*** Plucked rev 3ad8ea46 (resiak@pidgin.im):
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
28688
diff
changeset
|
165 | * purple_xfer_set_init_fnc() and friends. Setting #init is |
|
26b55b57d27e
*** Plucked rev 3ad8ea46 (resiak@pidgin.im):
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
28688
diff
changeset
|
166 | * mandatory; all others are optional. |
|
26b55b57d27e
*** Plucked rev 3ad8ea46 (resiak@pidgin.im):
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
28688
diff
changeset
|
167 | */ |
| 4514 | 168 | struct |
| 169 | { | |
| 15884 | 170 | void (*init)(PurpleXfer *xfer); |
| 171 | void (*request_denied)(PurpleXfer *xfer); | |
| 172 | void (*start)(PurpleXfer *xfer); | |
| 173 | void (*end)(PurpleXfer *xfer); | |
| 174 | void (*cancel_send)(PurpleXfer *xfer); | |
| 175 | void (*cancel_recv)(PurpleXfer *xfer); | |
| 176 | gssize (*read)(guchar **buffer, PurpleXfer *xfer); | |
| 177 | gssize (*write)(const guchar *buffer, size_t size, PurpleXfer *xfer); | |
| 178 | void (*ack)(PurpleXfer *xfer, const guchar *buffer, size_t size); | |
| 4514 | 179 | } ops; |
| 180 | ||
| 15884 | 181 | PurpleXferUiOps *ui_ops; /**< UI-specific operations. */ |
| 4514 | 182 | void *ui_data; /**< UI-specific data. */ |
| 183 | ||
|
32248
aa63f22a6e6a
Rename field for consistency.
Andrew Victor <andrew.victor@mxit.com>
parents:
32239
diff
changeset
|
184 | void *proto_data; /**< prpl-specific data. */ |
| 4514 | 185 | }; |
| 186 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
187 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
188 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
189 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
190 | |
| 4514 | 191 | /**************************************************************************/ |
| 192 | /** @name File Transfer API */ | |
| 193 | /**************************************************************************/ | |
| 194 | /*@{*/ | |
| 195 | ||
| 196 | /** | |
| 197 | * Creates a new file transfer handle. | |
| 7805 | 198 | * This is called by prpls. |
| 199 | * The handle starts with a ref count of 1, and this reference | |
| 200 | * is owned by the core. The prpl normally does not need to | |
| 15884 | 201 | * purple_xfer_ref or unref. |
| 4514 | 202 | * |
| 203 | * @param account The account sending or receiving the file. | |
| 204 | * @param type The type of file transfer. | |
| 205 | * @param who The name of the remote user. | |
| 206 | * | |
| 207 | * @return A file transfer handle. | |
| 208 | */ | |
| 15884 | 209 | PurpleXfer *purple_xfer_new(PurpleAccount *account, |
| 210 | PurpleXferType type, const char *who); | |
| 4514 | 211 | |
| 212 | /** | |
|
15702
111fdd9108cc
Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15435
diff
changeset
|
213 | * Returns all xfers |
|
111fdd9108cc
Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15435
diff
changeset
|
214 | * |
|
111fdd9108cc
Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15435
diff
changeset
|
215 | * @return all current xfers with refs |
|
111fdd9108cc
Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15435
diff
changeset
|
216 | */ |
| 15884 | 217 | GList *purple_xfers_get_all(void); |
|
15702
111fdd9108cc
Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15435
diff
changeset
|
218 | |
|
111fdd9108cc
Patch from Richard 'wabz' Nelson to add file-transfer ui. Amazing stuff\!
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15435
diff
changeset
|
219 | /** |
| 15884 | 220 | * Increases the reference count on a PurpleXfer. |
| 221 | * Please call purple_xfer_unref later. | |
| 4514 | 222 | * |
| 7805 | 223 | * @param xfer A file transfer handle. |
| 4514 | 224 | */ |
| 15884 | 225 | void purple_xfer_ref(PurpleXfer *xfer); |
| 7805 | 226 | |
| 227 | /** | |
| 15884 | 228 | * Decreases the reference count on a PurpleXfer. |
| 229 | * If the reference reaches 0, purple_xfer_destroy (an internal function) | |
| 7805 | 230 | * will destroy the xfer. It calls the ui destroy cb first. |
|
8735
01248ea222d3
[gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents:
8585
diff
changeset
|
231 | * Since the core keeps a ref on the xfer, only an erroneous call to |
| 7805 | 232 | * this function will destroy the xfer while still in use. |
| 233 | * | |
| 234 | * @param xfer A file transfer handle. | |
| 235 | */ | |
| 15884 | 236 | void purple_xfer_unref(PurpleXfer *xfer); |
| 4514 | 237 | |
| 238 | /** | |
|
8585
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
239 | * Requests confirmation for a file transfer from the user. If receiving |
|
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
240 | * a file which is known at this point, this requests user to accept and |
|
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
241 | * save the file. If the filename is unknown (not set) this only requests user |
|
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
242 | * to accept the file transfer. In this case protocol must call this function |
|
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
243 | * again once the filename is available. |
| 4514 | 244 | * |
| 245 | * @param xfer The file transfer to request confirmation on. | |
| 246 | */ | |
| 15884 | 247 | void purple_xfer_request(PurpleXfer *xfer); |
| 4514 | 248 | |
| 249 | /** | |
| 250 | * Called if the user accepts the file transfer request. | |
| 251 | * | |
| 252 | * @param xfer The file transfer. | |
| 253 | * @param filename The filename. | |
| 254 | */ | |
| 15884 | 255 | void purple_xfer_request_accepted(PurpleXfer *xfer, const char *filename); |
| 4514 | 256 | |
| 257 | /** | |
| 258 | * Called if the user rejects the file transfer request. | |
| 259 | * | |
| 260 | * @param xfer The file transfer. | |
| 261 | */ | |
| 15884 | 262 | void purple_xfer_request_denied(PurpleXfer *xfer); |
| 4514 | 263 | |
| 264 | /** | |
|
32289
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
265 | * Returns the socket file descriptor. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
266 | * |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
267 | * @param xfer The file transfer. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
268 | * |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
269 | * @return The socket file descriptor. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
270 | */ |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
271 | int purple_xfer_get_fd(PurpleXfer *xfer); |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
272 | |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
273 | /** |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
274 | * Returns the Watcher for the transfer. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
275 | * |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
276 | * @param xfer The file transfer. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
277 | * |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
278 | * @return The watcher. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
279 | */ |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
280 | int purple_xfer_get_watcher(PurpleXfer *xfer); |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
281 | |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
282 | /** |
| 4514 | 283 | * Returns the type of file transfer. |
| 284 | * | |
| 285 | * @param xfer The file transfer. | |
| 286 | * | |
| 287 | * @return The type of the file transfer. | |
| 288 | */ | |
| 15884 | 289 | PurpleXferType purple_xfer_get_type(const PurpleXfer *xfer); |
| 4514 | 290 | |
| 291 | /** | |
| 292 | * Returns the account the file transfer is using. | |
| 293 | * | |
| 294 | * @param xfer The file transfer. | |
| 295 | * | |
| 296 | * @return The account. | |
| 297 | */ | |
| 15884 | 298 | PurpleAccount *purple_xfer_get_account(const PurpleXfer *xfer); |
| 4514 | 299 | |
| 300 | /** | |
|
17852
174c0d122a79
Add new function purple_xfer_get_remote_user.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
301 | * Returns the name of the remote user. |
|
174c0d122a79
Add new function purple_xfer_get_remote_user.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
302 | * |
|
174c0d122a79
Add new function purple_xfer_get_remote_user.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
303 | * @param xfer The file transfer. |
|
174c0d122a79
Add new function purple_xfer_get_remote_user.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
304 | * |
|
174c0d122a79
Add new function purple_xfer_get_remote_user.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
305 | * @return The name of the remote user. |
|
174c0d122a79
Add new function purple_xfer_get_remote_user.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
306 | */ |
|
174c0d122a79
Add new function purple_xfer_get_remote_user.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
307 | const char *purple_xfer_get_remote_user(const PurpleXfer *xfer); |
|
174c0d122a79
Add new function purple_xfer_get_remote_user.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
308 | |
|
174c0d122a79
Add new function purple_xfer_get_remote_user.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
309 | /** |
| 7805 | 310 | * Returns the status of the xfer. |
| 311 | * | |
| 312 | * @param xfer The file transfer. | |
| 313 | * | |
| 314 | * @return The status. | |
| 315 | */ | |
| 15884 | 316 | PurpleXferStatusType purple_xfer_get_status(const PurpleXfer *xfer); |
| 7805 | 317 | |
| 318 | /** | |
|
30708
535bec1e66fb
Standardize on "cancelled".
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30131
diff
changeset
|
319 | * Returns true if the file transfer was cancelled. |
| 7738 | 320 | * |
| 321 | * @param xfer The file transfer. | |
| 322 | * | |
|
30708
535bec1e66fb
Standardize on "cancelled".
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30131
diff
changeset
|
323 | * @return Whether or not the transfer was cancelled. |
| 7738 | 324 | */ |
|
32607
3d50780413f8
purple_xfer_is_canceled() renamed to purple_xfer_is_cancelled()
Andrew Victor <andrew.victor@mxit.com>
parents:
32604
diff
changeset
|
325 | gboolean purple_xfer_is_cancelled(const PurpleXfer *xfer); |
| 7738 | 326 | |
| 327 | /** | |
|
4539
44671e1ce14e
[gaim-migrate @ 4818]
Christian Hammond <chipx86@chipx86.com>
parents:
4538
diff
changeset
|
328 | * Returns the completed state for a file transfer. |
|
44671e1ce14e
[gaim-migrate @ 4818]
Christian Hammond <chipx86@chipx86.com>
parents:
4538
diff
changeset
|
329 | * |
|
44671e1ce14e
[gaim-migrate @ 4818]
Christian Hammond <chipx86@chipx86.com>
parents:
4538
diff
changeset
|
330 | * @param xfer The file transfer. |
|
44671e1ce14e
[gaim-migrate @ 4818]
Christian Hammond <chipx86@chipx86.com>
parents:
4538
diff
changeset
|
331 | * |
|
44671e1ce14e
[gaim-migrate @ 4818]
Christian Hammond <chipx86@chipx86.com>
parents:
4538
diff
changeset
|
332 | * @return The completed state. |
|
44671e1ce14e
[gaim-migrate @ 4818]
Christian Hammond <chipx86@chipx86.com>
parents:
4538
diff
changeset
|
333 | */ |
| 15884 | 334 | gboolean purple_xfer_is_completed(const PurpleXfer *xfer); |
|
4539
44671e1ce14e
[gaim-migrate @ 4818]
Christian Hammond <chipx86@chipx86.com>
parents:
4538
diff
changeset
|
335 | |
|
44671e1ce14e
[gaim-migrate @ 4818]
Christian Hammond <chipx86@chipx86.com>
parents:
4538
diff
changeset
|
336 | /** |
| 4514 | 337 | * Returns the name of the file being sent or received. |
| 338 | * | |
| 339 | * @param xfer The file transfer. | |
| 340 | * | |
| 341 | * @return The filename. | |
| 342 | */ | |
| 15884 | 343 | const char *purple_xfer_get_filename(const PurpleXfer *xfer); |
| 4514 | 344 | |
| 345 | /** | |
| 346 | * Returns the file's destination filename, | |
| 347 | * | |
| 348 | * @param xfer The file transfer. | |
| 349 | * | |
| 350 | * @return The destination filename. | |
| 351 | */ | |
| 15884 | 352 | const char *purple_xfer_get_local_filename(const PurpleXfer *xfer); |
| 4514 | 353 | |
| 354 | /** | |
|
13009
12ef9f229961
[gaim-migrate @ 15362]
Daniel Atallah <datallah@pidgin.im>
parents:
12151
diff
changeset
|
355 | * Returns the number of bytes sent (or received) so far. |
| 4514 | 356 | * |
| 357 | * @param xfer The file transfer. | |
| 358 | * | |
| 359 | * @return The number of bytes sent. | |
| 360 | */ | |
| 15884 | 361 | size_t purple_xfer_get_bytes_sent(const PurpleXfer *xfer); |
| 4514 | 362 | |
| 363 | /** | |
|
13009
12ef9f229961
[gaim-migrate @ 15362]
Daniel Atallah <datallah@pidgin.im>
parents:
12151
diff
changeset
|
364 | * Returns the number of bytes remaining to send or receive. |
| 4514 | 365 | * |
| 366 | * @param xfer The file transfer. | |
| 367 | * | |
|
13009
12ef9f229961
[gaim-migrate @ 15362]
Daniel Atallah <datallah@pidgin.im>
parents:
12151
diff
changeset
|
368 | * @return The number of bytes remaining. |
| 4514 | 369 | */ |
| 15884 | 370 | size_t purple_xfer_get_bytes_remaining(const PurpleXfer *xfer); |
| 4514 | 371 | |
| 372 | /** | |
| 373 | * Returns the size of the file being sent or received. | |
| 374 | * | |
| 375 | * @param xfer The file transfer. | |
| 7805 | 376 | * |
| 4514 | 377 | * @return The total size of the file. |
| 378 | */ | |
| 15884 | 379 | size_t purple_xfer_get_size(const PurpleXfer *xfer); |
| 4514 | 380 | |
| 381 | /** | |
| 382 | * Returns the current percentage of progress of the transfer. | |
| 383 | * | |
| 384 | * This is a number between 0 (0%) and 1 (100%). | |
| 385 | * | |
| 386 | * @param xfer The file transfer. | |
| 387 | * | |
| 388 | * @return The percentage complete. | |
| 389 | */ | |
| 15884 | 390 | double purple_xfer_get_progress(const PurpleXfer *xfer); |
| 4514 | 391 | |
| 392 | /** | |
| 393 | * Returns the local port number in the file transfer. | |
| 394 | * | |
| 395 | * @param xfer The file transfer. | |
| 396 | * | |
| 397 | * @return The port number on this end. | |
| 398 | */ | |
| 15884 | 399 | unsigned int purple_xfer_get_local_port(const PurpleXfer *xfer); |
| 4514 | 400 | |
| 401 | /** | |
| 402 | * Returns the remote IP address in the file transfer. | |
| 403 | * | |
| 404 | * @param xfer The file transfer. | |
| 405 | * | |
| 406 | * @return The IP address on the other end. | |
| 407 | */ | |
| 15884 | 408 | const char *purple_xfer_get_remote_ip(const PurpleXfer *xfer); |
| 4514 | 409 | |
| 410 | /** | |
| 411 | * Returns the remote port number in the file transfer. | |
| 412 | * | |
| 413 | * @param xfer The file transfer. | |
| 414 | * | |
| 415 | * @return The port number on the other end. | |
| 416 | */ | |
| 15884 | 417 | unsigned int purple_xfer_get_remote_port(const PurpleXfer *xfer); |
| 4514 | 418 | |
| 419 | /** | |
|
22338
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
420 | * Returns the time the transfer of a file started. |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
421 | * |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
422 | * @param xfer The file transfer. |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
423 | * |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
424 | * @return The time when the transfer started. |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
425 | */ |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
426 | time_t purple_xfer_get_start_time(const PurpleXfer *xfer); |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
427 | |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
428 | /** |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
429 | * Returns the time the transfer of a file ended. |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
430 | * |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
431 | * @param xfer The file transfer. |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
432 | * |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
433 | * @return The time when the transfer ended. |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
434 | */ |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
435 | time_t purple_xfer_get_end_time(const PurpleXfer *xfer); |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
436 | |
|
d6a489105624
Add accessor and update finch to not touch the internals of PurpleXfer.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20940
diff
changeset
|
437 | /** |
|
32289
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
438 | * Sets the socket file descriptor. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
439 | * |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
440 | * @param xfer The file transfer. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
441 | * @param fd The file descriptor. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
442 | */ |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
443 | void purple_xfer_set_fd(PurpleXfer *xfer, int fd); |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
444 | |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
445 | /** |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
446 | * Sets the watcher for the file transfer. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
447 | * |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
448 | * @param xfer The file transfer. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
449 | * @param watcher The watcher. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
450 | */ |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
451 | void purple_xfer_set_watcher(PurpleXfer *xfer, int watcher); |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
452 | |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
453 | /** |
| 4538 | 454 | * Sets the completed state for the file transfer. |
| 455 | * | |
| 456 | * @param xfer The file transfer. | |
| 457 | * @param completed The completed state. | |
| 458 | */ | |
| 15884 | 459 | void purple_xfer_set_completed(PurpleXfer *xfer, gboolean completed); |
| 4538 | 460 | |
| 461 | /** | |
|
32289
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
462 | * Sets the current status for the file transfer. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
463 | * |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
464 | * @param xfer The file transfer. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
465 | * @param status The current status. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
466 | */ |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
467 | void purple_xfer_set_status(PurpleXfer *xfer, PurpleXferStatusType status); |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
468 | |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
469 | /** |
| 4514 | 470 | * Sets the filename for the file transfer. |
| 471 | * | |
| 472 | * @param xfer The file transfer. | |
|
9933
61bd3fadbfe6
[gaim-migrate @ 10825]
Dave West <kat@users.sourceforge.net>
parents:
9511
diff
changeset
|
473 | * @param message The message. |
|
61bd3fadbfe6
[gaim-migrate @ 10825]
Dave West <kat@users.sourceforge.net>
parents:
9511
diff
changeset
|
474 | */ |
| 15884 | 475 | void purple_xfer_set_message(PurpleXfer *xfer, const char *message); |
|
9933
61bd3fadbfe6
[gaim-migrate @ 10825]
Dave West <kat@users.sourceforge.net>
parents:
9511
diff
changeset
|
476 | |
|
61bd3fadbfe6
[gaim-migrate @ 10825]
Dave West <kat@users.sourceforge.net>
parents:
9511
diff
changeset
|
477 | /** |
|
61bd3fadbfe6
[gaim-migrate @ 10825]
Dave West <kat@users.sourceforge.net>
parents:
9511
diff
changeset
|
478 | * Sets the filename for the file transfer. |
|
61bd3fadbfe6
[gaim-migrate @ 10825]
Dave West <kat@users.sourceforge.net>
parents:
9511
diff
changeset
|
479 | * |
|
61bd3fadbfe6
[gaim-migrate @ 10825]
Dave West <kat@users.sourceforge.net>
parents:
9511
diff
changeset
|
480 | * @param xfer The file transfer. |
| 4514 | 481 | * @param filename The filename. |
| 482 | */ | |
| 15884 | 483 | void purple_xfer_set_filename(PurpleXfer *xfer, const char *filename); |
| 4514 | 484 | |
| 485 | /** | |
|
4605
67526771e679
[gaim-migrate @ 4892]
Mark Doliner <markdoliner@pidgin.im>
parents:
4595
diff
changeset
|
486 | * Sets the local filename for the file transfer. |
| 4514 | 487 | * |
| 488 | * @param xfer The file transfer. | |
| 489 | * @param filename The filename | |
| 490 | */ | |
| 15884 | 491 | void purple_xfer_set_local_filename(PurpleXfer *xfer, const char *filename); |
| 4514 | 492 | |
| 493 | /** | |
| 494 | * Sets the size of the file in a file transfer. | |
| 495 | * | |
| 496 | * @param xfer The file transfer. | |
| 497 | * @param size The size of the file. | |
| 498 | */ | |
| 15884 | 499 | void purple_xfer_set_size(PurpleXfer *xfer, size_t size); |
| 4514 | 500 | |
| 501 | /** | |
|
32289
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
502 | * Sets the local port of the file transfer. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
503 | * |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
504 | * @param xfer The file transfer. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
505 | * @param local_port The local port. |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
506 | */ |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
507 | void purple_xfer_set_local_port(PurpleXfer *xfer, unsigned int local_port); |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
508 | |
|
8c121b654972
Add some get/set functions to help hidding _PrupleXfer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
32282
diff
changeset
|
509 | /** |
|
15322
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
510 | * Sets the current working position in the active file transfer. This |
|
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
511 | * can be used to jump backward in the file if the protocol detects |
|
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
512 | * that some bit of data needs to be resent or has been sent twice. |
|
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
513 | * |
|
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
514 | * It's used for pausing and resuming an oscar file transfer. |
|
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
515 | * |
|
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
516 | * @param xfer The file transfer. |
|
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
517 | * @param bytes_sent The new current position in the file. If we're |
|
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
518 | * sending a file then this is the byte that we will |
|
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
519 | * send. If we're receiving a file, this is the |
|
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
520 | * next byte that we expect to receive. |
|
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
521 | */ |
| 15884 | 522 | void purple_xfer_set_bytes_sent(PurpleXfer *xfer, size_t bytes_sent); |
|
15322
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
523 | |
|
cd268e368bc1
[gaim-migrate @ 18050]
Mark Doliner <markdoliner@pidgin.im>
parents:
15280
diff
changeset
|
524 | /** |
| 4514 | 525 | * Returns the UI operations structure for a file transfer. |
| 526 | * | |
| 527 | * @param xfer The file transfer. | |
| 528 | * | |
| 529 | * @return The UI operations structure. | |
| 530 | */ | |
| 15884 | 531 | PurpleXferUiOps *purple_xfer_get_ui_ops(const PurpleXfer *xfer); |
| 4514 | 532 | |
| 533 | /** | |
| 534 | * Sets the read function for the file transfer. | |
| 535 | * | |
| 536 | * @param xfer The file transfer. | |
| 537 | * @param fnc The read function. | |
| 538 | */ | |
| 15884 | 539 | void purple_xfer_set_read_fnc(PurpleXfer *xfer, |
| 540 | gssize (*fnc)(guchar **, PurpleXfer *)); | |
| 4514 | 541 | |
| 542 | /** | |
| 543 | * Sets the write function for the file transfer. | |
| 544 | * | |
| 545 | * @param xfer The file transfer. | |
| 546 | * @param fnc The write function. | |
| 547 | */ | |
| 15884 | 548 | void purple_xfer_set_write_fnc(PurpleXfer *xfer, |
| 549 | gssize (*fnc)(const guchar *, size_t, PurpleXfer *)); | |
| 4514 | 550 | |
| 551 | /** | |
| 552 | * Sets the acknowledge function for the file transfer. | |
| 553 | * | |
| 554 | * @param xfer The file transfer. | |
| 555 | * @param fnc The acknowledge function. | |
| 556 | */ | |
| 15884 | 557 | void purple_xfer_set_ack_fnc(PurpleXfer *xfer, |
| 558 | void (*fnc)(PurpleXfer *, const guchar *, size_t)); | |
| 4514 | 559 | |
| 560 | /** | |
| 7805 | 561 | * Sets the function to be called if the request is denied. |
| 562 | * | |
| 563 | * @param xfer The file transfer. | |
| 564 | * @param fnc The request denied prpl callback. | |
| 565 | */ | |
| 15884 | 566 | void purple_xfer_set_request_denied_fnc(PurpleXfer *xfer, void (*fnc)(PurpleXfer *)); |
| 7805 | 567 | |
| 568 | /** | |
| 4514 | 569 | * Sets the transfer initialization function for the file transfer. |
| 570 | * | |
| 15884 | 571 | * This function is required, and must call purple_xfer_start() with |
| 4514 | 572 | * the necessary parameters. This will be called if the file transfer |
| 573 | * is accepted by the user. | |
| 574 | * | |
| 575 | * @param xfer The file transfer. | |
| 576 | * @param fnc The transfer initialization function. | |
| 577 | */ | |
| 15884 | 578 | void purple_xfer_set_init_fnc(PurpleXfer *xfer, void (*fnc)(PurpleXfer *)); |
| 4514 | 579 | |
| 580 | /** | |
| 581 | * Sets the start transfer function for the file transfer. | |
| 582 | * | |
| 583 | * @param xfer The file transfer. | |
| 584 | * @param fnc The start transfer function. | |
| 585 | */ | |
| 15884 | 586 | void purple_xfer_set_start_fnc(PurpleXfer *xfer, void (*fnc)(PurpleXfer *)); |
| 4514 | 587 | |
| 588 | /** | |
| 589 | * Sets the end transfer function for the file transfer. | |
| 590 | * | |
| 591 | * @param xfer The file transfer. | |
| 592 | * @param fnc The end transfer function. | |
| 593 | */ | |
| 15884 | 594 | void purple_xfer_set_end_fnc(PurpleXfer *xfer, void (*fnc)(PurpleXfer *)); |
| 4514 | 595 | |
| 596 | /** | |
|
4675
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
597 | * Sets the cancel send function for the file transfer. |
| 4514 | 598 | * |
| 599 | * @param xfer The file transfer. | |
|
4675
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
600 | * @param fnc The cancel send function. |
| 4514 | 601 | */ |
| 15884 | 602 | void purple_xfer_set_cancel_send_fnc(PurpleXfer *xfer, void (*fnc)(PurpleXfer *)); |
|
4675
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
603 | |
|
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
604 | /** |
|
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
605 | * Sets the cancel receive function for the file transfer. |
|
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
606 | * |
|
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
607 | * @param xfer The file transfer. |
|
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
608 | * @param fnc The cancel receive function. |
|
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
609 | */ |
| 15884 | 610 | void purple_xfer_set_cancel_recv_fnc(PurpleXfer *xfer, void (*fnc)(PurpleXfer *)); |
| 4514 | 611 | |
| 612 | /** | |
| 613 | * Reads in data from a file transfer stream. | |
| 614 | * | |
| 615 | * @param xfer The file transfer. | |
| 616 | * @param buffer The buffer that will be created to contain the data. | |
| 617 | * | |
| 8231 | 618 | * @return The number of bytes read, or -1. |
| 4514 | 619 | */ |
| 15884 | 620 | gssize purple_xfer_read(PurpleXfer *xfer, guchar **buffer); |
| 4514 | 621 | |
| 622 | /** | |
| 623 | * Writes data to a file transfer stream. | |
| 624 | * | |
| 625 | * @param xfer The file transfer. | |
| 626 | * @param buffer The buffer to read the data from. | |
| 627 | * @param size The number of bytes to write. | |
| 628 | * | |
| 8231 | 629 | * @return The number of bytes written, or -1. |
| 4514 | 630 | */ |
| 15884 | 631 | gssize purple_xfer_write(PurpleXfer *xfer, const guchar *buffer, gsize size); |
| 4514 | 632 | |
| 633 | /** | |
| 634 | * Starts a file transfer. | |
| 635 | * | |
| 636 | * Either @a fd must be specified <i>or</i> @a ip and @a port on a | |
| 637 | * file receive transfer. On send, @a fd must be specified, and | |
| 638 | * @a ip and @a port are ignored. | |
| 639 | * | |
|
32608
68c936aba5df
Remove the special case of fd=0 in purple_xfer_start().
Andrew Victor <andrew.victor@mxit.com>
parents:
32607
diff
changeset
|
640 | * Passing @a fd as '-1' is a special-case and indicates to the |
|
68c936aba5df
Remove the special case of fd=0 in purple_xfer_start().
Andrew Victor <andrew.victor@mxit.com>
parents:
32607
diff
changeset
|
641 | * protocol plugin to facilitate the file transfer itself. |
|
28152
e9800c07eb5b
ft: Fix a bunch of uses of 0 as an 'invalid' fd.
Paul Aurich <darkrain42@pidgin.im>
parents:
28150
diff
changeset
|
642 | * |
| 4514 | 643 | * @param xfer The file transfer. |
| 644 | * @param fd The file descriptor for the socket. | |
| 645 | * @param ip The IP address to connect to. | |
| 646 | * @param port The port to connect to. | |
| 647 | */ | |
| 15884 | 648 | void purple_xfer_start(PurpleXfer *xfer, int fd, const char *ip, |
| 4514 | 649 | unsigned int port); |
| 650 | ||
| 651 | /** | |
| 652 | * Ends a file transfer. | |
| 653 | * | |
| 654 | * @param xfer The file transfer. | |
| 655 | */ | |
| 15884 | 656 | void purple_xfer_end(PurpleXfer *xfer); |
| 4514 | 657 | |
| 658 | /** | |
|
8585
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
659 | * Adds a new file transfer to the list of file transfers. Call this only |
| 15884 | 660 | * if you are not using purple_xfer_start. |
|
8585
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
661 | * |
|
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
662 | * @param xfer The file transfer. |
|
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
663 | */ |
| 15884 | 664 | void purple_xfer_add(PurpleXfer *xfer); |
|
8585
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
665 | |
|
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
666 | /** |
|
4675
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
667 | * Cancels a file transfer on the local end. |
| 4514 | 668 | * |
| 669 | * @param xfer The file transfer. | |
| 670 | */ | |
| 15884 | 671 | void purple_xfer_cancel_local(PurpleXfer *xfer); |
|
4675
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
672 | |
|
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
673 | /** |
|
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
674 | * Cancels a file transfer from the remote end. |
|
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
675 | * |
|
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
676 | * @param xfer The file transfer. |
|
8e0a7b537ca2
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4605
diff
changeset
|
677 | */ |
| 15884 | 678 | void purple_xfer_cancel_remote(PurpleXfer *xfer); |
| 4514 | 679 | |
| 680 | /** | |
| 681 | * Displays a file transfer-related error message. | |
| 682 | * | |
| 15884 | 683 | * This is a wrapper around purple_notify_error(), which automatically |
| 10654 | 684 | * specifies a title ("File transfer to <i>user</i> failed" or |
| 685 | * "File Transfer from <i>user</i> failed"). | |
| 4514 | 686 | * |
| 10654 | 687 | * @param type The type of file transfer. |
| 688 | * @param account The account sending or receiving the file. | |
| 689 | * @param who The user on the other end of the transfer. | |
| 690 | * @param msg The message to display. | |
| 4514 | 691 | */ |
| 15884 | 692 | void purple_xfer_error(PurpleXferType type, PurpleAccount *account, const char *who, const char *msg); |
| 4514 | 693 | |
|
8585
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
694 | /** |
|
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
695 | * Updates file transfer progress. |
|
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
696 | * |
|
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
697 | * @param xfer The file transfer. |
|
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
698 | */ |
| 15884 | 699 | void purple_xfer_update_progress(PurpleXfer *xfer); |
|
8585
23db71a2d432
[gaim-migrate @ 9335]
Pekka Riikonen <priikone@silcnet.org>
parents:
8231
diff
changeset
|
700 | |
|
11084
b6acee973833
[gaim-migrate @ 13103]
Jonathan Clark <ardentlygnarly@users.sourceforge.net>
parents:
10654
diff
changeset
|
701 | /** |
|
b6acee973833
[gaim-migrate @ 13103]
Jonathan Clark <ardentlygnarly@users.sourceforge.net>
parents:
10654
diff
changeset
|
702 | * Displays a file transfer-related message in the conversation window |
|
b6acee973833
[gaim-migrate @ 13103]
Jonathan Clark <ardentlygnarly@users.sourceforge.net>
parents:
10654
diff
changeset
|
703 | * |
| 15884 | 704 | * This is a wrapper around purple_conversation_write |
|
11084
b6acee973833
[gaim-migrate @ 13103]
Jonathan Clark <ardentlygnarly@users.sourceforge.net>
parents:
10654
diff
changeset
|
705 | * |
|
b6acee973833
[gaim-migrate @ 13103]
Jonathan Clark <ardentlygnarly@users.sourceforge.net>
parents:
10654
diff
changeset
|
706 | * @param xfer The file transfer to which this message relates. |
|
b6acee973833
[gaim-migrate @ 13103]
Jonathan Clark <ardentlygnarly@users.sourceforge.net>
parents:
10654
diff
changeset
|
707 | * @param message The message to display. |
|
11129
c986d8566843
[gaim-migrate @ 13185]
Mark Doliner <markdoliner@pidgin.im>
parents:
11084
diff
changeset
|
708 | * @param is_error Is this an error message?. |
|
11084
b6acee973833
[gaim-migrate @ 13103]
Jonathan Clark <ardentlygnarly@users.sourceforge.net>
parents:
10654
diff
changeset
|
709 | */ |
| 15884 | 710 | void purple_xfer_conversation_write(PurpleXfer *xfer, char *message, gboolean is_error); |
|
11084
b6acee973833
[gaim-migrate @ 13103]
Jonathan Clark <ardentlygnarly@users.sourceforge.net>
parents:
10654
diff
changeset
|
711 | |
|
28150
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
712 | /** |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
713 | * Allows the UI to signal it's ready to send/receive data (depending on |
|
28156
0a75e2463576
ft: Add infrastructure to allow a prpl to moderate when to send packets.
Paul Aurich <darkrain42@pidgin.im>
parents:
28152
diff
changeset
|
714 | * the direction of the file transfer. Used when the UI is providing |
|
0a75e2463576
ft: Add infrastructure to allow a prpl to moderate when to send packets.
Paul Aurich <darkrain42@pidgin.im>
parents:
28152
diff
changeset
|
715 | * read/write/data_not_sent UI ops. |
|
28150
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
716 | * |
|
28156
0a75e2463576
ft: Add infrastructure to allow a prpl to moderate when to send packets.
Paul Aurich <darkrain42@pidgin.im>
parents:
28152
diff
changeset
|
717 | * @param xfer The file transfer which is ready. |
|
28150
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
718 | */ |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
719 | void purple_xfer_ui_ready(PurpleXfer *xfer); |
|
1213ec1efcf8
ft: Allow the UI to overloadthe use of fread/fwrite. Closes #9844.
Jan Kaluza <hanzz.k@gmail.com>
parents:
22338
diff
changeset
|
720 | |
|
28156
0a75e2463576
ft: Add infrastructure to allow a prpl to moderate when to send packets.
Paul Aurich <darkrain42@pidgin.im>
parents:
28152
diff
changeset
|
721 | /** |
| 28688 | 722 | * Allows the prpl to signal it's ready to send/receive data (depending on |
|
28156
0a75e2463576
ft: Add infrastructure to allow a prpl to moderate when to send packets.
Paul Aurich <darkrain42@pidgin.im>
parents:
28152
diff
changeset
|
723 | * the direction of the file transfer. Used when the prpl provides read/write |
|
0a75e2463576
ft: Add infrastructure to allow a prpl to moderate when to send packets.
Paul Aurich <darkrain42@pidgin.im>
parents:
28152
diff
changeset
|
724 | * ops and cannot/does not provide a raw fd to the core. |
|
0a75e2463576
ft: Add infrastructure to allow a prpl to moderate when to send packets.
Paul Aurich <darkrain42@pidgin.im>
parents:
28152
diff
changeset
|
725 | * |
|
0a75e2463576
ft: Add infrastructure to allow a prpl to moderate when to send packets.
Paul Aurich <darkrain42@pidgin.im>
parents:
28152
diff
changeset
|
726 | * @param xfer The file transfer which is ready. |
|
0a75e2463576
ft: Add infrastructure to allow a prpl to moderate when to send packets.
Paul Aurich <darkrain42@pidgin.im>
parents:
28152
diff
changeset
|
727 | */ |
|
0a75e2463576
ft: Add infrastructure to allow a prpl to moderate when to send packets.
Paul Aurich <darkrain42@pidgin.im>
parents:
28152
diff
changeset
|
728 | void purple_xfer_prpl_ready(PurpleXfer *xfer); |
|
0a75e2463576
ft: Add infrastructure to allow a prpl to moderate when to send packets.
Paul Aurich <darkrain42@pidgin.im>
parents:
28152
diff
changeset
|
729 | |
|
28263
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
730 | /** |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
731 | * Gets the thumbnail data for a transfer |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
732 | * |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
733 | * @param xfer The file transfer to get the thumbnail for |
|
30126
f09ecb81212c
Rename purple_xfer_get_thumbnail_data/size to be more D-Bus friendly.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30115
diff
changeset
|
734 | * @param len If not @c NULL, the length of the thumbnail data returned |
|
f09ecb81212c
Rename purple_xfer_get_thumbnail_data/size to be more D-Bus friendly.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30115
diff
changeset
|
735 | * will be set in the location pointed to by this. |
|
28263
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
736 | * @return The thumbnail data, or NULL if there is no thumbnail |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
737 | */ |
|
30126
f09ecb81212c
Rename purple_xfer_get_thumbnail_data/size to be more D-Bus friendly.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30115
diff
changeset
|
738 | gconstpointer purple_xfer_get_thumbnail(const PurpleXfer *xfer, gsize *len); |
|
28263
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
739 | |
|
30113
f60cbf3b3ca9
Allow PRPLs to specify the image formats acceptable for thumbnails (in
Marcus Lundblad <malu@pidgin.im>
parents:
29465
diff
changeset
|
740 | /** |
|
f60cbf3b3ca9
Allow PRPLs to specify the image formats acceptable for thumbnails (in
Marcus Lundblad <malu@pidgin.im>
parents:
29465
diff
changeset
|
741 | * Gets the mimetype of the thumbnail preview for a transfer |
|
f60cbf3b3ca9
Allow PRPLs to specify the image formats acceptable for thumbnails (in
Marcus Lundblad <malu@pidgin.im>
parents:
29465
diff
changeset
|
742 | * |
|
f60cbf3b3ca9
Allow PRPLs to specify the image formats acceptable for thumbnails (in
Marcus Lundblad <malu@pidgin.im>
parents:
29465
diff
changeset
|
743 | * @param xfer The file transfer to get the mimetype for |
|
f60cbf3b3ca9
Allow PRPLs to specify the image formats acceptable for thumbnails (in
Marcus Lundblad <malu@pidgin.im>
parents:
29465
diff
changeset
|
744 | * @return The mimetype of the thumbnail, or @c NULL if not thumbnail is set |
|
f60cbf3b3ca9
Allow PRPLs to specify the image formats acceptable for thumbnails (in
Marcus Lundblad <malu@pidgin.im>
parents:
29465
diff
changeset
|
745 | */ |
|
f60cbf3b3ca9
Allow PRPLs to specify the image formats acceptable for thumbnails (in
Marcus Lundblad <malu@pidgin.im>
parents:
29465
diff
changeset
|
746 | const gchar *purple_xfer_get_thumbnail_mimetype(const PurpleXfer *xfer); |
|
31293
169eeb43b52c
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
30708
diff
changeset
|
747 | |
|
169eeb43b52c
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
30708
diff
changeset
|
748 | |
|
28263
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
749 | /** |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
750 | * Sets the thumbnail data for a transfer |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
751 | * |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
752 | * @param xfer The file transfer to set the data for |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
753 | * @param thumbnail A pointer to the thumbnail data, this will be copied |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
754 | * @param size The size in bytes of the passed in thumbnail data |
|
30113
f60cbf3b3ca9
Allow PRPLs to specify the image formats acceptable for thumbnails (in
Marcus Lundblad <malu@pidgin.im>
parents:
29465
diff
changeset
|
755 | * @param mimetype The mimetype of the generated thumbnail |
|
28263
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
756 | */ |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
757 | void purple_xfer_set_thumbnail(PurpleXfer *xfer, gconstpointer thumbnail, |
|
30113
f60cbf3b3ca9
Allow PRPLs to specify the image formats acceptable for thumbnails (in
Marcus Lundblad <malu@pidgin.im>
parents:
29465
diff
changeset
|
758 | gsize size, const gchar *mimetype); |
|
28263
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
759 | |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
760 | /** |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
761 | * Prepare a thumbnail for a transfer (if the UI supports it) |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
762 | * will be no-op in case the UI doesn't implement thumbnail creation |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
763 | * |
|
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
764 | * @param xfer The file transfer to create a thumbnail for |
|
30114
8472e53fbbfc
Set desired image formats for thumbnails as a parameter to
Marcus Lundblad <malu@pidgin.im>
parents:
30113
diff
changeset
|
765 | * @param formats A comma-separated list of mimetypes for image formats |
|
8472e53fbbfc
Set desired image formats for thumbnails as a parameter to
Marcus Lundblad <malu@pidgin.im>
parents:
30113
diff
changeset
|
766 | * the protocols can use for thumbnails. |
|
28263
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
767 | */ |
|
30114
8472e53fbbfc
Set desired image formats for thumbnails as a parameter to
Marcus Lundblad <malu@pidgin.im>
parents:
30113
diff
changeset
|
768 | void purple_xfer_prepare_thumbnail(PurpleXfer *xfer, const gchar *formats); |
|
28263
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
769 | |
|
32239
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
770 | /** |
|
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
771 | * Sets the protocol data for a file transfer. |
|
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
772 | * |
|
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
773 | * @param xfer The file transfer. |
|
32554
0d844fac6679
Fix a bunch of tiny problems generating our doxygen documentation
Mark Doliner <markdoliner@pidgin.im>
parents:
32289
diff
changeset
|
774 | * @param proto_data The protocol data to set for the file transfer. |
|
32239
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
775 | */ |
|
32248
aa63f22a6e6a
Rename field for consistency.
Andrew Victor <andrew.victor@mxit.com>
parents:
32239
diff
changeset
|
776 | void purple_xfer_set_protocol_data(PurpleXfer *xfer, gpointer proto_data); |
|
32239
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
777 | |
|
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
778 | /** |
|
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
779 | * Gets the protocol data for a file transfer. |
|
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
780 | * |
|
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
781 | * @param xfer The file transfer. |
|
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
782 | * |
|
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
783 | * @return The protocol data for the file transfer. |
|
3d93edd94500
Introduce API purple_xfer_get_protocol_data() and purple_xfer_set_protocol_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31293
diff
changeset
|
784 | */ |
|
32256
620e4580252a
These pointers should rather be marked const.
Andrew Victor <andrew.victor@mxit.com>
parents:
32249
diff
changeset
|
785 | gpointer purple_xfer_get_protocol_data(const PurpleXfer *xfer); |
|
28263
d525655fd0f1
It broke a bit during merge.
Marcus Lundblad <malu@pidgin.im>
parents:
28262
diff
changeset
|
786 | |
|
32249
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
787 | /** |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
788 | * Set the UI data associated with this file transfer. |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
789 | * |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
790 | * @param xfer The file transfer. |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
791 | * @param ui_data A pointer to associate with this file transfer. |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
792 | */ |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
793 | void purple_xfer_set_ui_data(PurpleXfer *xfer, gpointer ui_data); |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
794 | |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
795 | /** |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
796 | * Get the UI data associated with this file transfer. |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
797 | * |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
798 | * @param xfer The file transfer. |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
799 | * |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
800 | * @return The UI data associated with this file transfer. This is a |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
801 | * convenience field provided to the UIs--it is not |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
802 | * used by the libpurple core. |
|
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
803 | */ |
|
32256
620e4580252a
These pointers should rather be marked const.
Andrew Victor <andrew.victor@mxit.com>
parents:
32249
diff
changeset
|
804 | gpointer purple_xfer_get_ui_data(const PurpleXfer *xfer); |
|
32249
b636d2273c64
Added accessor functions purple_xfer_get_ui_data() and purple_xfer_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
32248
diff
changeset
|
805 | |
|
6263
6fec763a314c
[gaim-migrate @ 6760]
Christian Hammond <chipx86@chipx86.com>
parents:
6241
diff
changeset
|
806 | /*@}*/ |
|
6fec763a314c
[gaim-migrate @ 6760]
Christian Hammond <chipx86@chipx86.com>
parents:
6241
diff
changeset
|
807 | |
|
6fec763a314c
[gaim-migrate @ 6760]
Christian Hammond <chipx86@chipx86.com>
parents:
6241
diff
changeset
|
808 | /**************************************************************************/ |
| 4514 | 809 | /** @name UI Registration Functions */ |
| 810 | /**************************************************************************/ | |
| 811 | /*@{*/ | |
| 812 | ||
| 813 | /** | |
|
11281
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
814 | * Returns the handle to the file transfer subsystem |
|
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
815 | * |
|
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
816 | * @return The handle |
|
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
817 | */ |
| 15884 | 818 | void *purple_xfers_get_handle(void); |
|
11281
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
819 | |
|
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
820 | /** |
|
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
821 | * Initializes the file transfer subsystem |
|
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
822 | */ |
| 15884 | 823 | void purple_xfers_init(void); |
|
11281
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
824 | |
|
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
825 | /** |
|
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
826 | * Uninitializes the file transfer subsystem |
|
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
827 | */ |
| 15884 | 828 | void purple_xfers_uninit(void); |
|
11281
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
829 | |
|
a5cda37a16be
[gaim-migrate @ 13478]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11159
diff
changeset
|
830 | /** |
| 15884 | 831 | * Sets the UI operations structure to be used in all purple file transfers. |
| 4514 | 832 | * |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6269
diff
changeset
|
833 | * @param ops The UI operations structure. |
| 4514 | 834 | */ |
| 15884 | 835 | void purple_xfers_set_ui_ops(PurpleXferUiOps *ops); |
| 4514 | 836 | |
| 837 | /** | |
| 15884 | 838 | * Returns the UI operations structure to be used in all purple file transfers. |
| 4514 | 839 | * |
| 840 | * @return The UI operations structure. | |
| 841 | */ | |
| 15884 | 842 | PurpleXferUiOps *purple_xfers_get_ui_ops(void); |
| 4514 | 843 | |
| 844 | /*@}*/ | |
| 845 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
846 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
847 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
848 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
849 | |
| 15884 | 850 | #endif /* _PURPLE_FT_H_ */ |