use zbus::proxy;
use crate::error;
#[proxy(
interface = "org.freedesktop.UDisks2.Filesystem",
default_service = "org.freedesktop.UDisks2",
default_path = "/org/freedesktop/UDisks2/Filesystem"
)]
pub trait Filesystem {
fn check(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<bool>;
fn mount(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<String>;
fn repair(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<bool>;
fn resize(
&self,
size: u64,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
fn set_label(
&self,
label: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
#[zbus(name = "SetUUID")]
fn set_uuid(
&self,
uuid: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
fn take_ownership(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
fn unmount(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
#[zbus(property)]
fn mount_points(&self) -> error::Result<Vec<Vec<u8>>>;
#[zbus(property)]
fn size(&self) -> error::Result<u64>;
}