use zbus::{Result, proxy};
use zvariant::OwnedObjectPath;
#[proxy(
interface = "org.freedesktop.NetworkManager.Device",
default_service = "org.freedesktop.NetworkManager"
)]
pub trait NMDevice {
#[zbus(property)]
fn interface(&self) -> Result<String>;
#[zbus(property)]
fn device_type(&self) -> Result<u32>;
#[zbus(property)]
fn state(&self) -> Result<u32>;
#[zbus(property)]
fn managed(&self) -> Result<bool>;
#[zbus(property)]
fn driver(&self) -> Result<String>;
#[zbus(property)]
fn state_reason(&self) -> Result<(u32, u32)>;
#[zbus(property)]
fn hw_address(&self) -> Result<String>;
#[zbus(property, name = "PermHwAddress")]
fn perm_hw_address(&self) -> Result<String>;
#[zbus(property)]
fn active_connection(&self) -> Result<OwnedObjectPath>;
#[zbus(signal, name = "StateChanged")]
fn device_state_changed(&self, new_state: u32, old_state: u32, reason: u32);
}