use zbus::proxy;
use crate::error;
#[proxy(
interface = "org.freedesktop.UDisks2.Encrypted",
default_service = "org.freedesktop.UDisks2",
default_path = "/org/freedesktop/UDisks2/Encrypted"
)]
pub trait Encrypted {
fn change_passphrase(
&self,
passphrase: &str,
new_passphrase: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
fn lock(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
fn resize(
&self,
size: u64,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
fn unlock(
&self,
passphrase: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<zbus::zvariant::OwnedObjectPath>;
#[zbus(property)]
fn child_configuration(
&self,
) -> error::Result<
Vec<(
String,
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
)>,
>;
#[zbus(property)]
fn cleartext_device(&self) -> error::Result<zbus::zvariant::OwnedObjectPath>;
#[zbus(property)]
fn hint_encryption_type(&self) -> error::Result<String>;
#[zbus(property)]
fn metadata_size(&self) -> error::Result<u64>;
}