| 121 |
121 |
| 122 struct mwFileTransferHandler * |
122 struct mwFileTransferHandler * |
| 123 mwServiceFileTransfer_getHandler(struct mwServiceFileTransfer *srvc); |
123 mwServiceFileTransfer_getHandler(struct mwServiceFileTransfer *srvc); |
| 124 |
124 |
| 125 |
125 |
| |
126 const GList * |
| |
127 mwServiceFileTransfer_getTransfers(struct mwServiceFileTransfer *srvc); |
| |
128 |
| |
129 |
| 126 struct mwFileTransfer * |
130 struct mwFileTransfer * |
| 127 mwFileTransfer_new(struct mwServiceFileTransfer *srvc, |
131 mwFileTransfer_new(struct mwServiceFileTransfer *srvc, |
| 128 const struct mwIdBlock *who, const char *msg, |
132 const struct mwIdBlock *who, const char *msg, |
| 129 const char *filename, guint32 filesize); |
133 const char *filename, guint32 filesize); |
| 130 |
134 |
| 192 |
196 |
| 193 |
197 |
| 194 /** Close a file transfer. This will trigger the ft_close function of the |
198 /** Close a file transfer. This will trigger the ft_close function of the |
| 195 session's handler. |
199 session's handler. |
| 196 |
200 |
| 197 @relates mwFileTransfer_reject |
201 @see mwFileTransfer_reject |
| 198 @relates mwFileTransfer_cancel |
202 @see mwFileTransfer_cancel |
| 199 */ |
203 */ |
| 200 int mwFileTransfer_close(struct mwFileTransfer *ft, guint32 code); |
204 int mwFileTransfer_close(struct mwFileTransfer *ft, guint32 code); |
| 201 |
205 |
| 202 |
206 |
| 203 /** send a chunk of data over an outbound file transfer. The client at |
207 /** send a chunk of data over an outbound file transfer. The client at |
| 204 the other end of the transfer should respond with an acknowledgement |
208 the other end of the transfer should respond with an acknowledgement |
| 205 message, which can be caught in the service's handler. |
209 message, which can be caught in the service's handler. |
| 206 |
210 |
| 207 @relates mwFileTransferHandler::ft_ack |
211 @see mwFileTransferHandler::ft_ack |
| 208 */ |
212 */ |
| 209 int mwFileTransfer_send(struct mwFileTransfer *ft, |
213 int mwFileTransfer_send(struct mwFileTransfer *ft, |
| 210 struct mwOpaque *data); |
214 struct mwOpaque *data); |
| 211 |
215 |
| 212 |
216 |
| 215 transfer will stall. However, not all clients will wait for an ack |
219 transfer will stall. However, not all clients will wait for an ack |
| 216 after sending a chunk before sending the next chunk, so it is |
220 after sending a chunk before sending the next chunk, so it is |
| 217 possible to have the handler's ft_recv function triggered again |
221 possible to have the handler's ft_recv function triggered again |
| 218 even if no ack was sent. |
222 even if no ack was sent. |
| 219 |
223 |
| 220 @relates mwFileTransferHandler::ft_recv |
224 @see mwFileTransferHandler::ft_recv |
| 221 */ |
225 */ |
| 222 int mwFileTransfer_ack(struct mwFileTransfer *ft); |
226 int mwFileTransfer_ack(struct mwFileTransfer *ft); |
| 223 |
227 |
| 224 |
228 |
| 225 void mwFileTransfer_setClientData(struct mwFileTransfer *ft, |
229 void mwFileTransfer_setClientData(struct mwFileTransfer *ft, |