Mercurial > pidgin
comparison src/ft.h @ 12151:de798f2f4bf1
[gaim-migrate @ 14452]
Sort out the ft.h include situation. I changed from ssize_t to gssize in the file transfer stuff.
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Sat, 19 Nov 2005 03:16:49 +0000 |
| parents | e91f3f06a435 |
| children | 661bce46758b |
comparison
equal
deleted
inserted
replaced
| 12150:e91f3f06a435 | 12151:de798f2f4bf1 |
|---|---|
| 28 /**************************************************************************/ | 28 /**************************************************************************/ |
| 29 /** Data Structures */ | 29 /** Data Structures */ |
| 30 /**************************************************************************/ | 30 /**************************************************************************/ |
| 31 typedef struct _GaimXfer GaimXfer; | 31 typedef struct _GaimXfer GaimXfer; |
| 32 | 32 |
| 33 #include <glib.h> | |
| 34 #include <stdio.h> | |
| 35 | |
| 33 #include "account.h" | 36 #include "account.h" |
| 34 #include "internal.h" | |
| 35 | 37 |
| 36 /** | 38 /** |
| 37 * Types of file transfers. | 39 * Types of file transfers. |
| 38 */ | 40 */ |
| 39 typedef enum | 41 typedef enum |
| 114 void (*request_denied)(GaimXfer *xfer); | 116 void (*request_denied)(GaimXfer *xfer); |
| 115 void (*start)(GaimXfer *xfer); | 117 void (*start)(GaimXfer *xfer); |
| 116 void (*end)(GaimXfer *xfer); | 118 void (*end)(GaimXfer *xfer); |
| 117 void (*cancel_send)(GaimXfer *xfer); | 119 void (*cancel_send)(GaimXfer *xfer); |
| 118 void (*cancel_recv)(GaimXfer *xfer); | 120 void (*cancel_recv)(GaimXfer *xfer); |
| 119 ssize_t (*read)(guchar **buffer, GaimXfer *xfer); | 121 gssize (*read)(guchar **buffer, GaimXfer *xfer); |
| 120 ssize_t (*write)(const guchar *buffer, size_t size, GaimXfer *xfer); | 122 gssize (*write)(const guchar *buffer, size_t size, GaimXfer *xfer); |
| 121 void (*ack)(GaimXfer *xfer, const guchar *buffer, size_t size); | 123 void (*ack)(GaimXfer *xfer, const guchar *buffer, size_t size); |
| 122 | 124 |
| 123 } ops; | 125 } ops; |
| 124 | 126 |
| 125 GaimXferUiOps *ui_ops; /**< UI-specific operations. */ | 127 GaimXferUiOps *ui_ops; /**< UI-specific operations. */ |
| 380 * | 382 * |
| 381 * @param xfer The file transfer. | 383 * @param xfer The file transfer. |
| 382 * @param fnc The read function. | 384 * @param fnc The read function. |
| 383 */ | 385 */ |
| 384 void gaim_xfer_set_read_fnc(GaimXfer *xfer, | 386 void gaim_xfer_set_read_fnc(GaimXfer *xfer, |
| 385 ssize_t (*fnc)(guchar **, GaimXfer *)); | 387 gssize (*fnc)(guchar **, GaimXfer *)); |
| 386 | 388 |
| 387 /** | 389 /** |
| 388 * Sets the write function for the file transfer. | 390 * Sets the write function for the file transfer. |
| 389 * | 391 * |
| 390 * @param xfer The file transfer. | 392 * @param xfer The file transfer. |
| 391 * @param fnc The write function. | 393 * @param fnc The write function. |
| 392 */ | 394 */ |
| 393 void gaim_xfer_set_write_fnc(GaimXfer *xfer, | 395 void gaim_xfer_set_write_fnc(GaimXfer *xfer, |
| 394 ssize_t (*fnc)(const guchar *, size_t, GaimXfer *)); | 396 gssize (*fnc)(const guchar *, size_t, GaimXfer *)); |
| 395 | 397 |
| 396 /** | 398 /** |
| 397 * Sets the acknowledge function for the file transfer. | 399 * Sets the acknowledge function for the file transfer. |
| 398 * | 400 * |
| 399 * @param xfer The file transfer. | 401 * @param xfer The file transfer. |
| 460 * @param xfer The file transfer. | 462 * @param xfer The file transfer. |
| 461 * @param buffer The buffer that will be created to contain the data. | 463 * @param buffer The buffer that will be created to contain the data. |
| 462 * | 464 * |
| 463 * @return The number of bytes read, or -1. | 465 * @return The number of bytes read, or -1. |
| 464 */ | 466 */ |
| 465 ssize_t gaim_xfer_read(GaimXfer *xfer, guchar **buffer); | 467 gssize gaim_xfer_read(GaimXfer *xfer, guchar **buffer); |
| 466 | 468 |
| 467 /** | 469 /** |
| 468 * Writes data to a file transfer stream. | 470 * Writes data to a file transfer stream. |
| 469 * | 471 * |
| 470 * @param xfer The file transfer. | 472 * @param xfer The file transfer. |
| 471 * @param buffer The buffer to read the data from. | 473 * @param buffer The buffer to read the data from. |
| 472 * @param size The number of bytes to write. | 474 * @param size The number of bytes to write. |
| 473 * | 475 * |
| 474 * @return The number of bytes written, or -1. | 476 * @return The number of bytes written, or -1. |
| 475 */ | 477 */ |
| 476 ssize_t gaim_xfer_write(GaimXfer *xfer, const guchar *buffer, size_t size); | 478 gssize gaim_xfer_write(GaimXfer *xfer, const guchar *buffer, gsize size); |
| 477 | 479 |
| 478 /** | 480 /** |
| 479 * Starts a file transfer. | 481 * Starts a file transfer. |
| 480 * | 482 * |
| 481 * Either @a fd must be specified <i>or</i> @a ip and @a port on a | 483 * Either @a fd must be specified <i>or</i> @a ip and @a port on a |
