Class
PurpleXfer
since: 2.0
Description [src]
class Purple.Xfer : GObject.Object {
parent_instance: GObject
}
A representation of a file transfer.
Available since: 2.0
Instance methods
purple_xfer_conversation_write
Displays a file transfer-related message in the conversation window.
since: 2.0
purple_xfer_get_bytes_remaining
Returns the number of bytes remaining to send or receive.
since: 2.0
purple_xfer_get_thumbnail_mimetype
Gets the mimetype of the thumbnail preview for a transfer.
since: 2.7
purple_xfer_get_visible
Returns whether the UI should show the file transfer in its listing.
since: 3.0
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.
since: 2.7
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.
since: 3.0
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.
since: 2.0
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.
since: 2.0
purple_xfer_set_visible
Sets whether the UI should show the file transfer in its listing.
since: 3.0
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.
since: 2.6
Signals
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.
since: 3.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.
since: 3.0
Signals inherited from GObject (1)
GObject::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
);
}
Base class for all PurpleXfer
‘s.
Class members
parent_class: GObjectClass
- No description available.
init: void (* init) ( PurpleXfer* xfer )
- No description available.
request_denied: void (* request_denied) ( PurpleXfer* xfer )
- No description available.
start: void (* start) ( PurpleXfer* xfer )
- No description available.
end: void (* end) ( PurpleXfer* xfer )
- No description available.
cancel_send: void (* cancel_send) ( PurpleXfer* xfer )
- No description available.
cancel_recv: void (* cancel_recv) ( PurpleXfer* xfer )
- No description available.
read: gssize (* read) ( PurpleXfer* xfer, guchar** buffer, gsize size )
- No description available.
write: gssize (* write) ( PurpleXfer* xfer, const guchar* buffer, gsize size )
- No description available.
ack: void (* ack) ( PurpleXfer* xfer, const guchar* buffer, gsize size )
- No description available.
open_local: gboolean (* open_local) ( PurpleXfer* xfer )
- No description available.
query_local: gboolean (* query_local) ( PurpleXfer* xfer, const gchar* filename )
- No description available.
read_local: gssize (* read_local) ( PurpleXfer* xfer, guchar* buffer, gssize size )
- No description available.
write_local: gssize (* write_local) ( PurpleXfer* xfer, const guchar* buffer, gssize size )
- No description available.
data_not_sent: gboolean (* data_not_sent) ( PurpleXfer* xfer, const guchar* buffer, gsize size )
- No description available.