| 138 transfer. */ |
138 transfer. */ |
| 139 |
139 |
| 140 char *message; /**< A message sent with the request */ |
140 char *message; /**< A message sent with the request */ |
| 141 char *filename; /**< The name sent over the network. */ |
141 char *filename; /**< The name sent over the network. */ |
| 142 char *local_filename; /**< The name on the local hard drive. */ |
142 char *local_filename; /**< The name on the local hard drive. */ |
| 143 size_t size; /**< The size of the file. */ |
143 goffset size; /**< The size of the file. */ |
| 144 |
144 |
| 145 FILE *dest_fp; /**< The destination file pointer. */ |
145 FILE *dest_fp; /**< The destination file pointer. */ |
| 146 |
146 |
| 147 char *remote_ip; /**< The remote IP address. */ |
147 char *remote_ip; /**< The remote IP address. */ |
| 148 int local_port; /**< The local port. */ |
148 int local_port; /**< The local port. */ |
| 149 int remote_port; /**< The remote port. */ |
149 int remote_port; /**< The remote port. */ |
| 150 |
150 |
| 151 int fd; /**< The socket file descriptor. */ |
151 int fd; /**< The socket file descriptor. */ |
| 152 int watcher; /**< Watcher. */ |
152 int watcher; /**< Watcher. */ |
| 153 |
153 |
| 154 size_t bytes_sent; /**< The number of bytes sent. */ |
154 goffset bytes_sent; /**< The number of bytes sent. */ |
| 155 size_t bytes_remaining; /**< The number of bytes remaining. */ |
155 goffset bytes_remaining; /**< The number of bytes remaining. */ |
| 156 time_t start_time; /**< When the transfer of data began. */ |
156 time_t start_time; /**< When the transfer of data began. */ |
| 157 time_t end_time; /**< When the transfer of data ended. */ |
157 time_t end_time; /**< When the transfer of data ended. */ |
| 158 |
158 |
| 159 size_t current_buffer_size; /**< This gradually increases for fast |
159 size_t current_buffer_size; /**< This gradually increases for fast |
| 160 network connections. */ |
160 network connections. */ |
| 356 * |
356 * |
| 357 * @param xfer The file transfer. |
357 * @param xfer The file transfer. |
| 358 * |
358 * |
| 359 * @return The number of bytes sent. |
359 * @return The number of bytes sent. |
| 360 */ |
360 */ |
| 361 size_t purple_xfer_get_bytes_sent(const PurpleXfer *xfer); |
361 goffset purple_xfer_get_bytes_sent(const PurpleXfer *xfer); |
| 362 |
362 |
| 363 /** |
363 /** |
| 364 * Returns the number of bytes remaining to send or receive. |
364 * Returns the number of bytes remaining to send or receive. |
| 365 * |
365 * |
| 366 * @param xfer The file transfer. |
366 * @param xfer The file transfer. |
| 367 * |
367 * |
| 368 * @return The number of bytes remaining. |
368 * @return The number of bytes remaining. |
| 369 */ |
369 */ |
| 370 size_t purple_xfer_get_bytes_remaining(const PurpleXfer *xfer); |
370 goffset purple_xfer_get_bytes_remaining(const PurpleXfer *xfer); |
| 371 |
371 |
| 372 /** |
372 /** |
| 373 * Returns the size of the file being sent or received. |
373 * Returns the size of the file being sent or received. |
| 374 * |
374 * |
| 375 * @param xfer The file transfer. |
375 * @param xfer The file transfer. |
| 376 * |
376 * |
| 377 * @return The total size of the file. |
377 * @return The total size of the file. |
| 378 */ |
378 */ |
| 379 size_t purple_xfer_get_size(const PurpleXfer *xfer); |
379 goffset purple_xfer_get_size(const PurpleXfer *xfer); |
| 380 |
380 |
| 381 /** |
381 /** |
| 382 * Returns the current percentage of progress of the transfer. |
382 * Returns the current percentage of progress of the transfer. |
| 383 * |
383 * |
| 384 * This is a number between 0 (0%) and 1 (100%). |
384 * This is a number between 0 (0%) and 1 (100%). |
| 494 * Sets the size of the file in a file transfer. |
494 * Sets the size of the file in a file transfer. |
| 495 * |
495 * |
| 496 * @param xfer The file transfer. |
496 * @param xfer The file transfer. |
| 497 * @param size The size of the file. |
497 * @param size The size of the file. |
| 498 */ |
498 */ |
| 499 void purple_xfer_set_size(PurpleXfer *xfer, size_t size); |
499 void purple_xfer_set_size(PurpleXfer *xfer, goffset size); |
| 500 |
500 |
| 501 /** |
501 /** |
| 502 * Sets the local port of the file transfer. |
502 * Sets the local port of the file transfer. |
| 503 * |
503 * |
| 504 * @param xfer The file transfer. |
504 * @param xfer The file transfer. |
| 517 * @param bytes_sent The new current position in the file. If we're |
517 * @param bytes_sent The new current position in the file. If we're |
| 518 * sending a file then this is the byte that we will |
518 * sending a file then this is the byte that we will |
| 519 * send. If we're receiving a file, this is the |
519 * send. If we're receiving a file, this is the |
| 520 * next byte that we expect to receive. |
520 * next byte that we expect to receive. |
| 521 */ |
521 */ |
| 522 void purple_xfer_set_bytes_sent(PurpleXfer *xfer, size_t bytes_sent); |
522 void purple_xfer_set_bytes_sent(PurpleXfer *xfer, goffset bytes_sent); |
| 523 |
523 |
| 524 /** |
524 /** |
| 525 * Returns the UI operations structure for a file transfer. |
525 * Returns the UI operations structure for a file transfer. |
| 526 * |
526 * |
| 527 * @param xfer The file transfer. |
527 * @param xfer The file transfer. |