diff --git a/networkmanager/src/interface/access_point.rs b/networkmanager/src/interface/access_point.rs new file mode 100644 index 0000000..f54f929 --- /dev/null +++ b/networkmanager/src/interface/access_point.rs @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: MPL-2.0 +//! # DBus interface proxy for: `org.freedesktop.NetworkManager.AccessPoint` +//! +//! This code was generated by `zbus-xmlgen` `2.0.0` from DBus introspection data. +//! Source: `Interface '/org/freedesktop/NetworkManager/AccessPoint/383' from service 'org.freedesktop.NetworkManager' on system bus`. +//! +//! You may prefer to adapt it, instead of using it verbatim. +//! +//! More information can be found in the +//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html) +//! section of the zbus documentation. +//! +//! This DBus object implements +//! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html), +//! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used: +//! +//! * [`zbus::fdo::PropertiesProxy`] +//! * [`zbus::fdo::IntrospectableProxy`] +//! * [`zbus::fdo::PeerProxy`] +//! +//! …consequently `zbus-xmlgen` did not generate code for the above interfaces. + +use zbus::dbus_proxy; + +#[dbus_proxy(interface = "org.freedesktop.NetworkManager.AccessPoint")] +trait AccessPoint { + /// Flags property + #[dbus_proxy(property)] + fn flags(&self) -> zbus::Result; + + /// Frequency property + #[dbus_proxy(property)] + fn frequency(&self) -> zbus::Result; + + /// HwAddress property + #[dbus_proxy(property)] + fn hw_address(&self) -> zbus::Result; + + /// LastSeen property + #[dbus_proxy(property)] + fn last_seen(&self) -> zbus::Result; + + /// MaxBitrate property + #[dbus_proxy(property)] + fn max_bitrate(&self) -> zbus::Result; + + /// Mode property + #[dbus_proxy(property)] + fn mode(&self) -> zbus::Result; + + /// RsnFlags property + #[dbus_proxy(property)] + fn rsn_flags(&self) -> zbus::Result; + + /// Ssid property + #[dbus_proxy(property)] + fn ssid(&self) -> zbus::Result>; + + /// Strength property + #[dbus_proxy(property)] + fn strength(&self) -> zbus::Result; + + /// WpaFlags property + #[dbus_proxy(property)] + fn wpa_flags(&self) -> zbus::Result; +} diff --git a/networkmanager/src/interface/config.rs b/networkmanager/src/interface/config.rs new file mode 100644 index 0000000..c2c44f5 --- /dev/null +++ b/networkmanager/src/interface/config.rs @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: MPL-2.0 +pub mod ip4; +pub mod ip6; diff --git a/networkmanager/src/interface/config/ip4.rs b/networkmanager/src/interface/config/ip4.rs new file mode 100644 index 0000000..ae98a59 --- /dev/null +++ b/networkmanager/src/interface/config/ip4.rs @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: MPL-2.0 +//! # DBus interface proxy for: `org.freedesktop.NetworkManager.IP4Config` +//! +//! This code was generated by `zbus-xmlgen` `2.0.0` from DBus introspection data. +//! Source: `Interface '/org/freedesktop/NetworkManager/IP4Config/3' from service 'org.freedesktop.NetworkManager' on system bus`. +//! +//! You may prefer to adapt it, instead of using it verbatim. +//! +//! More information can be found in the +//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html) +//! section of the zbus documentation. +//! +//! This DBus object implements +//! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html), +//! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used: +//! +//! * [`zbus::fdo::PropertiesProxy`] +//! * [`zbus::fdo::IntrospectableProxy`] +//! * [`zbus::fdo::PeerProxy`] +//! +//! …consequently `zbus-xmlgen` did not generate code for the above interfaces. + +use zbus::dbus_proxy; + +#[dbus_proxy(interface = "org.freedesktop.NetworkManager.IP4Config")] +pub trait IP4Config { + /// AddressData property + #[dbus_proxy(property)] + fn address_data( + &self, + ) -> zbus::Result>>; + + /// Addresses property + #[dbus_proxy(property)] + fn addresses(&self) -> zbus::Result>>; + + /// DnsOptions property + #[dbus_proxy(property)] + fn dns_options(&self) -> zbus::Result>; + + /// DnsPriority property + #[dbus_proxy(property)] + fn dns_priority(&self) -> zbus::Result; + + /// Domains property + #[dbus_proxy(property)] + fn domains(&self) -> zbus::Result>; + + /// Gateway property + #[dbus_proxy(property)] + fn gateway(&self) -> zbus::Result; + + /// NameserverData property + #[dbus_proxy(property)] + fn nameserver_data( + &self, + ) -> zbus::Result>>; + + /// Nameservers property + #[dbus_proxy(property)] + fn nameservers(&self) -> zbus::Result>; + + /// RouteData property + #[dbus_proxy(property)] + fn route_data( + &self, + ) -> zbus::Result>>; + + /// Routes property + #[dbus_proxy(property)] + fn routes(&self) -> zbus::Result>>; + + /// Searches property + #[dbus_proxy(property)] + fn searches(&self) -> zbus::Result>; + + /// WinsServerData property + #[dbus_proxy(property)] + fn wins_server_data(&self) -> zbus::Result>; + + /// WinsServers property + #[dbus_proxy(property)] + fn wins_servers(&self) -> zbus::Result>; +} diff --git a/networkmanager/src/interface/config/ip6.rs b/networkmanager/src/interface/config/ip6.rs new file mode 100644 index 0000000..57e2089 --- /dev/null +++ b/networkmanager/src/interface/config/ip6.rs @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: MPL-2.0 +//! # DBus interface proxy for: `org.freedesktop.NetworkManager.IP6Config` +//! +//! This code was generated by `zbus-xmlgen` `2.0.0` from DBus introspection data. +//! Source: `Interface '/org/freedesktop/NetworkManager/IP6Config/3' from service 'org.freedesktop.NetworkManager' on system bus`. +//! +//! You may prefer to adapt it, instead of using it verbatim. +//! +//! More information can be found in the +//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html) +//! section of the zbus documentation. +//! +//! This DBus object implements +//! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html), +//! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used: +//! +//! * [`zbus::fdo::PropertiesProxy`] +//! * [`zbus::fdo::IntrospectableProxy`] +//! * [`zbus::fdo::PeerProxy`] +//! +//! …consequently `zbus-xmlgen` did not generate code for the above interfaces. + +use zbus::dbus_proxy; + +#[dbus_proxy(interface = "org.freedesktop.NetworkManager.IP6Config")] +pub trait IP6Config { + /// AddressData property + #[dbus_proxy(property)] + fn address_data( + &self, + ) -> zbus::Result>>; + + /// Addresses property + #[dbus_proxy(property)] + fn addresses(&self) -> zbus::Result, u32, Vec)>>; + + /// DnsOptions property + #[dbus_proxy(property)] + fn dns_options(&self) -> zbus::Result>; + + /// DnsPriority property + #[dbus_proxy(property)] + fn dns_priority(&self) -> zbus::Result; + + /// Domains property + #[dbus_proxy(property)] + fn domains(&self) -> zbus::Result>; + + /// Gateway property + #[dbus_proxy(property)] + fn gateway(&self) -> zbus::Result; + + /// Nameservers property + #[dbus_proxy(property)] + fn nameservers(&self) -> zbus::Result>>; + + /// RouteData property + #[dbus_proxy(property)] + fn route_data( + &self, + ) -> zbus::Result>>; + + /// Routes property + #[dbus_proxy(property)] + fn routes(&self) -> zbus::Result, u32, Vec, u32)>>; + + /// Searches property + #[dbus_proxy(property)] + fn searches(&self) -> zbus::Result>; +} diff --git a/networkmanager/src/interface/device.rs b/networkmanager/src/interface/device.rs index 67b16ba..d578b31 100644 --- a/networkmanager/src/interface/device.rs +++ b/networkmanager/src/interface/device.rs @@ -20,6 +20,9 @@ //! //! …consequently `zbus-xmlgen` did not generate code for the above interfaces. +pub mod wired; +pub mod wireless; + use zbus::dbus_proxy; #[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device.Statistics")] diff --git a/networkmanager/src/interface/device/wired.rs b/networkmanager/src/interface/device/wired.rs new file mode 100644 index 0000000..a2743bf --- /dev/null +++ b/networkmanager/src/interface/device/wired.rs @@ -0,0 +1,208 @@ +// SPDX-License-Identifier: MPL-2.0 +//! # DBus interface proxies for: `org.freedesktop.NetworkManager.Device.Wired` +//! +//! This code was generated by `zbus-xmlgen` `2.0.0` from DBus introspection data. +//! Source: `Interface '/org/freedesktop/NetworkManager/Devices/2' from service 'org.freedesktop.NetworkManager' on system bus`. +//! +//! You may prefer to adapt it, instead of using it verbatim. +//! +//! More information can be found in the +//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html) +//! section of the zbus documentation. +//! +//! This DBus object implements +//! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html), +//! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used: +//! +//! * [`zbus::fdo::PropertiesProxy`] +//! * [`zbus::fdo::IntrospectableProxy`] +//! * [`zbus::fdo::PeerProxy`] +//! +//! …consequently `zbus-xmlgen` did not generate code for the above interfaces. + +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 { + /// Carrier property + #[dbus_proxy(property)] + fn carrier(&self) -> zbus::Result; + + /// HwAddress property + #[dbus_proxy(property)] + fn hw_address(&self) -> zbus::Result; + + /// PermHwAddress property + #[dbus_proxy(property)] + fn perm_hw_address(&self) -> zbus::Result; + + /// S390Subchannels property + #[dbus_proxy(property)] + fn s390subchannels(&self) -> zbus::Result>; + + /// Speed property + #[dbus_proxy(property)] + fn speed(&self) -> zbus::Result; +} diff --git a/networkmanager/src/interface/device/wireless.rs b/networkmanager/src/interface/device/wireless.rs new file mode 100644 index 0000000..7740896 --- /dev/null +++ b/networkmanager/src/interface/device/wireless.rs @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: MPL-2.0 +//! # DBus interface proxies for: `org.freedesktop.NetworkManager.Device.Wireless` +//! +//! This code was generated by `zbus-xmlgen` `2.0.0` from DBus introspection data. +//! Source: `Interface '/org/freedesktop/NetworkManager/Devices/3' from service 'org.freedesktop.NetworkManager' on system bus`. +//! +//! You may prefer to adapt it, instead of using it verbatim. +//! +//! More information can be found in the +//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html) +//! section of the zbus documentation. +//! +//! This DBus object implements +//! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html), +//! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used: +//! +//! * [`zbus::fdo::PropertiesProxy`] +//! * [`zbus::fdo::IntrospectableProxy`] +//! * [`zbus::fdo::PeerProxy`] +//! +//! …consequently `zbus-xmlgen` did not generate code for the above interfaces. + +use zbus::dbus_proxy; + +#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device.Wireless")] +pub trait Wireless { + /// GetAccessPoints method + fn get_access_points(&self) -> zbus::Result>; + + /// GetAllAccessPoints method + fn get_all_access_points(&self) -> zbus::Result>; + + /// RequestScan method + fn request_scan( + &self, + options: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>, + ) -> zbus::Result<()>; + + /// AccessPointAdded signal + #[dbus_proxy(signal)] + fn access_point_added(&self, access_point: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>; + + /// AccessPointRemoved signal + #[dbus_proxy(signal)] + fn access_point_removed( + &self, + access_point: zbus::zvariant::ObjectPath<'_>, + ) -> zbus::Result<()>; + + /// AccessPoints property + #[dbus_proxy(property)] + fn access_points(&self) -> zbus::Result>; + + /// ActiveAccessPoint property + #[dbus_proxy(property)] + fn active_access_point(&self) -> zbus::Result; + + /// Bitrate property + #[dbus_proxy(property)] + fn bitrate(&self) -> zbus::Result; + + /// HwAddress property + #[dbus_proxy(property)] + fn hw_address(&self) -> zbus::Result; + + /// LastScan property + #[dbus_proxy(property)] + fn last_scan(&self) -> zbus::Result; + + /// Mode property + #[dbus_proxy(property)] + fn mode(&self) -> zbus::Result; + + /// PermHwAddress property + #[dbus_proxy(property)] + fn perm_hw_address(&self) -> zbus::Result; + + /// WirelessCapabilities property + #[dbus_proxy(property)] + fn wireless_capabilities(&self) -> zbus::Result; +} diff --git a/networkmanager/src/interface/mod.rs b/networkmanager/src/interface/mod.rs index 19f7480..a59a16d 100644 --- a/networkmanager/src/interface/mod.rs +++ b/networkmanager/src/interface/mod.rs @@ -20,8 +20,11 @@ //! //! …consequently `zbus-xmlgen` did not generate code for the above interfaces. +pub mod access_point; +pub mod config; pub mod device; pub mod settings; +pub mod statistics; use zbus::dbus_proxy; diff --git a/networkmanager/src/interface/statistics.rs b/networkmanager/src/interface/statistics.rs new file mode 100644 index 0000000..3aab8f1 --- /dev/null +++ b/networkmanager/src/interface/statistics.rs @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: MPL-2.0 +//! # DBus interface proxies for: `org.freedesktop.NetworkManager.Device.Statistics` +//! +//! This code was generated by `zbus-xmlgen` `2.0.0` from DBus introspection data. +//! Source: `Interface '/org/freedesktop/NetworkManager/Devices/3' from service 'org.freedesktop.NetworkManager' on system bus`. +//! +//! You may prefer to adapt it, instead of using it verbatim. +//! +//! More information can be found in the +//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html) +//! section of the zbus documentation. +//! +//! This DBus object implements +//! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html), +//! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used: +//! +//! * [`zbus::fdo::PropertiesProxy`] +//! * [`zbus::fdo::IntrospectableProxy`] +//! * [`zbus::fdo::PeerProxy`] +//! +//! …consequently `zbus-xmlgen` did not generate code for the above interfaces. + +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; +}