use std::collections::HashMap;
use zbus::proxy;
use zvariant::OwnedObjectPath;
#[proxy(
interface = "org.freedesktop.NetworkManager",
default_service = "org.freedesktop.NetworkManager",
default_path = "/org/freedesktop/NetworkManager"
)]
pub trait NM {
fn get_devices(&self) -> zbus::Result<Vec<OwnedObjectPath>>;
#[zbus(property)]
fn wireless_enabled(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn set_wireless_enabled(&self, value: bool) -> zbus::Result<()>;
#[zbus(property)]
fn wireless_hardware_enabled(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn active_connections(&self) -> zbus::Result<Vec<OwnedObjectPath>>;
fn add_and_activate_connection(
&self,
connection: HashMap<&str, HashMap<&str, zvariant::Value<'_>>>,
device: OwnedObjectPath,
specific_object: OwnedObjectPath,
) -> zbus::Result<(OwnedObjectPath, OwnedObjectPath)>;
fn activate_connection(
&self,
connection: OwnedObjectPath,
device: OwnedObjectPath,
specific_object: OwnedObjectPath,
) -> zbus::Result<OwnedObjectPath>;
fn deactivate_connection(&self, active_connection: OwnedObjectPath) -> zbus::Result<()>;
#[zbus(signal, name = "DeviceAdded")]
fn device_added(&self, device: OwnedObjectPath);
#[zbus(signal, name = "DeviceRemoved")]
fn device_removed(&self, device: OwnedObjectPath);
#[zbus(signal, name = "StateChanged")]
fn state_changed(&self, state: u32);
}