Class
PurpleXfer
Constructors
purple_xfer_new
Creates a new file transfer handle. This is called by protocols.
Functions
purple_xfer_error
Displays a file transfer-related error message.
Instance methods
purple_xfer_cancel_local
Cancels a file transfer on the local end.
purple_xfer_cancel_remote
Cancels a file transfer from the remote end.
purple_xfer_conversation_write
Displays a file transfer-related message in the conversation window.
purple_xfer_end
Ends a file transfer.
purple_xfer_get_account
Returns the account the file transfer is using.
purple_xfer_get_bytes_remaining
Returns the number of bytes remaining to send or receive.
purple_xfer_get_bytes_sent
Returns the number of bytes sent (or received) so far.
purple_xfer_get_end_time
Returns the time the transfer of a file ended.
purple_xfer_get_fd
Returns the socket file descriptor.
purple_xfer_get_filename
Returns the name of the file being sent or received.
purple_xfer_get_local_filename
Returns the file’s destination filename,
purple_xfer_get_local_port
Returns the local port number in the file transfer.
purple_xfer_get_message
Returns the message for the file transfer.
purple_xfer_get_progress
Returns the current percentage of progress of the transfer.
purple_xfer_get_remote_ip
Returns the remote IP address in the file transfer.
purple_xfer_get_remote_port
Returns the remote port number in the file transfer.
purple_xfer_get_remote_user
Returns the name of the remote user.
purple_xfer_get_size
Returns the size of the file being sent or received.
purple_xfer_get_start_time
Returns the time the transfer of a file started.
purple_xfer_get_status
Returns the status of the xfer.
purple_xfer_get_thumbnail
Gets the thumbnail data for a transfer.
purple_xfer_get_thumbnail_mimetype
Gets the mimetype of the thumbnail preview for a transfer.
purple_xfer_get_ui_ops
Returns the UI operations structure for a file transfer.
purple_xfer_get_visible
Returns whether the UI should show the file transfer in its listing.
Available since: 3.0.0
purple_xfer_get_watcher
Returns the Watcher for the transfer.
purple_xfer_get_xfer_type
Returns the type of file transfer.
purple_xfer_is_cancelled
Returns true if the file transfer was cancelled.
purple_xfer_is_completed
Returns the completed state for a file transfer.
purple_xfer_prepare_thumbnail
Prepare a thumbnail for a transfer (if the UI supports it) will be no-op in case the UI doesn’t implement thumbnail creation.
purple_xfer_protocol_ready
Allows the protocol to signal it’s ready to send/receive data (depending on the direction of the file transfer. Used when the protocol provides read/write ops and cannot/does not provide a raw fd to the core.
purple_xfer_read
Reads in data from a file transfer stream.
purple_xfer_request
Requests confirmation for a file transfer from the user. If receiving a file which is known at this point, this requests user to accept and save the file. If the filename is unknown (not set) this only requests user to accept the file transfer. In this case protocol must call this function again once the filename is available.
purple_xfer_request_accepted
Called if the user accepts the file transfer request.
purple_xfer_request_denied
Called if the user rejects the file transfer request.
purple_xfer_set_bytes_sent
Sets the current working position in the active file transfer. This can be used to jump backward in the file if the protocol detects that some bit of data needs to be resent or has been sent twice.
purple_xfer_set_completed
Sets the completed state for the file transfer.
purple_xfer_set_fd
Sets the socket file descriptor.
purple_xfer_set_filename
Sets the filename for the file transfer.
purple_xfer_set_local_filename
Sets the local filename for the file transfer.
purple_xfer_set_local_port
Sets the local port of the file transfer.
purple_xfer_set_message
Sets the message for the file transfer.
purple_xfer_set_remote_user
Sets the name of the remote user.
purple_xfer_set_size
Sets the size of the file in a file transfer.
purple_xfer_set_status
Sets the current status for the file transfer.
purple_xfer_set_thumbnail
Sets the thumbnail data for a transfer.
purple_xfer_set_visible
Sets whether the UI should show the file transfer in its listing.
Available since: 3.0.0
purple_xfer_set_watcher
Sets the watcher for the file transfer.
purple_xfer_start
Starts a file transfer.
purple_xfer_ui_ready
Allows the UI to signal it’s ready to send/receive data (depending on the direction of the file transfer. Used when the UI is providing read/write/data_not_sent UI ops.
purple_xfer_write
Writes data to a file transfer stream.
Properties
Purple.Xfer:account
Purple.Xfer:bytes-sent
Purple.Xfer:end-time
Purple.Xfer:fd
Purple.Xfer:file-size
Purple.Xfer:filename
Purple.Xfer:local-filename
Purple.Xfer:local-port
Purple.Xfer:message
Purple.Xfer:progress
Purple.Xfer:remote-ip
Purple.Xfer:remote-port
Purple.Xfer:remote-user
Purple.Xfer:start-time
Purple.Xfer:status
Purple.Xfer:type
Purple.Xfer:visible
Purple.Xfer:watcher
Signals
Purple.Xfer::add-thumbnail
Request that a thumbnail be added to a file transfer.
Available since: 3.0.0
Purple.Xfer::data-not-sent
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.
Available since: 3.0.0
Purple.Xfer::read-local
Read data locally to send to the protocol for a file transfer.
Available since: 3.0.0
Purple.Xfer::write-local
Write data received from the protocol locally. The signal handler must deal with the entire buffer and return size, or it is treated as an error.
Available since: 3.0.0
Signals inherited from GObject (1)
GObject.Object::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct PurpleXferClass {
GObjectClass parent_class;
void (* init) (
PurpleXfer* xfer
);
void (* request_denied) (
PurpleXfer* xfer
);
void (* start) (
PurpleXfer* xfer
);
void (* end) (
PurpleXfer* xfer
);
void (* cancel_send) (
PurpleXfer* xfer
);
void (* cancel_recv) (
PurpleXfer* xfer
);
gssize (* read) (
PurpleXfer* xfer,
guchar** buffer,
gsize size
);
gssize (* write) (
PurpleXfer* xfer,
const guchar* buffer,
gsize size
);
void (* ack) (
PurpleXfer* xfer,
const guchar* buffer,
gsize size
);
gboolean (* open_local) (
PurpleXfer* xfer
);
gboolean (* query_local) (
PurpleXfer* xfer,
const gchar* filename
);
gssize (* read_local) (
PurpleXfer* xfer,
guchar* buffer,
gssize size
);
gssize (* write_local) (
PurpleXfer* xfer,
const guchar* buffer,
gssize size
);
gboolean (* data_not_sent) (
PurpleXfer* xfer,
const guchar* buffer,
gsize size
);
}
Class members
parent_class |
|
No description available. | |
init |
|
No description available. | |
request_denied |
|
No description available. | |
start |
|
No description available. | |
end |
|
No description available. | |
cancel_send |
|
No description available. | |
cancel_recv |
|
No description available. | |
read |
|
No description available. | |
write |
|
No description available. | |
ack |
|
No description available. | |
open_local |
|
No description available. | |
query_local |
|
No description available. | |
read_local |
|
No description available. | |
write_local |
|
No description available. | |
data_not_sent |
|
No description available. |
Virtual methods
Purple.XferClass.ack
Purple.XferClass.cancel_recv
Purple.XferClass.cancel_send
Purple.XferClass.data_not_sent
Purple.XferClass.end
Ends a file transfer.
Purple.XferClass.init
Purple.XferClass.open_local
Purple.XferClass.query_local
Purple.XferClass.read
Purple.XferClass.read_local
Purple.XferClass.request_denied
Called if the user rejects the file transfer request.
Purple.XferClass.start
Purple.XferClass.write
Writes data to a file transfer stream.