use zbus::proxy;
use crate::error;
#[proxy(
interface = "org.freedesktop.UDisks2.PartitionTable",
default_service = "org.freedesktop.UDisks2",
default_path = "/org/freedesktop/UDisks2/PartitionTable"
)]
pub trait PartitionTable {
fn create_partition(
&self,
offset: u64,
size: u64,
type_: &str,
name: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<zbus::zvariant::OwnedObjectPath>;
#[allow(clippy::too_many_arguments)]
fn create_partition_and_format(
&self,
offset: u64,
size: u64,
type_: &str,
name: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
format_type: &str,
format_options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<zbus::zvariant::OwnedObjectPath>;
#[zbus(property)]
fn partitions(&self) -> error::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
#[zbus(property)]
fn type_(&self) -> error::Result<String>;
}