feat: zbus 4.2.1 update
This commit is contained in:
parent
ce9c789fe6
commit
f05789c4ce
42 changed files with 390 additions and 389 deletions
|
|
@ -20,50 +20,50 @@
|
|||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.AccessPoint",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
trait AccessPoint {
|
||||
/// Flags property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn flags(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Frequency property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn frequency(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// HwAddress property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn hw_address(&self) -> zbus::Result<String>;
|
||||
|
||||
/// LastSeen property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn last_seen(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// MaxBitrate property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn max_bitrate(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Mode property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn mode(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// RsnFlags property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn rsn_flags(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Ssid property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn ssid(&self) -> zbus::Result<Vec<u8>>;
|
||||
|
||||
/// Strength property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn strength(&self) -> zbus::Result<u8>;
|
||||
|
||||
/// WpaFlags property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn wpa_flags(&self) -> zbus::Result<u32>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,74 +20,74 @@
|
|||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Connection.Active",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
pub trait ActiveConnection {
|
||||
/// Connection property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn connection_(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Default property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn default(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// Default6 property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn default6(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// Devices property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn devices(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// Dhcp4Config property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn dhcp4_config(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Dhcp6Config property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn dhcp6_config(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Id property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn id(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Ip4Config property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn ip4_config(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Ip6Config property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn ip6_config(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Master property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn master(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// SpecificObject property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn specific_object(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// State property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn state(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// StateFlags property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn state_flags(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Type property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn type_(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Uuid property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn uuid(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Vpn property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn vpn(&self) -> zbus::Result<bool>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,68 +20,68 @@
|
|||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.IP4Config",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
pub trait Ipv4Config {
|
||||
/// AddressData property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn address_data(
|
||||
&self,
|
||||
) -> zbus::Result<Vec<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>>;
|
||||
|
||||
/// Addresses property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn addresses(&self) -> zbus::Result<Vec<Vec<u32>>>;
|
||||
|
||||
/// DnsOptions property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn dns_options(&self) -> zbus::Result<Vec<String>>;
|
||||
|
||||
/// DnsPriority property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn dns_priority(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// Domains property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn domains(&self) -> zbus::Result<Vec<String>>;
|
||||
|
||||
/// Gateway property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn gateway(&self) -> zbus::Result<String>;
|
||||
|
||||
/// NameserverData property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn nameserver_data(
|
||||
&self,
|
||||
) -> zbus::Result<Vec<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>>;
|
||||
|
||||
/// Nameservers property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn nameservers(&self) -> zbus::Result<Vec<u32>>;
|
||||
|
||||
/// RouteData property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn route_data(
|
||||
&self,
|
||||
) -> zbus::Result<Vec<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>>;
|
||||
|
||||
/// Routes property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn routes(&self) -> zbus::Result<Vec<Vec<u32>>>;
|
||||
|
||||
/// Searches property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn searches(&self) -> zbus::Result<Vec<String>>;
|
||||
|
||||
/// WinsServerData property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn wins_server_data(&self) -> zbus::Result<Vec<String>>;
|
||||
|
||||
/// WinsServers property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn wins_servers(&self) -> zbus::Result<Vec<u32>>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,54 +20,54 @@
|
|||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.IP6Config",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
pub trait Ipv6Config {
|
||||
/// AddressData property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn address_data(
|
||||
&self,
|
||||
) -> zbus::Result<Vec<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>>;
|
||||
|
||||
/// Addresses property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn addresses(&self) -> zbus::Result<Vec<(Vec<u8>, u32, Vec<u8>)>>;
|
||||
|
||||
/// DnsOptions property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn dns_options(&self) -> zbus::Result<Vec<String>>;
|
||||
|
||||
/// DnsPriority property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn dns_priority(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// Domains property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn domains(&self) -> zbus::Result<Vec<String>>;
|
||||
|
||||
/// Gateway property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn gateway(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Nameservers property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn nameservers(&self) -> zbus::Result<Vec<Vec<u8>>>;
|
||||
|
||||
/// RouteData property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn route_data(
|
||||
&self,
|
||||
) -> zbus::Result<Vec<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>>;
|
||||
|
||||
/// Routes property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn routes(&self) -> zbus::Result<Vec<(Vec<u8>, u32, Vec<u8>, u32)>>;
|
||||
|
||||
/// Searches property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn searches(&self) -> zbus::Result<Vec<String>>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,23 +26,23 @@ pub mod wired;
|
|||
pub mod wireguard;
|
||||
pub mod wireless;
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Device.Generic",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
pub trait GenericDevice {
|
||||
/// HwAddress property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn hw_address(&self) -> zbus::Result<String>;
|
||||
|
||||
/// TypeDescription property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn type_description(&self) -> zbus::Result<String>;
|
||||
}
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Device",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
|
|
@ -77,132 +77,132 @@ pub trait Device {
|
|||
) -> zbus::Result<()>;
|
||||
|
||||
/// ActiveConnection property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn active_connection(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Autoconnect property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn autoconnect(&self) -> zbus::Result<bool>;
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn set_autoconnect(&self, value: bool) -> zbus::Result<()>;
|
||||
|
||||
/// AvailableConnections property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn available_connections(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// Capabilities property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn capabilities(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// DeviceType property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn device_type(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Dhcp4Config property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn dhcp4_config(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Dhcp6Config property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn dhcp6_config(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Driver property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn driver(&self) -> zbus::Result<String>;
|
||||
|
||||
/// DriverVersion property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn driver_version(&self) -> zbus::Result<String>;
|
||||
|
||||
/// FirmwareMissing property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn firmware_missing(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// FirmwareVersion property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn firmware_version(&self) -> zbus::Result<String>;
|
||||
|
||||
/// HwAddress property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn hw_address(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Interface property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn interface(&self) -> zbus::Result<String>;
|
||||
|
||||
/// InterfaceFlags property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn interface_flags(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Ip4Address property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn ip4_address(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Ip4Config property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn ip4_config(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Ip4Connectivity property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn ip4_connectivity(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Ip6Config property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn ip6_config(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Ip6Connectivity property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn ip6_connectivity(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// IpInterface property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn ip_interface(&self) -> zbus::Result<String>;
|
||||
|
||||
/// LldpNeighbors property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn lldp_neighbors(
|
||||
&self,
|
||||
) -> zbus::Result<Vec<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>>;
|
||||
|
||||
/// Managed property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn managed(&self) -> zbus::Result<bool>;
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn set_managed(&self, value: bool) -> zbus::Result<()>;
|
||||
|
||||
/// Metered property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn metered(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Mtu property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn mtu(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// NmPluginMissing property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn nm_plugin_missing(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// Path property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn path_(&self) -> zbus::Result<String>;
|
||||
|
||||
/// PhysicalPortId property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn physical_port_id(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Real property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn real(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// State property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn state(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// StateReason property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn state_reason(&self) -> zbus::Result<(u32, u32)>;
|
||||
|
||||
/// Udi property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn udi(&self) -> zbus::Result<String>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,22 +11,22 @@
|
|||
//! section of the zbus documentation.
|
||||
//!
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Device.Bluetooth",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
pub trait BluetoothDevice {
|
||||
/// BtCapabilities property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn bt_capabilities(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// HwAddress property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn hw_address(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Name property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn name(&self) -> zbus::Result<String>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,38 +11,38 @@
|
|||
//! section of the zbus documentation.
|
||||
//!
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Device.Tun",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
pub trait TunDevice {
|
||||
/// Group property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn group(&self) -> zbus::Result<i64>;
|
||||
|
||||
/// HwAddress property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn hw_address(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Mode property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn mode(&self) -> zbus::Result<String>;
|
||||
|
||||
/// MultiQueue property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn multi_queue(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// NoPi property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn no_pi(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// Owner property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn owner(&self) -> zbus::Result<i64>;
|
||||
|
||||
/// VnetHdr property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn vnet_hdr(&self) -> zbus::Result<bool>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,30 +20,30 @@
|
|||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Device.Wired",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
trait WiredDevice {
|
||||
/// Carrier property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn carrier(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// HwAddress property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn hw_address(&self) -> zbus::Result<String>;
|
||||
|
||||
/// PermHwAddress property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn perm_hw_address(&self) -> zbus::Result<String>;
|
||||
|
||||
/// S390Subchannels property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn s390subchannels(&self) -> zbus::Result<Vec<String>>;
|
||||
|
||||
/// Speed property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn speed(&self) -> zbus::Result<u32>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,22 +11,22 @@
|
|||
//! section of the zbus documentation.
|
||||
//!
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Device.WireGuard",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
pub trait WireGuardDevice {
|
||||
/// FwMark property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn fw_mark(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// ListenPort property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn listen_port(&self) -> zbus::Result<u16>;
|
||||
|
||||
/// PublicKey property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn public_key(&self) -> zbus::Result<Vec<u8>>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@
|
|||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Device.Wireless",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
|
|
@ -40,45 +40,45 @@ pub trait WirelessDevice {
|
|||
) -> zbus::Result<()>;
|
||||
|
||||
/// AccessPointAdded signal
|
||||
#[dbus_proxy(signal)]
|
||||
#[zbus(signal)]
|
||||
fn access_point_added(&self, access_point: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// AccessPointRemoved signal
|
||||
#[dbus_proxy(signal)]
|
||||
#[zbus(signal)]
|
||||
fn access_point_removed(
|
||||
&self,
|
||||
access_point: zbus::zvariant::ObjectPath<'_>,
|
||||
) -> zbus::Result<()>;
|
||||
|
||||
/// AccessPoints property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn access_points(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// ActiveAccessPoint property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn active_access_point(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// Bitrate property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn bitrate(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// HwAddress property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn hw_address(&self) -> zbus::Result<String>;
|
||||
|
||||
/// LastScan property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn last_scan(&self) -> zbus::Result<i64>;
|
||||
|
||||
/// Mode property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn mode(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// PermHwAddress property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn perm_hw_address(&self) -> zbus::Result<String>;
|
||||
|
||||
/// WirelessCapabilities property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn wireless_capabilities(&self) -> zbus::Result<u32>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ pub mod enums;
|
|||
pub mod settings;
|
||||
pub mod statistics;
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager",
|
||||
default_service = "org.freedesktop.NetworkManager",
|
||||
default_path = "/org/freedesktop/NetworkManager"
|
||||
|
|
@ -136,125 +136,125 @@ pub trait NetworkManager {
|
|||
fn sleep(&self, sleep: bool) -> zbus::Result<()>;
|
||||
|
||||
/// CheckPermissions signal
|
||||
#[dbus_proxy(signal)]
|
||||
#[zbus(signal)]
|
||||
fn check_permissions(&self) -> zbus::Result<()>;
|
||||
|
||||
/// DeviceAdded signal
|
||||
#[dbus_proxy(signal)]
|
||||
#[zbus(signal)]
|
||||
fn device_added(&self, device_path: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// DeviceRemoved signal
|
||||
#[dbus_proxy(signal)]
|
||||
#[zbus(signal)]
|
||||
fn device_removed(&self, device_path: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// ActivatingConnection property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn activating_connection(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// ActiveConnections property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn active_connections(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// AllDevices property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn all_devices(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// Capabilities property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn capabilities(&self) -> zbus::Result<Vec<u32>>;
|
||||
|
||||
/// Checkpoints property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn checkpoints(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// Connectivity property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn connectivity(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// ConnectivityCheckAvailable property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn connectivity_check_available(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// ConnectivityCheckEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn connectivity_check_enabled(&self) -> zbus::Result<bool>;
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn set_connectivity_check_enabled(&self, value: bool) -> zbus::Result<()>;
|
||||
|
||||
/// ConnectivityCheckUri property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn connectivity_check_uri(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Devices property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn devices(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// GlobalDnsConfiguration property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn global_dns_configuration(
|
||||
&self,
|
||||
) -> zbus::Result<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>;
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn set_global_dns_configuration(
|
||||
&self,
|
||||
value: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||
) -> zbus::Result<()>;
|
||||
|
||||
/// Metered property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn metered(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// NetworkingEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn networking_enabled(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// PrimaryConnection property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn primary_connection(&self) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
|
||||
|
||||
/// PrimaryConnectionType property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn primary_connection_type(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Startup property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn startup(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// State property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn state(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Version property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn version(&self) -> zbus::Result<String>;
|
||||
|
||||
/// WimaxEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn wimax_enabled(&self) -> zbus::Result<bool>;
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn set_wimax_enabled(&self, value: bool) -> zbus::Result<()>;
|
||||
|
||||
/// WimaxHardwareEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn wimax_hardware_enabled(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// WirelessEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn wireless_enabled(&self) -> zbus::Result<bool>;
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn set_wireless_enabled(&self, value: bool) -> zbus::Result<()>;
|
||||
|
||||
/// WirelessHardwareEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn wireless_hardware_enabled(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// WwanEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn wwan_enabled(&self) -> zbus::Result<bool>;
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn set_wwan_enabled(&self, value: bool) -> zbus::Result<()>;
|
||||
|
||||
/// WwanHardwareEnabled property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn wwan_hardware_enabled(&self) -> zbus::Result<bool>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
pub mod connection;
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Settings",
|
||||
default_service = "org.freedesktop.NetworkManager",
|
||||
default_path = "/org/freedesktop/NetworkManager/Settings"
|
||||
|
|
@ -78,22 +78,22 @@ pub trait Settings {
|
|||
fn save_hostname(&self, hostname: &str) -> zbus::Result<()>;
|
||||
|
||||
/// ConnectionRemoved signal
|
||||
#[dbus_proxy(signal)]
|
||||
#[zbus(signal)]
|
||||
fn connection_removed(&self, connection: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// NewConnection signal
|
||||
#[dbus_proxy(signal)]
|
||||
#[zbus(signal)]
|
||||
fn new_connection(&self, connection: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// CanModify property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn can_modify(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// Connections property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn connections(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||
|
||||
/// Hostname property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn hostname(&self) -> zbus::Result<String>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@
|
|||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Settings.Connection",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
|
|
@ -87,22 +87,22 @@ pub trait ConnectionSettings {
|
|||
) -> zbus::Result<()>;
|
||||
|
||||
/// Removed signal
|
||||
#[dbus_proxy(signal)]
|
||||
#[zbus(signal)]
|
||||
fn removed(&self) -> zbus::Result<()>;
|
||||
|
||||
/// Updated signal
|
||||
#[dbus_proxy(signal)]
|
||||
#[zbus(signal)]
|
||||
fn updated(&self) -> zbus::Result<()>;
|
||||
|
||||
/// Filename property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn filename(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Flags property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn flags(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// Unsaved property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn unsaved(&self) -> zbus::Result<bool>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,24 +20,24 @@
|
|||
//!
|
||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
use zbus::proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
#[proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Device.Statistics",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
pub trait Statistics {
|
||||
/// RefreshRateMs property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn refresh_rate_ms(&self) -> zbus::Result<u32>;
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn set_refresh_rate_ms(&self, value: u32) -> zbus::Result<()>;
|
||||
|
||||
/// RxBytes property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn rx_bytes(&self) -> zbus::Result<u64>;
|
||||
|
||||
/// TxBytes property
|
||||
#[dbus_proxy(property)]
|
||||
#[zbus(property)]
|
||||
fn tx_bytes(&self) -> zbus::Result<u64>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue