use zbus::dbus_proxy;
use crate::ascii::AsciiString;
#[dbus_proxy(
interface = "org.freedesktop.UDisks2.Block",
default_service = "org.freedesktop.UDisks2"
)]
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<AsciiString>;
#[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)]
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)]
fn mdraid(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
#[dbus_proxy(property)]
fn mdraid_member(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
#[dbus_proxy(property)]
fn preferred_device(&self) -> zbus::Result<AsciiString>;
#[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<AsciiString>>;
#[dbus_proxy(property)]
fn userspace_mount_options(&self) -> zbus::Result<Vec<String>>;
}