PurpleXferUiOps Struct Reference

File transfer UI operations. More...

#include <ft.h>

Collaboration diagram for PurpleXferUiOps:
Collaboration graph

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.

Detailed Description

File transfer UI operations.

Any UI representing a file transfer must assign a filled-out PurpleXferUiOps structure to the purple_xfer.

Definition at line 71 of file ft.h.

Field Documentation

void(* PurpleXferUiOps::add_thumbnail)(PurpleXfer *xfer, const gchar *formats)

Op to create a thumbnail image for a file transfer.

Parameters
xferThe file transfer structure

Definition at line 128 of file ft.h.

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.

Parameters
xferThe file transfer structure
bufferA pointer to the beginning of the unwritten data.
sizeThe amount of unwritten data.
Since
2.6.0

Definition at line 121 of file ft.h.

gssize(* PurpleXferUiOps::ui_read)(PurpleXfer *xfer, guchar **buffer, gssize size)

UI op to read data to send to the prpl for a file transfer.

Parameters
xferThe file transfer structure
bufferA pointer to a buffer. The UI must allocate this buffer. libpurple will free the data.
sizeThe maximum amount of data to put in the buffer.
Returns
The amount of data in the buffer, 0 if nothing is available, and a negative value if an error occurred and the transfer should be cancelled (libpurple will cancel).
Since
2.6.0

Definition at line 107 of file ft.h.

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.

Parameters
xferThe file transfer structure
bufferThe buffer to write
sizeThe size of the buffer
Returns
size if the write was successful, or a value between 0 and size on error.
Since
2.6.0

Definition at line 92 of file ft.h.


The documentation for this struct was generated from the following file:
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!