udisks2/
encrypted.rs

1//! # DBus interface proxy for: `org.freedesktop.UDisks2.Encrypted`
2//!
3//! This code was generated by `zbus-xmlgen` `4.0.0` from DBus introspection data.
4//! Source: `org.freedesktop.UDisks2.xml`.
5//!
6//! You may prefer to adapt it, instead of using it verbatim.
7//!
8//! More information can be found in the
9//! [Writing a client proxy](https://dbus2.github.io/zbus/client.html)
10//! section of the zbus documentation.
11//!
12
13use zbus::proxy;
14
15use crate::error;
16
17#[proxy(
18    interface = "org.freedesktop.UDisks2.Encrypted",
19    default_service = "org.freedesktop.UDisks2",
20    default_path = "/org/freedesktop/UDisks2/Encrypted"
21)]
22pub trait Encrypted {
23    /// ChangePassphrase method
24    fn change_passphrase(
25        &self,
26        passphrase: &str,
27        new_passphrase: &str,
28        options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
29    ) -> error::Result<()>;
30
31    /// Lock method
32    fn lock(
33        &self,
34        options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
35    ) -> error::Result<()>;
36
37    /// Resize method
38    fn resize(
39        &self,
40        size: u64,
41        options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
42    ) -> error::Result<()>;
43
44    /// Unlock method
45    fn unlock(
46        &self,
47        passphrase: &str,
48        options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
49    ) -> error::Result<zbus::zvariant::OwnedObjectPath>;
50
51    /// ChildConfiguration property
52    #[zbus(property)]
53    fn child_configuration(
54        &self,
55    ) -> error::Result<
56        Vec<(
57            String,
58            std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
59        )>,
60    >;
61
62    /// CleartextDevice property
63    #[zbus(property)]
64    fn cleartext_device(&self) -> error::Result<zbus::zvariant::OwnedObjectPath>;
65
66    /// HintEncryptionType property
67    #[zbus(property)]
68    fn hint_encryption_type(&self) -> error::Result<String>;
69
70    /// MetadataSize property
71    #[zbus(property)]
72    fn metadata_size(&self) -> error::Result<u64>;
73}