pidgin 2.14.14dev
Loading...
Searching...
No Matches
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

◆ add_thumbnail

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.

◆ add_xfer

void(* PurpleXferUiOps::add_xfer) (PurpleXfer *xfer)

Definition at line 75 of file ft.h.

◆ cancel_local

void(* PurpleXferUiOps::cancel_local) (PurpleXfer *xfer)

Definition at line 77 of file ft.h.

◆ cancel_remote

void(* PurpleXferUiOps::cancel_remote) (PurpleXfer *xfer)

Definition at line 78 of file ft.h.

◆ data_not_sent

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.

◆ destroy

void(* PurpleXferUiOps::destroy) (PurpleXfer *xfer)

Definition at line 74 of file ft.h.

◆ new_xfer

void(* PurpleXferUiOps::new_xfer) (PurpleXfer *xfer)

Definition at line 73 of file ft.h.

◆ ui_read

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.

◆ ui_write

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.

◆ update_progress

void(* PurpleXferUiOps::update_progress) (PurpleXfer *xfer, double percent)

Definition at line 76 of file ft.h.


The documentation for this struct was generated from the following file: