Class

PurpleXfer

Description

class Purple.Xfer : GObject.Object {
  parent_instance: GObject
}
No description available.

Ancestors

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_read_file

Writes chunk of file being sent.

Available since: 2.11.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.

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.

purple_xfer_write_file

Writes chunk of received file.

Available since: 2.11.0

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Purple.Xfer:account
No description available.
Purple.Xfer:bytes-sent
No description available.
Purple.Xfer:end-time
No description available.
Purple.Xfer:fd
No description available.
Purple.Xfer:file-size
No description available.
Purple.Xfer:filename
No description available.
Purple.Xfer:local-filename
No description available.
Purple.Xfer:local-port
No description available.
Purple.Xfer:message
No description available.
Purple.Xfer:progress
No description available.
Purple.Xfer:remote-ip
No description available.
Purple.Xfer:remote-port
No description available.
Purple.Xfer:remote-user
No description available.
Purple.Xfer:start-time
No description available.
Purple.Xfer:status
No description available.
Purple.Xfer:type
No description available.
Purple.Xfer:visible
No description available.
Purple.Xfer:watcher
No description available.

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::open-local

Open a file locally for a file transfer.

Available since: 3.0.0

Purple.Xfer::query-local

Query a file’s properties locally.

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
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.

Virtual methods

Purple.XferClass.ack
No description available.
Purple.XferClass.cancel_recv
No description available.
Purple.XferClass.cancel_send
No description available.
Purple.XferClass.data_not_sent
No description available.
Purple.XferClass.end

Ends a file transfer.

Purple.XferClass.init
No description available.
Purple.XferClass.open_local
No description available.
Purple.XferClass.query_local
No description available.
Purple.XferClass.read
No description available.
Purple.XferClass.read_local
No description available.
Purple.XferClass.request_denied

Called if the user rejects the file transfer request.

Purple.XferClass.start
No description available.
Purple.XferClass.write

Writes data to a file transfer stream.

Purple.XferClass.write_local
No description available.