Client
Object Hierarchy:
Description:
[ CCode ( type_id = "udisks_client_get_type ()" ) ]
public sealed class Client : Object, AsyncInitable, Initable
public sealed class Client : Object, AsyncInitable, Initable
Client is used for accessing the UDisks service from a client program.
Namespace: UDisks
Package: udisks2
Content:
Properties:
- public Manager manager { get; }
The Manager interface on the well-known /org/freedesktop/UDisks2/Manager object
- public DBusObjectManager object_manager { get; }
The DBusObjectManager used by the Client instance.
Creation methods:
- public async Client (Cancellable? cancellable) throws Error
Asynchronously gets a Client.
- public Client.sync (Cancellable? cancellable = null) throws Error
Synchronously gets a Client for the local system.
Methods:
- public List<Block> get_all_blocks_for_mdraid (MDRaid raid)
Gets all RAID devices (e.g.
/dev/md0
and/dev/md1
) forraid
. - public Block get_block_for_dev (uint64 block_device_number)
Gets the Block corresponding to
block_device_number
, if any. - public Block get_block_for_drive (Drive drive, bool get_physical)
Gets a block device corresponding to
drive
. - public List<Block> get_block_for_label (string label)
Gets all the Block instances with the given label, if any.
- public Block get_block_for_mdraid (MDRaid raid)
Gets the RAID device (e.g.
/dev/md0
) forraid
. - public List<Block> get_block_for_uuid (string uuid)
Gets all the Block instances with the given uuid, if any.
- public Block get_cleartext_block (Block block)
If
block
is an unlocked encrypted device, gets the cleartext device. - public Drive get_drive_for_block (Block block)
Gets the Drive that
block
belongs to, if any. - public void get_drive_info (Drive drive, out string out_name, out string out_description, out Icon out_drive_icon, out string out_media_description, out Icon out_media_icon)
Gets information about a Drive object that is suitable to present in an user interface.
- public List<Drive> get_drive_siblings (Drive drive)
Gets all siblings for
drive
. - public string get_id_for_display (string usage, string type, string version, bool long_string)
Gets a human readable localized string for
usage
,type
andversion
. - public string get_job_description (Job job)
Gets a human-readable and localized text string describing the operation of
job
. - public List<Job> get_jobs_for_object (Object object)
Gets all the Job instances that reference
object
, if any. - public Loop get_loop_for_block (Block block)
Gets the corresponding loop interface for
block
. - public unowned Manager get_manager ()
Gets the Manager interface on the well-known /org/freedesktop/UDisks2/Manager object.
- public MDRaid get_mdraid_for_block (Block block)
Gets the MDRaid that
block
is the block device for, if any. - public string get_media_compat_for_display (string media_compat)
Gets a human-readable string of the media described by
media_compat
. - public List<Block> get_members_for_mdraid (MDRaid raid)
Gets the physical block devices that are part of
raid
. - public Object get_object (string object_path)
Convenience function for looking up an Object for
object_path
. - public ObjectInfo get_object_info (Object object)
Gets information about a Object instance that is suitable to present in an user interface.
- public unowned DBusObjectManager get_object_manager ()
Gets the DBusObjectManager used by this.
- public string get_partition_info (Partition partition)
Gets information about
partition
that is suitable to present in an user interface in a single line of text. - public PartitionTable get_partition_table (Partition partition)
Gets the PartitionTable corresponding to
partition
. - public unowned string get_partition_table_subtype_for_display (string partition_table_type, string partition_table_subtype)
Gets a human readable localized string for
partition_table_type
andpartition_table_subtype
. - public (unowned string)[] get_partition_table_subtypes (string partition_table_type)
Gets all known subtypes for
partition_table_type
. - public unowned string get_partition_table_type_for_display (string partition_table_type)
Gets a human readable localized string for
partition_table_type
. - public unowned string get_partition_type_and_subtype_for_display (string partition_table_type, string partition_table_subtype, string partition_type)
Like get_partition_type_for_display but also takes the partition table subtype into account, if available.
- public unowned string get_partition_type_for_display (string partition_table_type, string partition_type)
Gets a human readable localized string for
partiton_table_type
andpartition_type
. - public List<PartitionTypeInfo> get_partition_type_infos (string partition_table_type, string? partition_table_subtype)
Gets information about all known partition types for
partition_table_type
andpartition_table_subtype
. - public List<Partition> get_partitions (PartitionTable table)
Gets all partitions of
table
. - public string get_size_for_display (uint64 size, bool use_pow2, bool long_string)
Utility function to get a human-readable string that represents
size
. - public unowned Object peek_object (string object_path)
Like get_object but doesn't increase the reference count on the returned Object .
- public void queue_changed ()
Queues up a changed signal and rate-limit it.
- public void settle ()
Blocks until all pending D-Bus messages have been delivered.
Signals:
- public signal void changed ()
This signal is emitted either when an object or interface is added or removed a when property has changed.
Inherited Members:
All known members inherited from class GLib.Object
All known members inherited from interface GLib.AsyncInitable
All known members inherited from interface GLib.Initable