Fri, 20 Oct 2023 01:09:45 -0500
Implement ProtocolFileTransfer
Testing Done:
Ran the unit tests under valgrind.
Bugs closed: PIDGIN-17833
Reviewed at https://reviews.imfreedom.org/r/2643/
|
42375
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Purple is the legal property of its developers, whose names are too numerous |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | # error "only <purple.h> may be included directly" |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef PURPLE_PROTOCOL_FILE_TRANSFER_H |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define PURPLE_PROTOCOL_FILE_TRANSFER_H |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <glib.h> |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | #include <glib-object.h> |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | #include "purplefiletransfer.h" |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | #include "purpleprotocol.h" |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | #define PURPLE_TYPE_PROTOCOL_FILE_TRANSFER (purple_protocol_file_transfer_get_type()) |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | G_DECLARE_INTERFACE(PurpleProtocolFileTransfer, |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | purple_protocol_file_transfer, PURPLE, |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | PROTOCOL_FILE_TRANSFER, PurpleProtocol) |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | /** |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | * PurpleProtocolFileTransfer: |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | * #PurpleProtocolFileTransfer provides methods for sending and receiving |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | * files. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | * Since: 3.0.0 |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | */ |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | /** |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | * PurpleProtocolFileTransferInterface: |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | * This interface defines the behavior for sending and receiving files. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | * Since: 3.0.0 |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | */ |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | struct _PurpleProtocolFileTransferInterface { |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | /*< private >*/ |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | GTypeInterface parent; |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | /*< public >*/ |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | void (*send_async)(PurpleProtocolFileTransfer *protocol, PurpleFileTransfer *transfer, GAsyncReadyCallback callback, gpointer data); |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | gboolean (*send_finish)(PurpleProtocolFileTransfer *protocol, GAsyncResult *result, GError **error); |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | void (*receive_async)(PurpleProtocolFileTransfer *protocol, PurpleFileTransfer *transfer, GAsyncReadyCallback callback, gpointer data); |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | gboolean (*receive_finish)(PurpleProtocolFileTransfer *protocol, GAsyncResult *result, GError **error); |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | /*< private >*/ |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | gpointer reserved[4]; |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | }; |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | G_BEGIN_DECLS |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | /** |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | * purple_protocol_file_transfer_send_async: |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | * @protocol: The instance. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
77 | * @transfer: The file transfer to send. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
78 | * @callback: (scope async): a #GAsyncReadyCallback to call when the request is |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | * satisfied. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | * @data: User data to pass to @callback. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | * Starts the process of sending @transfer. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | * > Note: This function does not take a cancellable as the protocol should be |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | * using [property@FileTransfer:cancellable] from @transfer. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | * Since: 3.0.0 |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | */ |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | void purple_protocol_file_transfer_send_async(PurpleProtocolFileTransfer *protocol, PurpleFileTransfer *transfer, GAsyncReadyCallback callback, gpointer data); |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | /** |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | * purple_protocol_file_transfer_send_finish: |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | * @protocol: The instance. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | * @result: The [iface@Gio.AsyncResult] from the previous |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
95 | * [method@ProtocolFileTransfer.send_async] call. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | * @error: Return address for a #GError, or %NULL. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
97 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | * Finishes a previous call to [method@ProtocolFileTransfer.send_async] and |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | * gets the result. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
100 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
101 | * Returns: %TRUE if the transfer was started successfully, otherwise %FALSE |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
102 | * with @error possibly set. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
103 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
104 | * Since: 3.0.0 |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | */ |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
106 | gboolean purple_protocol_file_transfer_send_finish(PurpleProtocolFileTransfer *protocol, GAsyncResult *result, GError **error); |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | /** |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
109 | * purple_protocol_file_transfer_receive_async: |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | * @protocol: The instance. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
111 | * @transfer: The file transfer to send. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
112 | * @callback: (scope async): a #GAsyncReadyCallback to call when the request is |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
113 | * satisfied. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
114 | * @data: User data to pass to @callback. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
115 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
116 | * Starts the process of receiving @transfer. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
117 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
118 | * > Note: This function does not take a cancellable as the protocol should be |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
119 | * using [property@FileTransfer:cancellable] from @transfer. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
120 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
121 | * Since: 3.0.0 |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
122 | */ |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
123 | void purple_protocol_file_transfer_receive_async(PurpleProtocolFileTransfer *protocol, PurpleFileTransfer *transfer, GAsyncReadyCallback callback, gpointer data); |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
124 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
125 | /** |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
126 | * purple_protocol_file_transfer_receive_finish: |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
127 | * @protocol: The instance. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
128 | * @result: The [iface@Gio.AsyncResult] from the previous |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
129 | * [method@ProtocolFileTransfer.receive_async] call. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
130 | * @error: Return address for a #GError, or %NULL. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
131 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
132 | * Finishes a previous call to [method@ProtocolFileTransfer.receive_async] and |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
133 | * gets the result. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
134 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
135 | * Returns: %TRUE if the transfer was started successfully, otherwise %FALSE |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
136 | * with @error possibly set. |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
137 | * |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
138 | * Since: 3.0.0 |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
139 | */ |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
140 | gboolean purple_protocol_file_transfer_receive_finish(PurpleProtocolFileTransfer *protocol, GAsyncResult *result, GError **error); |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
141 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
142 | G_END_DECLS |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
143 | |
|
8e61249e9b10
Implement ProtocolFileTransfer
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
144 | #endif /* PURPLE_PROTOCOL_FILE_TRANSFER_H */ |