org.freedesktop.UDisks2.Manager

org.freedesktop.UDisks2.Manager — Manager singleton

Methods

CanFormat       (IN  s     type,
                 OUT (bs)  available);
CanResize       (IN  s     type,
                 OUT (bts) available);
CanCheck        (IN  s     type,
                 OUT (bs)  available);
CanRepair       (IN  s     type,
                 OUT (bs)  available);
LoopSetup       (IN  h     fd,
                 IN  a{sv} options,
                 OUT o     resulting_device);
MDRaidCreate    (IN  ao    blocks,
                 IN  s     level,
                 IN  s     name,
                 IN  t     chunk,
                 IN  a{sv} options,
                 OUT o     resulting_array);
EnableModules   (IN  b     enable);
GetBlockDevices (IN  a{sv} options,
                 OUT ao    block_objects);
ResolveDevice   (IN  a{sv} devspec,
                 IN  a{sv} options,
                 OUT ao    devices);

Properties

Version                   readable   s
SupportedFilesystems      readable   as
SupportedEncryptionTypes  readable   as
DefaultEncryptionType     readable   s

Description

Interface for top-level manager singleton object located at the object path /org/freedesktop/UDisks2/Manager.

Method Details

The CanFormat() method

CanFormat (IN  s    type,
           OUT (bs) available);

Tests for availability to create the given filesystem. See the "SupportedFilesystems" property for a list of known types. Unknown or unsupported filesystems result in an error.

IN s type:

The filesystem type to be tested for formatting availability.

OUT (bs) available:

Formatting availability and the required binary name if missing (i.e. no error and returns FALSE).

Since 2.7.2


The CanResize() method

CanResize (IN  s     type,
           OUT (bts) available);

Tests for availability to resize the given filesystem. The mode flags indicate if growing and/or shriking resize is available if mounted/unmounted. The mode corresponds to bitwise-OR combined BDFsResizeFlags of the libblockdev FS plugin: BD_FS_OFFLINE_SHRINK = 2, shrinking resize allowed when unmounted BD_FS_OFFLINE_GROW = 4, growing resize allowed when unmounted BD_FS_ONLINE_SHRINK = 8, shrinking resize allowed when mounted BD_FS_ONLINE_GROW = 16, growing resize allowed when mounted Unknown filesystems or filesystems which do not support resizing result in errors.

IN s type:

The filesystem type to be tested for resize availability.

OUT (bts) available:

Resizing availability, flags for allowed resizing (i.e. growing/shrinking support for online/offline) and the required binary name if missing (i.e. no error and returns FALSE).

Since 2.7.2


The CanCheck() method

CanCheck (IN  s    type,
          OUT (bs) available);

Tests for availability to check the given filesystem. Unsupported filesystems or filesystems which do not support checking result in errors.

IN s type:

The filesystem type to be tested for consistency check availability.

OUT (bs) available:

Checking availability and the required binary name if missing (i.e. no error and returns FALSE).

Since 2.7.2


The CanRepair() method

CanRepair (IN  s    type,
           OUT (bs) available);

Tests for availability repair the given filesystem. Unsupported filesystems or filesystems which do not support repairing result in errors.

IN s type:

The filesystem type to be tested for repair availability.

OUT (bs) available:

Repair availability and the required binary name if missing (i.e. no error and returns FALSE).

Since 2.7.2


The LoopSetup() method

LoopSetup (IN  h     fd,
           IN  a{sv} options,
           OUT o     resulting_device);

Creates a block device for the file represented by fd.

IN h fd:

An index for the file descriptor to use.

IN a{sv} options:

Options - known options (in addition to standard options) includes offset (of type 't'), size (of type 't'), read-only (of type 'b') and no-part-scan (of type 'b').

OUT o resulting_device:

An object path to the object implementing the org.freedesktop.UDisks2.Block interface.


The MDRaidCreate() method

MDRaidCreate (IN  ao    blocks,
              IN  s     level,
              IN  s     name,
              IN  t     chunk,
              IN  a{sv} options,
              OUT o     resulting_array);

Creates a new RAID array on the block devices specified by blocks. Each element in this array must be an object path to an object implementing the org.freedesktop.UDisks2.Block interface.

Known and supported values for level include raid0, raid1, raid4, raid5, raid6 and raid10.

Before the array is created, all devices in blocks are erased. Once created (but before the method returns), the RAID array will be erased.

IN ao blocks:

An array of object paths to objects implementing the org.freedesktop.UDisks2.Block interface.

IN s level:

The RAID level for the array.

IN s name:

The name for the array.

IN t chunk:

The chunk size (in bytes) or 0 if level is raid1.

IN a{sv} options:

Options (currently unused except for standard options).

OUT o resulting_array:

An object path to the object implementing the org.freedesktop.UDisks2.MDRaid interface.

Since 2.0.0


The EnableModules() method

EnableModules (IN  b enable);

Loads and activates modules. This action also causes all objects to receive "add" uevent that triggers additional module interfaces activation.

Modules cannot be deactivated for the moment. Any consecutive calls with modules already enabled equals to noop.

IN b enable:

A boolean value indicating whether modules should be enabled. Currently only the TRUE value is permitted.


The GetBlockDevices() method

GetBlockDevices (IN  a{sv} options,
                 OUT ao    block_objects);

Get list of all block devices (object paths of objects implementing the org.freedesktop.UDisks2.Block interface) known to UDisks.

IN a{sv} options:

Options (currently unused except for standard options).

OUT ao block_objects:

Since 2.7.2


The ResolveDevice() method

ResolveDevice (IN  a{sv} devspec,
               IN  a{sv} options,
               OUT ao    devices);

Get device(s) matching specification given in devspec.

Currently supported keys for devspec include:

path (type 's')

Device path (e.g. /dev/sda). This also includes symlinks in /dev (both "Device" and "Symlinks" are used).

label (type 's')

Filesystem label. "IdLabel" is used.

uuid (type 's')

Filesystem UUID. "IdUUID" is used.

It is possbile to specify multiple keys. In this case, only devices matching all values will be returned.

IN a{sv} devspec:

Dictionary with specification of a device.

IN a{sv} options:

Options (currently unused except for standard options).

OUT ao devices:

List of object paths of all devices matching devspec.

Since 2.7.3

Property Details

The "Version" property

Version  readable   s

The version of the daemon currently running


The "SupportedFilesystems" property

SupportedFilesystems  readable   as

List of supported filesystem by UDisks2


The "SupportedEncryptionTypes" property

SupportedEncryptionTypes  readable   as

List of supported encryption types by UDisks2


The "DefaultEncryptionType" property

DefaultEncryptionType  readable   s