use zbus::proxy;
use crate::error;
#[proxy(
interface = "org.freedesktop.UDisks2.NVMe.Controller",
default_service = "org.freedesktop.UDisks2",
default_path = "/org/freedesktop/UDisks2/NVMe"
)]
pub trait Controller {
fn sanitize_start(
&self,
action: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
fn smart_get_attributes(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>;
fn smart_selftest_abort(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
fn smart_selftest_start(
&self,
type_: &str,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
fn smart_update(
&self,
options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
) -> error::Result<()>;
#[zbus(property, name = "ControllerID")]
fn controller_id(&self) -> error::Result<u16>;
#[zbus(property, name = "FGUID")]
fn fguid(&self) -> error::Result<String>;
#[zbus(property, name = "NVMeRevision")]
fn nvme_revision(&self) -> error::Result<String>;
#[zbus(property)]
fn sanitize_percent_remaining(&self) -> error::Result<i32>;
#[zbus(property)]
fn sanitize_status(&self) -> error::Result<String>;
#[zbus(property)]
fn smart_critical_warning(&self) -> error::Result<Vec<String>>;
#[zbus(property)]
fn smart_power_on_hours(&self) -> error::Result<u64>;
#[zbus(property)]
fn smart_selftest_percent_remaining(&self) -> error::Result<i32>;
#[zbus(property)]
fn smart_selftest_status(&self) -> error::Result<String>;
#[zbus(property)]
fn smart_temperature(&self) -> error::Result<u16>;
#[zbus(property)]
fn smart_updated(&self) -> error::Result<u64>;
#[zbus(property)]
fn state(&self) -> error::Result<String>;
#[zbus(property, name = "SubsystemNQN")]
fn subsystem_nqn(&self) -> error::Result<Vec<u8>>;
#[zbus(property)]
fn unallocated_capacity(&self) -> error::Result<u64>;
}