Signal

PurpleXfer::read-local

since: 3.0.0

Declaration

glong
read_local (
  PurpleXfer* self,
  gpointer buffer,
  glong size,
  gpointer user_data
)

Description [src]

Read data locally to send to the protocol for a file transfer.

The default class handler will read from a file using standard library functions. If you connect to this signal, you must connect to PurpleXfer::open-local, PurpleXfer::query-local, PurpleXfer::write-local and PurpleXfer::data-not-sent as well.

Default handler:

The default handler is called after the handlers added via g_signal_connect().

Available since: 3.0.0

Parameters

buffer

Type: gpointer

A pointer to a buffer to fill.

The argument will be set by the function.
The argument can be set to NULL by the signal handler.
The called function takes ownership of the data, and is responsible for freeing it.
size

Type: glong

The maximum amount of data to put in the buffer.

Return value

Type: glong

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