File Transfer Task

File Transfer Task — Monitoring file transfers

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <spice-client.h>

double              spice_file_transfer_task_get_progress
                                                        (SpiceFileTransferTask *self);
char *              spice_file_transfer_task_get_filename
                                                        (SpiceFileTransferTask *self);
void                spice_file_transfer_task_cancel     (SpiceFileTransferTask *self);

Description

SpiceFileTransferTask is an object that represents a particular file transfer between the client and the guest. The properties and signals of the object can be used to monitor the status and result of the transfer. The Main Channel's "new-file-transfer" signal will be emitted whenever a new file transfer task is initiated.

Details

spice_file_transfer_task_get_progress ()

double              spice_file_transfer_task_get_progress
                                                        (SpiceFileTransferTask *self);

Convenience function for retrieving the current progress of this file transfer task.

self :

a file transfer task

Returns :

A percentage value between 0 and 100

Since 0.31


spice_file_transfer_task_get_filename ()

char *              spice_file_transfer_task_get_filename
                                                        (SpiceFileTransferTask *self);

Gets the name of the file being transferred in this task

self :

a file transfer task

Returns :

The basename of the file. [transfer none]

Since 0.31


spice_file_transfer_task_cancel ()

void                spice_file_transfer_task_cancel     (SpiceFileTransferTask *self);

Cancels the file transfer task. Note that depending on how the file transfer was initiated, multiple file transfer tasks may share a single "cancellable" object, so canceling one task may result in the cancellation of other tasks.

self :

a file transfer task

Since 0.31

See Also

SpiceMainChannel