![]() |
![]() |
![]() |
UDisks Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Properties | Signals |
Cancel (IN a{sv} options);
Operation readable s Progress readable d ProgressValid readable b StartTime readable t ExpectedEndTime readable t Objects readable ao StartedByUID readable u Cancelable readable b
Some operations may take a long time (hours) to complete, that is, to actually send the D-Bus reply message back. One example of such an operation is the Format() method that is used to format a block device.
When such operations are initated, a job object implementing this interface may be created so the progress can be tracked by the caller (and also other observers).
The object(s) that a job affects (such as block devices or drives) can be determined by looking at the "Objects" property. Among other things, this can be used to draw a spinner in the user interface next to e.g. an icon for the drive or device in question.
The "Operation" property is used to convey the type of job currently in progress.
The user id of the user who started the job is set in the "StartedByUID" property.
A job may convey how much progress has been made, see the "Progress" and "ProgressValid" properties.
When a job completes, the "Completed" signal is emitted.
A job may or may not be cancelable, see the
"Cancelable" property. To cancel a
job use the Cancel() method. This
will cause the job to complete (with success
set to FALSE
) and
the D-Bus method used to initiate the operation to return,
usually returning the
org.freedesktop.UDisks2.Error.Cancelled
error.
Cancel (IN a{sv} options);
Cancels the job. Fails with the
org.freedesktop.UDisks2.Error.Failed
error
if "Cancelable" is FALSE
.
|
Options (currently unused except for standard options). |
Operation readable s
The type of the operation that the job represents.
Known job operation types include:
ata-smart-selftest |
SMART self-test operation. |
drive-eject |
Ejecting the medium from a drive. |
encrypted-unlock |
Unlocking encrypted device. |
encrypted-lock |
Locking encrypted device. |
encrypted-modify |
Modifying encrypted device. |
swapspace-start |
Starting swapspace. |
swapspace-stop |
Stopping swapspace. |
filesystem-mount |
Mounting a filesystem. |
filesystem-unmount |
Unmounting a filesystem. |
filesystem-modify |
Modifying a filesystem. |
format-erase |
Erasing a device. |
format-mkfs |
Creating a filesystem. |
loop-setup |
Setting up a loop device. |
partition-modify |
Modifying a partition. |
partition-delete |
Deleting a partition. |
partition-create |
Creating a partition. |
cleanup |
Cleaning up devices that were removed without being properly unmounted or shut down. |
The udisks_client_get_job_description() function can be used to get a localized human readable description.
Progress readable d
How much progress has been made. Values are in the range 0 to 1.
Do not use unless "ProgressValid" is TRUE
.
StartTime readable t
The point in time (micro-seconds since the Unix Epoch) that the job was started.
ExpectedEndTime readable t
The expected point in time (micro-seconds since the Unix Epoch) that the job will complete or 0 if unknown.
StartedByUID readable u
The id of the user who started the job or 0 if started by root or not through udisks.