1use zbus::dbus_proxy;
2
3#[dbus_proxy(interface = "org.freedesktop.UDisks2.Encrypted")]
4trait Encrypted {
5    fn change_passphrase(
7        &self,
8        passphrase: &str,
9        new_passphrase: &str,
10        options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
11    ) -> zbus::Result<()>;
12
13    fn lock(
15        &self,
16        options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
17    ) -> zbus::Result<()>;
18
19    fn resize(
21        &self,
22        size: u64,
23        options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
24    ) -> zbus::Result<()>;
25
26    fn unlock(
28        &self,
29        passphrase: &str,
30        options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
31    ) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
32
33    #[dbus_proxy(property)]
35    fn child_configuration(
36        &self,
37    ) -> zbus::Result<
38        Vec<(
39            String,
40            std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
41        )>,
42    >;
43
44    #[dbus_proxy(property)]
46    fn cleartext_device(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
47
48    #[dbus_proxy(property)]
50    fn hint_encryption_type(&self) -> zbus::Result<String>;
51
52    #[dbus_proxy(property)]
54    fn metadata_size(&self) -> zbus::Result<u64>;
55}