FiletransferStatus

From TrillWiki

Jump to: navigation, search

The filetransferStatus function will update the status or progress of a particular file transfer.

Compatibility: 2.0 and higher

Contents

Syntax

plugin_send(MYGUID, "filetransferStatus", struct filetransfer_status_t *);

Note that all Trillian functions and notifications begin with a lower-case letter, despite the Wiki requirement that all pages start with a capital letter.

Parameters

FiletransferStatus utilitizes the filetransfer_status_t structure.

struct filetransfer_status_t {  
 	unsigned int			struct_size; 
 
 	char				*medium; 
 
 	int				connection_id; 
 	int				filetransfer_id; 
 
 	char				*type;
 	char				*description; 
 
 	int				bytes; 
 };


medium
The medium for the file transfer.
connection_id
The connection id associated with the file transfer.
filetransfer_id
The filetransfer id associated with the file transfer.
type
The type of status update to perform. This can be "progress", "error", "status", "complete" or "close". Starting with Trillian 4.0, "extended_status" is also supported to output detailed information to the log panel of file transfer windows.
description
The description to go along with the type that was set. This is valid for the above types, except for progress.
bytes
When the type is progress, this will specify the bytes to offset (i.e. the number of bytes that has been received from the network since the previous call to filetransferStatus).


Return Value

Negative value on error, 0 on success.

Remarks

When a file transfer is stopped (either by being canceled, closed or completed) certain buttons may change states to allow for different actions to be performed (such as resend or execute).