#![allow(clippy::all)]
use zbus::dbus_proxy;
#[dbus_proxy(
default_path = "/org/freedesktop/UDisks2/Manager",
default_service = "org.freedesktop.UDisks2",
interface = "org.freedesktop.UDisks2.Manager",
assume_defaults = true
)]
trait Manager {
fn can_check(&self, type_: &str) -> zbus::Result<(bool, String)>;
fn can_format(&self, type_: &str) -> zbus::Result<(bool, String)>;
fn can_repair(&self, type_: &str) -> zbus::Result<(bool, String)>;
fn can_resize(&self, type_: &str) -> zbus::Result<(bool, u64, String)>;
fn enable_module(&self, name: &str, enable: bool) -> zbus::Result<()>;
fn enable_modules(&self, enable: bool) -> zbus::Result<()>;
fn get_block_devices(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
fn loop_setup(
&self,
fd: zbus::zvariant::Fd,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
#[dbus_proxy(name = "MDRaidCreate")]
fn mdraid_create(
&self,
blocks: &[zbus::zvariant::ObjectPath<'_>],
level: &str,
name: &str,
chunk: u64,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
fn resolve_device(
&self,
devspec: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
#[dbus_proxy(property)]
fn default_encryption_type(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn supported_encryption_types(&self) -> zbus::Result<Vec<String>>;
#[dbus_proxy(property)]
fn supported_filesystems(&self) -> zbus::Result<Vec<String>>;
#[dbus_proxy(property)]
fn version(&self) -> zbus::Result<String>;
}
#[dbus_proxy(
interface = "org.freedesktop.UDisks2.Manager.NVMe",
assume_defaults = true
)]
trait NVMe {
fn connect(
&self,
subsysnqn: &str,
transport: &str,
transport_addr: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
#[dbus_proxy(name = "SetHostID")]
fn set_host_id(
&self,
hostid: &[u8],
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(name = "SetHostNQN")]
fn set_host_nqn(
&self,
hostnqn: &[u8],
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(property, name = "HostID")]
fn host_id(&self) -> zbus::Result<Vec<u8>>;
#[dbus_proxy(property, name = "HostNQN")]
fn host_nqn(&self) -> zbus::Result<Vec<u8>>;
}
#[dbus_proxy(interface = "org.freedesktop.UDisks2.Drive", assume_defaults = true)]
trait Drive {
fn eject(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn power_off(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn set_configuration(
&self,
value: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(property)]
fn can_power_off(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn configuration(
&self,
) -> zbus::Result<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>;
#[dbus_proxy(property)]
fn connection_bus(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn ejectable(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn id(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn media(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn media_available(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn media_change_detected(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn media_compatibility(&self) -> zbus::Result<Vec<String>>;
#[dbus_proxy(property)]
fn media_removable(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn model(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn optical(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn optical_blank(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn optical_num_audio_tracks(&self) -> zbus::Result<u32>;
#[dbus_proxy(property)]
fn optical_num_data_tracks(&self) -> zbus::Result<u32>;
#[dbus_proxy(property)]
fn optical_num_sessions(&self) -> zbus::Result<u32>;
#[dbus_proxy(property)]
fn optical_num_tracks(&self) -> zbus::Result<u32>;
#[dbus_proxy(property)]
fn removable(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn revision(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn rotation_rate(&self) -> zbus::Result<i32>;
#[dbus_proxy(property)]
fn seat(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn serial(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn sibling_id(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn size(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn sort_key(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn time_detected(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn time_media_detected(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn vendor(&self) -> zbus::Result<String>;
#[dbus_proxy(property, name = "WWN")]
fn wwn(&self) -> zbus::Result<String>;
}
#[dbus_proxy(
interface = "org.freedesktop.UDisks2.Drive.Ata",
assume_defaults = true
)]
trait Ata {
fn pm_get_state(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<u8>;
fn pm_standby(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn pm_wakeup(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn security_erase_unit(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn smart_get_attributes(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<
Vec<(
u8,
String,
u16,
i32,
i32,
i32,
i64,
i32,
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
)>,
>;
fn smart_selftest_abort(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn smart_selftest_start(
&self,
type_: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn smart_set_enabled(
&self,
value: bool,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn smart_update(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(property)]
fn aam_enabled(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn aam_supported(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn aam_vendor_recommended_value(&self) -> zbus::Result<i32>;
#[dbus_proxy(property)]
fn apm_enabled(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn apm_supported(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn pm_enabled(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn pm_supported(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn read_lookahead_enabled(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn read_lookahead_supported(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn security_enhanced_erase_unit_minutes(&self) -> zbus::Result<i32>;
#[dbus_proxy(property)]
fn security_erase_unit_minutes(&self) -> zbus::Result<i32>;
#[dbus_proxy(property)]
fn security_frozen(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn smart_enabled(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn smart_failing(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn smart_num_attributes_failed_in_the_past(&self) -> zbus::Result<i32>;
#[dbus_proxy(property)]
fn smart_num_attributes_failing(&self) -> zbus::Result<i32>;
#[dbus_proxy(property)]
fn smart_num_bad_sectors(&self) -> zbus::Result<i64>;
#[dbus_proxy(property)]
fn smart_power_on_seconds(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn smart_selftest_percent_remaining(&self) -> zbus::Result<i32>;
#[dbus_proxy(property)]
fn smart_selftest_status(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn smart_supported(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn smart_temperature(&self) -> zbus::Result<f64>;
#[dbus_proxy(property)]
fn smart_updated(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn write_cache_enabled(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn write_cache_supported(&self) -> zbus::Result<bool>;
}
#[dbus_proxy(
interface = "org.freedesktop.UDisks2.NVMe.Controller",
assume_defaults = true
)]
trait Controller {
fn sanitize_start(
&self,
action: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn smart_get_attributes(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>;
fn smart_selftest_abort(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn smart_selftest_start(
&self,
type_: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn smart_update(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(property, name = "ControllerID")]
fn controller_id(&self) -> zbus::Result<u16>;
#[dbus_proxy(property, name = "FGUID")]
fn fguid(&self) -> zbus::Result<String>;
#[dbus_proxy(property, name = "NVMeRevision")]
fn nvme_revision(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn sanitize_percent_remaining(&self) -> zbus::Result<i32>;
#[dbus_proxy(property)]
fn sanitize_status(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn smart_critical_warning(&self) -> zbus::Result<Vec<String>>;
#[dbus_proxy(property)]
fn smart_power_on_hours(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn smart_selftest_percent_remaining(&self) -> zbus::Result<i32>;
#[dbus_proxy(property)]
fn smart_selftest_status(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn smart_temperature(&self) -> zbus::Result<u16>;
#[dbus_proxy(property)]
fn smart_updated(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn state(&self) -> zbus::Result<String>;
#[dbus_proxy(property, name = "SubsystemNQN")]
fn subsystem_nqn(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn unallocated_capacity(&self) -> zbus::Result<u64>;
}
#[dbus_proxy(
interface = "org.freedesktop.UDisks2.NVMe.Namespace",
assume_defaults = true
)]
trait Namespace {
fn format_namespace(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(property, name = "EUI64")]
fn eui64(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn format_percent_remaining(&self) -> zbus::Result<i32>;
#[dbus_proxy(property, name = "FormattedLBASize")]
fn formatted_lbasize(&self) -> zbus::Result<(u16, u16, u8)>;
#[dbus_proxy(property, name = "LBAFormats")]
fn lbaformats(&self) -> zbus::Result<Vec<(u16, u16, u8)>>;
#[dbus_proxy(property, name = "NGUID")]
fn nguid(&self) -> zbus::Result<String>;
#[dbus_proxy(property, name = "NSID")]
fn nsid(&self) -> zbus::Result<u32>;
#[dbus_proxy(property)]
fn namespace_capacity(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn namespace_size(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn namespace_utilization(&self) -> zbus::Result<u64>;
#[dbus_proxy(property, name = "UUID")]
fn uuid(&self) -> zbus::Result<String>;
#[dbus_proxy(property, name = "WWN")]
fn wwn(&self) -> zbus::Result<String>;
}
#[dbus_proxy(
interface = "org.freedesktop.UDisks2.NVMe.Fabrics",
assume_defaults = true
)]
trait Fabrics {
fn disconnect(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(property, name = "HostID")]
fn host_id(&self) -> zbus::Result<Vec<u8>>;
#[dbus_proxy(property, name = "HostNQN")]
fn host_nqn(&self) -> zbus::Result<Vec<u8>>;
#[dbus_proxy(property)]
fn transport(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn transport_address(&self) -> zbus::Result<Vec<u8>>;
}
#[dbus_proxy(
interface = "org.freedesktop.UDisks2.Block",
default_service = "org.freedesktop.UDisks2",
assume_defaults = true
)]
trait Block {
fn add_configuration_item(
&self,
item: &(
&str,
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
),
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn format(
&self,
type_: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn get_secret_configuration(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<
Vec<(
String,
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
)>,
>;
fn open_device(
&self,
mode: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<zbus::zvariant::OwnedFd>;
fn open_for_backup(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<zbus::zvariant::OwnedFd>;
fn open_for_benchmark(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<zbus::zvariant::OwnedFd>;
fn open_for_restore(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<zbus::zvariant::OwnedFd>;
fn remove_configuration_item(
&self,
item: &(
&str,
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
),
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn rescan(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn update_configuration_item(
&self,
old_item: &(
&str,
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
),
new_item: &(
&str,
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
),
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(property)]
fn configuration(
&self,
) -> zbus::Result<
Vec<(
String,
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
)>,
>;
#[dbus_proxy(property)]
fn crypto_backing_device(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
#[dbus_proxy(property)]
fn device(&self) -> zbus::Result<Vec<u8>>;
#[dbus_proxy(property)]
fn device_number(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn drive(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
#[dbus_proxy(property)]
fn hint_auto(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn hint_icon_name(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn hint_ignore(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn hint_name(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn hint_partitionable(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn hint_symbolic_icon_name(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn hint_system(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn id(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn id_label(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn id_type(&self) -> zbus::Result<String>;
#[dbus_proxy(property, name = "IdUUID")]
fn id_uuid(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn id_usage(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn id_version(&self) -> zbus::Result<String>;
#[dbus_proxy(property, name = "MDRaid")]
fn mdraid(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
#[dbus_proxy(property, name = "MDRaidMember")]
fn mdraid_member(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
#[dbus_proxy(property)]
fn preferred_device(&self) -> zbus::Result<Vec<u8>>;
#[dbus_proxy(property)]
fn read_only(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn size(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn symlinks(&self) -> zbus::Result<Vec<Vec<u8>>>;
#[dbus_proxy(property)]
fn userspace_mount_options(&self) -> zbus::Result<Vec<String>>;
}
#[dbus_proxy(
interface = "org.freedesktop.UDisks2.PartitionTable",
assume_defaults = true
)]
trait PartitionTable {
fn create_partition(
&self,
offset: u64,
size: u64,
type_: &str,
name: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
fn create_partition_and_format(
&self,
offset: u64,
size: u64,
type_: &str,
name: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
format_type: &str,
format_options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
#[dbus_proxy(property)]
fn partitions(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
#[dbus_proxy(property)]
fn type_(&self) -> zbus::Result<String>;
}
#[dbus_proxy(
interface = "org.freedesktop.UDisks2.Partition",
default_service = "org.freedesktop.UDisks2",
assume_defaults = true
)]
trait Partition {
fn delete(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn resize(
&self,
size: u64,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn set_flags(
&self,
flags: u64,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn set_name(
&self,
name: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn set_type(
&self,
type_: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(property)]
fn flags(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn is_contained(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn is_container(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn name(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn number(&self) -> zbus::Result<u32>;
#[dbus_proxy(property)]
fn offset(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn size(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn table(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
#[dbus_proxy(property)]
fn type_(&self) -> zbus::Result<String>;
#[dbus_proxy(property, name = "UUID")]
fn uuid(&self) -> zbus::Result<String>;
}
#[dbus_proxy(
interface = "org.freedesktop.UDisks2.Filesystem",
default_service = "org.freedesktop.UDisks2",
assume_defaults = true
)]
trait Filesystem {
fn check(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<bool>;
fn mount(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<String>;
fn repair(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<bool>;
fn resize(
&self,
size: u64,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn set_label(
&self,
label: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn take_ownership(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn unmount(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(property)]
fn mount_points(&self) -> zbus::Result<Vec<Vec<u8>>>;
#[dbus_proxy(property)]
fn size(&self) -> zbus::Result<u64>;
}
#[dbus_proxy(
interface = "org.freedesktop.UDisks2.Swapspace",
assume_defaults = true
)]
trait Swapspace {
fn set_label(
&self,
label: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn start(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn stop(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(property)]
fn active(&self) -> zbus::Result<bool>;
}
#[dbus_proxy(
interface = "org.freedesktop.UDisks2.Encrypted",
assume_defaults = true
)]
trait Encrypted {
fn change_passphrase(
&self,
passphrase: &str,
new_passphrase: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn lock(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn resize(
&self,
size: u64,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn unlock(
&self,
passphrase: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
#[dbus_proxy(property)]
fn child_configuration(
&self,
) -> zbus::Result<
Vec<(
String,
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
)>,
>;
#[dbus_proxy(property)]
fn cleartext_device(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
#[dbus_proxy(property)]
fn hint_encryption_type(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn metadata_size(&self) -> zbus::Result<u64>;
}
#[dbus_proxy(interface = "org.freedesktop.UDisks2.Loop", assume_defaults = true)]
trait Loop {
fn delete(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn set_autoclear(
&self,
value: bool,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(property)]
fn autoclear(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn backing_file(&self) -> zbus::Result<Vec<u8>>;
#[dbus_proxy(property, name = "SetupByUID")]
fn setup_by_uid(&self) -> zbus::Result<u32>;
}
#[dbus_proxy(interface = "org.freedesktop.UDisks2.MDRaid", assume_defaults = true)]
trait MDRaid {
fn add_device(
&self,
device: &zbus::zvariant::ObjectPath<'_>,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn delete(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn remove_device(
&self,
device: &zbus::zvariant::ObjectPath<'_>,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn request_sync_action(
&self,
sync_action: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn set_bitmap_location(
&self,
value: &[u8],
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn start(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
fn stop(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(property)]
fn active_devices(
&self,
) -> zbus::Result<
Vec<(
zbus::zvariant::OwnedObjectPath,
i32,
Vec<String>,
u64,
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
)>,
>;
#[dbus_proxy(property)]
fn bitmap_location(&self) -> zbus::Result<Vec<u8>>;
#[dbus_proxy(property)]
fn child_configuration(
&self,
) -> zbus::Result<
Vec<(
String,
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
)>,
>;
#[dbus_proxy(property)]
fn chunk_size(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn degraded(&self) -> zbus::Result<u32>;
#[dbus_proxy(property)]
fn level(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn name(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn num_devices(&self) -> zbus::Result<u32>;
#[dbus_proxy(property)]
fn running(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn size(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn sync_action(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn sync_completed(&self) -> zbus::Result<f64>;
#[dbus_proxy(property)]
fn sync_rate(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn sync_remaining_time(&self) -> zbus::Result<u64>;
#[dbus_proxy(property, name = "UUID")]
fn uuid(&self) -> zbus::Result<String>;
}
#[dbus_proxy(interface = "org.freedesktop.UDisks2.Job", assume_defaults = true)]
trait Job {
fn cancel(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> zbus::Result<()>;
#[dbus_proxy(signal)]
fn completed(&self, success: bool, message: &str) -> zbus::Result<()>;
#[dbus_proxy(property)]
fn bytes(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn cancelable(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn expected_end_time(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn objects(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
#[dbus_proxy(property)]
fn operation(&self) -> zbus::Result<String>;
#[dbus_proxy(property)]
fn progress(&self) -> zbus::Result<f64>;
#[dbus_proxy(property)]
fn progress_valid(&self) -> zbus::Result<bool>;
#[dbus_proxy(property)]
fn rate(&self) -> zbus::Result<u64>;
#[dbus_proxy(property)]
fn start_time(&self) -> zbus::Result<u64>;
#[dbus_proxy(property, name = "StartedByUID")]
fn started_by_uid(&self) -> zbus::Result<u32>;
}