use std::collections::HashMap;
use zbus::proxy;
use zbus::zvariant::{ObjectPath, OwnedObjectPath, OwnedValue, Value};
#[proxy(
interface = "org.freedesktop.NetworkManager",
default_service = "org.freedesktop.NetworkManager",
default_path = "/org/freedesktop/NetworkManager"
)]
pub trait NetworkManager {
fn activate_connection(
&self,
connection: &ObjectPath<'_>,
device: &ObjectPath<'_>,
specific_object: &ObjectPath<'_>,
) -> zbus::Result<OwnedObjectPath>;
fn add_and_activate_connection(
&self,
connection: HashMap<&str, HashMap<&str, &Value<'_>>>,
device: &ObjectPath<'_>,
specific_object: &ObjectPath<'_>,
) -> zbus::Result<(OwnedObjectPath, OwnedObjectPath)>;
#[allow(clippy::too_many_arguments)]
fn add_and_activate_connection2(
&self,
connection: HashMap<&str, HashMap<&str, &Value<'_>>>,
device: &ObjectPath<'_>,
specific_object: &ObjectPath<'_>,
options: HashMap<&str, &Value<'_>>,
) -> zbus::Result<(
OwnedObjectPath,
OwnedObjectPath,
HashMap<String, OwnedValue>,
)>;
fn check_connectivity(&self) -> zbus::Result<u32>;
fn checkpoint_adjust_rollback_timeout(
&self,
checkpoint: &ObjectPath<'_>,
add_timeout: u32,
) -> zbus::Result<()>;
fn checkpoint_create(
&self,
devices: &[&ObjectPath<'_>],
rollback_timeout: u32,
flags: u32,
) -> zbus::Result<OwnedObjectPath>;
fn checkpoint_destroy(&self, checkpoint: &ObjectPath<'_>) -> zbus::Result<()>;
fn checkpoint_rollback(
&self,
checkpoint: &ObjectPath<'_>,
) -> zbus::Result<HashMap<String, u32>>;
fn deactivate_connection(&self, active_connection: &ObjectPath<'_>) -> zbus::Result<()>;
fn enable(&self, enable: bool) -> zbus::Result<()>;
fn get_all_devices(&self) -> zbus::Result<Vec<OwnedObjectPath>>;
fn get_device_by_ip_iface(&self, iface: &str) -> zbus::Result<OwnedObjectPath>;
fn get_devices(&self) -> zbus::Result<Vec<OwnedObjectPath>>;
fn get_logging(&self) -> zbus::Result<(String, String)>;
fn get_permissions(&self) -> zbus::Result<HashMap<String, String>>;
fn reload(&self, flags: u32) -> zbus::Result<()>;
fn set_logging(&self, level: &str, domains: &str) -> zbus::Result<()>;
fn sleep(&self, sleep: bool) -> zbus::Result<()>;
#[zbus(name = "state")]
fn nm_state(&self) -> zbus::Result<u32>;
#[zbus(signal)]
fn check_permissions(&self) -> zbus::Result<()>;
#[zbus(signal)]
fn device_added(&self, device_path: ObjectPath<'_>) -> zbus::Result<()>;
#[zbus(signal)]
fn device_removed(&self, device_path: ObjectPath<'_>) -> zbus::Result<()>;
#[zbus(signal, name = "StateChanged")]
fn nm_state_changed(&self, state: u32) -> zbus::Result<()>;
#[zbus(property)]
fn activating_connection(&self) -> zbus::Result<OwnedObjectPath>;
#[zbus(property)]
fn active_connections(&self) -> zbus::Result<Vec<OwnedObjectPath>>;
#[zbus(property)]
fn all_devices(&self) -> zbus::Result<Vec<OwnedObjectPath>>;
#[zbus(property)]
fn capabilities(&self) -> zbus::Result<Vec<u32>>;
#[zbus(property)]
fn checkpoints(&self) -> zbus::Result<Vec<OwnedObjectPath>>;
#[zbus(property)]
fn connectivity(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn connectivity_check_available(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn connectivity_check_enabled(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn set_connectivity_check_enabled(&self, value: bool) -> zbus::Result<()>;
#[zbus(property)]
fn connectivity_check_uri(&self) -> zbus::Result<String>;
#[zbus(property)]
fn devices(&self) -> zbus::Result<Vec<OwnedObjectPath>>;
#[zbus(property)]
fn global_dns_configuration(&self) -> zbus::Result<HashMap<String, OwnedValue>>;
#[zbus(property)]
fn set_global_dns_configuration(
&self,
value: Value<'_>,
) -> zbus::Result<()>;
#[zbus(property)]
fn metered(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn networking_enabled(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn primary_connection(&self) -> zbus::Result<OwnedObjectPath>;
#[zbus(property)]
fn primary_connection_type(&self) -> zbus::Result<String>;
#[zbus(property)]
fn radio_flags(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn startup(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn state(&self) -> zbus::Result<u32>;
#[zbus(property)]
fn version(&self) -> zbus::Result<String>;
#[zbus(property)]
fn version_info(&self) -> zbus::Result<Vec<u32>>;
#[zbus(property)]
fn wimax_enabled(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn set_wimax_enabled(&self, value: bool) -> zbus::Result<()>;
#[zbus(property)]
fn wimax_hardware_enabled(&self) -> zbus::Result<bool>;
#[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 wwan_enabled(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn set_wwan_enabled(&self, value: bool) -> zbus::Result<()>;
#[zbus(property)]
fn wwan_hardware_enabled(&self) -> zbus::Result<bool>;
}