File transfer UI operations. More...
#include <ft.h>
Data Fields | |
| void(* | new_xfer )(PurpleXfer *xfer) |
| void(* | destroy )(PurpleXfer *xfer) |
| void(* | add_xfer )(PurpleXfer *xfer) |
| void(* | update_progress )(PurpleXfer *xfer, double percent) |
| void(* | cancel_local )(PurpleXfer *xfer) |
| void(* | cancel_remote )(PurpleXfer *xfer) |
| gssize(* | ui_write )(PurpleXfer *xfer, const guchar *buffer, gssize size) |
| UI op to write data received from the prpl. | |
| gssize(* | ui_read )(PurpleXfer *xfer, guchar **buffer, gssize size) |
| UI op to read data to send to the prpl for a file transfer. | |
| void(* | data_not_sent )(PurpleXfer *xfer, const guchar *buffer, gsize size) |
| Op to notify the UI that not all the data read in was written. | |
| void(* | add_thumbnail )(PurpleXfer *xfer, const gchar *formats) |
| Op to create a thumbnail image for a file transfer. | |
File transfer UI operations.
Any UI representing a file transfer must assign a filled-out PurpleXferUiOps structure to the purple_xfer.
| void(* PurpleXferUiOps::add_thumbnail)(PurpleXfer *xfer, const gchar *formats) |
| void(* PurpleXferUiOps::data_not_sent)(PurpleXfer *xfer, const guchar *buffer, gsize size) |
Op to notify the UI that not all the data read in was written.
The UI should re-enqueue this data and return it the next time read is called.
This MUST be implemented if read and write are implemented.
| xfer | The file transfer structure |
| buffer | A pointer to the beginning of the unwritten data. |
| size | The amount of unwritten data. |
| gssize(* PurpleXferUiOps::ui_read)(PurpleXfer *xfer, guchar **buffer, gssize size) |
UI op to read data to send to the prpl for a file transfer.
| xfer | The file transfer structure |
| buffer | A pointer to a buffer. The UI must allocate this buffer. libpurple will free the data. |
| size | The maximum amount of data to put in the buffer. |
| gssize(* PurpleXferUiOps::ui_write)(PurpleXfer *xfer, const guchar *buffer, gssize size) |
UI op to write data received from the prpl.
The UI must deal with the entire buffer and return size, or it is treated as an error.
| xfer | The file transfer structure |
| buffer | The buffer to write |
| size | The size of the buffer |