| 30 #include <glib.h> |
30 #include <glib.h> |
| 31 #include <glib-object.h> |
31 #include <glib-object.h> |
| 32 |
32 |
| 33 #include "purplefiletransfer.h" |
33 #include "purplefiletransfer.h" |
| 34 #include "purpleprotocol.h" |
34 #include "purpleprotocol.h" |
| |
35 #include "purpleversion.h" |
| 35 |
36 |
| 36 #define PURPLE_TYPE_PROTOCOL_FILE_TRANSFER (purple_protocol_file_transfer_get_type()) |
37 #define PURPLE_TYPE_PROTOCOL_FILE_TRANSFER (purple_protocol_file_transfer_get_type()) |
| |
38 |
| |
39 PURPLE_AVAILABLE_IN_3_0 |
| 37 G_DECLARE_INTERFACE(PurpleProtocolFileTransfer, |
40 G_DECLARE_INTERFACE(PurpleProtocolFileTransfer, |
| 38 purple_protocol_file_transfer, PURPLE, |
41 purple_protocol_file_transfer, PURPLE, |
| 39 PROTOCOL_FILE_TRANSFER, PurpleProtocol) |
42 PROTOCOL_FILE_TRANSFER, PurpleProtocol) |
| 40 |
43 |
| 41 /** |
44 /** |
| 84 * > Note: This function does not take a cancellable as the protocol should be |
87 * > Note: This function does not take a cancellable as the protocol should be |
| 85 * using [property@FileTransfer:cancellable] from @transfer. |
88 * using [property@FileTransfer:cancellable] from @transfer. |
| 86 * |
89 * |
| 87 * Since: 3.0.0 |
90 * Since: 3.0.0 |
| 88 */ |
91 */ |
| |
92 PURPLE_AVAILABLE_IN_3_0 |
| 89 void purple_protocol_file_transfer_send_async(PurpleProtocolFileTransfer *protocol, PurpleFileTransfer *transfer, GAsyncReadyCallback callback, gpointer data); |
93 void purple_protocol_file_transfer_send_async(PurpleProtocolFileTransfer *protocol, PurpleFileTransfer *transfer, GAsyncReadyCallback callback, gpointer data); |
| 90 |
94 |
| 91 /** |
95 /** |
| 92 * purple_protocol_file_transfer_send_finish: |
96 * purple_protocol_file_transfer_send_finish: |
| 93 * @protocol: The instance. |
97 * @protocol: The instance. |
| 101 * Returns: %TRUE if the transfer was started successfully, otherwise %FALSE |
105 * Returns: %TRUE if the transfer was started successfully, otherwise %FALSE |
| 102 * with @error possibly set. |
106 * with @error possibly set. |
| 103 * |
107 * |
| 104 * Since: 3.0.0 |
108 * Since: 3.0.0 |
| 105 */ |
109 */ |
| |
110 PURPLE_AVAILABLE_IN_3_0 |
| 106 gboolean purple_protocol_file_transfer_send_finish(PurpleProtocolFileTransfer *protocol, GAsyncResult *result, GError **error); |
111 gboolean purple_protocol_file_transfer_send_finish(PurpleProtocolFileTransfer *protocol, GAsyncResult *result, GError **error); |
| 107 |
112 |
| 108 /** |
113 /** |
| 109 * purple_protocol_file_transfer_receive_async: |
114 * purple_protocol_file_transfer_receive_async: |
| 110 * @protocol: The instance. |
115 * @protocol: The instance. |
| 118 * > Note: This function does not take a cancellable as the protocol should be |
123 * > Note: This function does not take a cancellable as the protocol should be |
| 119 * using [property@FileTransfer:cancellable] from @transfer. |
124 * using [property@FileTransfer:cancellable] from @transfer. |
| 120 * |
125 * |
| 121 * Since: 3.0.0 |
126 * Since: 3.0.0 |
| 122 */ |
127 */ |
| |
128 PURPLE_AVAILABLE_IN_3_0 |
| 123 void purple_protocol_file_transfer_receive_async(PurpleProtocolFileTransfer *protocol, PurpleFileTransfer *transfer, GAsyncReadyCallback callback, gpointer data); |
129 void purple_protocol_file_transfer_receive_async(PurpleProtocolFileTransfer *protocol, PurpleFileTransfer *transfer, GAsyncReadyCallback callback, gpointer data); |
| 124 |
130 |
| 125 /** |
131 /** |
| 126 * purple_protocol_file_transfer_receive_finish: |
132 * purple_protocol_file_transfer_receive_finish: |
| 127 * @protocol: The instance. |
133 * @protocol: The instance. |
| 135 * Returns: %TRUE if the transfer was started successfully, otherwise %FALSE |
141 * Returns: %TRUE if the transfer was started successfully, otherwise %FALSE |
| 136 * with @error possibly set. |
142 * with @error possibly set. |
| 137 * |
143 * |
| 138 * Since: 3.0.0 |
144 * Since: 3.0.0 |
| 139 */ |
145 */ |
| |
146 PURPLE_AVAILABLE_IN_3_0 |
| 140 gboolean purple_protocol_file_transfer_receive_finish(PurpleProtocolFileTransfer *protocol, GAsyncResult *result, GError **error); |
147 gboolean purple_protocol_file_transfer_receive_finish(PurpleProtocolFileTransfer *protocol, GAsyncResult *result, GError **error); |
| 141 |
148 |
| 142 G_END_DECLS |
149 G_END_DECLS |
| 143 |
150 |
| 144 #endif /* PURPLE_PROTOCOL_FILE_TRANSFER_H */ |
151 #endif /* PURPLE_PROTOCOL_FILE_TRANSFER_H */ |