diff --git a/networkmanager/src/interface/config/ip4.rs b/networkmanager/src/interface/config/ip4.rs index ae98a59..21e3ad6 100644 --- a/networkmanager/src/interface/config/ip4.rs +++ b/networkmanager/src/interface/config/ip4.rs @@ -23,7 +23,7 @@ use zbus::dbus_proxy; #[dbus_proxy(interface = "org.freedesktop.NetworkManager.IP4Config")] -pub trait IP4Config { +pub trait Ipv4Config { /// AddressData property #[dbus_proxy(property)] fn address_data( diff --git a/networkmanager/src/interface/config/ip6.rs b/networkmanager/src/interface/config/ip6.rs index 57e2089..d752ca5 100644 --- a/networkmanager/src/interface/config/ip6.rs +++ b/networkmanager/src/interface/config/ip6.rs @@ -23,7 +23,7 @@ use zbus::dbus_proxy; #[dbus_proxy(interface = "org.freedesktop.NetworkManager.IP6Config")] -pub trait IP6Config { +pub trait Ipv6Config { /// AddressData property #[dbus_proxy(property)] fn address_data( diff --git a/networkmanager/src/interface/device.rs b/networkmanager/src/interface/device.rs index d578b31..eb1eaec 100644 --- a/networkmanager/src/interface/device.rs +++ b/networkmanager/src/interface/device.rs @@ -25,25 +25,8 @@ pub mod wireless; use zbus::dbus_proxy; -#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device.Statistics")] -pub trait Statistics { - /// RefreshRateMs property - #[dbus_proxy(property)] - fn refresh_rate_ms(&self) -> zbus::Result; - #[dbus_proxy(property)] - fn set_refresh_rate_ms(&self, value: u32) -> zbus::Result<()>; - - /// RxBytes property - #[dbus_proxy(property)] - fn rx_bytes(&self) -> zbus::Result; - - /// TxBytes property - #[dbus_proxy(property)] - fn tx_bytes(&self) -> zbus::Result; -} - #[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device.Generic")] -pub trait Generic { +pub trait GenericDevice { /// HwAddress property #[dbus_proxy(property)] fn hw_address(&self) -> zbus::Result; diff --git a/networkmanager/src/interface/device/wired.rs b/networkmanager/src/interface/device/wired.rs index a2743bf..10cfd59 100644 --- a/networkmanager/src/interface/device/wired.rs +++ b/networkmanager/src/interface/device/wired.rs @@ -22,170 +22,8 @@ use zbus::dbus_proxy; -#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device")] -pub trait Device { - /// Delete method - fn delete(&self) -> zbus::Result<()>; - - /// Disconnect method - fn disconnect(&self) -> zbus::Result<()>; - - /// GetAppliedConnection method - fn get_applied_connection( - &self, - flags: u32, - ) -> zbus::Result<( - std::collections::HashMap< - String, - std::collections::HashMap, - >, - u64, - )>; - - /// Reapply method - fn reapply( - &self, - connection: std::collections::HashMap< - &str, - std::collections::HashMap<&str, zbus::zvariant::Value<'_>>, - >, - version_id: u64, - flags: u32, - ) -> zbus::Result<()>; - - /// ActiveConnection property - #[dbus_proxy(property)] - fn active_connection(&self) -> zbus::Result; - - /// Autoconnect property - #[dbus_proxy(property)] - fn autoconnect(&self) -> zbus::Result; - #[dbus_proxy(property)] - fn set_autoconnect(&self, value: bool) -> zbus::Result<()>; - - /// AvailableConnections property - #[dbus_proxy(property)] - fn available_connections(&self) -> zbus::Result>; - - /// Capabilities property - #[dbus_proxy(property)] - fn capabilities(&self) -> zbus::Result; - - /// DeviceType property - #[dbus_proxy(property)] - fn device_type(&self) -> zbus::Result; - - /// Dhcp4Config property - #[dbus_proxy(property)] - fn dhcp4_config(&self) -> zbus::Result; - - /// Dhcp6Config property - #[dbus_proxy(property)] - fn dhcp6_config(&self) -> zbus::Result; - - /// Driver property - #[dbus_proxy(property)] - fn driver(&self) -> zbus::Result; - - /// DriverVersion property - #[dbus_proxy(property)] - fn driver_version(&self) -> zbus::Result; - - /// FirmwareMissing property - #[dbus_proxy(property)] - fn firmware_missing(&self) -> zbus::Result; - - /// FirmwareVersion property - #[dbus_proxy(property)] - fn firmware_version(&self) -> zbus::Result; - - /// HwAddress property - #[dbus_proxy(property)] - fn hw_address(&self) -> zbus::Result; - - /// Interface property - #[dbus_proxy(property)] - fn interface(&self) -> zbus::Result; - - /// InterfaceFlags property - #[dbus_proxy(property)] - fn interface_flags(&self) -> zbus::Result; - - /// Ip4Address property - #[dbus_proxy(property)] - fn ip4_address(&self) -> zbus::Result; - - /// Ip4Config property - #[dbus_proxy(property)] - fn ip4_config(&self) -> zbus::Result; - - /// Ip4Connectivity property - #[dbus_proxy(property)] - fn ip4_connectivity(&self) -> zbus::Result; - - /// Ip6Config property - #[dbus_proxy(property)] - fn ip6_config(&self) -> zbus::Result; - - /// Ip6Connectivity property - #[dbus_proxy(property)] - fn ip6_connectivity(&self) -> zbus::Result; - - /// IpInterface property - #[dbus_proxy(property)] - fn ip_interface(&self) -> zbus::Result; - - /// LldpNeighbors property - #[dbus_proxy(property)] - fn lldp_neighbors( - &self, - ) -> zbus::Result>>; - - /// Managed property - #[dbus_proxy(property)] - fn managed(&self) -> zbus::Result; - #[dbus_proxy(property)] - fn set_managed(&self, value: bool) -> zbus::Result<()>; - - /// Metered property - #[dbus_proxy(property)] - fn metered(&self) -> zbus::Result; - - /// Mtu property - #[dbus_proxy(property)] - fn mtu(&self) -> zbus::Result; - - /// NmPluginMissing property - #[dbus_proxy(property)] - fn nm_plugin_missing(&self) -> zbus::Result; - - /// Path property - #[dbus_proxy(property)] - fn path(&self) -> zbus::Result; - - /// PhysicalPortId property - #[dbus_proxy(property)] - fn physical_port_id(&self) -> zbus::Result; - - /// Real property - #[dbus_proxy(property)] - fn real(&self) -> zbus::Result; - - /// State property - #[dbus_proxy(property)] - fn state(&self) -> zbus::Result; - - /// StateReason property - #[dbus_proxy(property)] - fn state_reason(&self) -> zbus::Result<(u32, u32)>; - - /// Udi property - #[dbus_proxy(property)] - fn udi(&self) -> zbus::Result; -} - #[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device.Wired")] -trait Wired { +trait WiredDevice { /// Carrier property #[dbus_proxy(property)] fn carrier(&self) -> zbus::Result; diff --git a/networkmanager/src/interface/device/wireless.rs b/networkmanager/src/interface/device/wireless.rs index 7740896..e419444 100644 --- a/networkmanager/src/interface/device/wireless.rs +++ b/networkmanager/src/interface/device/wireless.rs @@ -23,7 +23,7 @@ use zbus::dbus_proxy; #[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device.Wireless")] -pub trait Wireless { +pub trait WirelessDevice { /// GetAccessPoints method fn get_access_points(&self) -> zbus::Result>;