annotate libpurple/ft.h @ 32497:30a92ba1c39f

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