Add more interfaces and sort some old ones
This commit is contained in:
parent
2b00c7f3e3
commit
d17c660410
10 changed files with 155 additions and 93 deletions
|
|
@ -22,7 +22,10 @@
|
||||||
|
|
||||||
use zbus::dbus_proxy;
|
use zbus::dbus_proxy;
|
||||||
|
|
||||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.AccessPoint")]
|
#[dbus_proxy(
|
||||||
|
interface = "org.freedesktop.NetworkManager.AccessPoint",
|
||||||
|
default_service = "org.freedesktop.NetworkManager"
|
||||||
|
)]
|
||||||
trait AccessPoint {
|
trait AccessPoint {
|
||||||
/// Flags property
|
/// Flags property
|
||||||
#[dbus_proxy(property)]
|
#[dbus_proxy(property)]
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,10 @@
|
||||||
|
|
||||||
use zbus::dbus_proxy;
|
use zbus::dbus_proxy;
|
||||||
|
|
||||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.IP4Config")]
|
#[dbus_proxy(
|
||||||
|
interface = "org.freedesktop.NetworkManager.IP4Config",
|
||||||
|
default_service = "org.freedesktop.NetworkManager"
|
||||||
|
)]
|
||||||
pub trait Ipv4Config {
|
pub trait Ipv4Config {
|
||||||
/// AddressData property
|
/// AddressData property
|
||||||
#[dbus_proxy(property)]
|
#[dbus_proxy(property)]
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,10 @@
|
||||||
|
|
||||||
use zbus::dbus_proxy;
|
use zbus::dbus_proxy;
|
||||||
|
|
||||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.IP6Config")]
|
#[dbus_proxy(
|
||||||
|
interface = "org.freedesktop.NetworkManager.IP6Config",
|
||||||
|
default_service = "org.freedesktop.NetworkManager"
|
||||||
|
)]
|
||||||
pub trait Ipv6Config {
|
pub trait Ipv6Config {
|
||||||
/// AddressData property
|
/// AddressData property
|
||||||
#[dbus_proxy(property)]
|
#[dbus_proxy(property)]
|
||||||
|
|
|
||||||
|
|
@ -20,12 +20,16 @@
|
||||||
//!
|
//!
|
||||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||||
|
|
||||||
|
pub mod bluetooth;
|
||||||
pub mod wired;
|
pub mod wired;
|
||||||
pub mod wireless;
|
pub mod wireless;
|
||||||
|
|
||||||
use zbus::dbus_proxy;
|
use zbus::dbus_proxy;
|
||||||
|
|
||||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device.Generic")]
|
#[dbus_proxy(
|
||||||
|
interface = "org.freedesktop.NetworkManager.Device.Generic",
|
||||||
|
default_service = "org.freedesktop.NetworkManager"
|
||||||
|
)]
|
||||||
pub trait GenericDevice {
|
pub trait GenericDevice {
|
||||||
/// HwAddress property
|
/// HwAddress property
|
||||||
#[dbus_proxy(property)]
|
#[dbus_proxy(property)]
|
||||||
|
|
@ -36,7 +40,10 @@ pub trait GenericDevice {
|
||||||
fn type_description(&self) -> zbus::Result<String>;
|
fn type_description(&self) -> zbus::Result<String>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device")]
|
#[dbus_proxy(
|
||||||
|
interface = "org.freedesktop.NetworkManager.Device",
|
||||||
|
default_service = "org.freedesktop.NetworkManager"
|
||||||
|
)]
|
||||||
pub trait Device {
|
pub trait Device {
|
||||||
/// Delete method
|
/// Delete method
|
||||||
fn delete(&self) -> zbus::Result<()>;
|
fn delete(&self) -> zbus::Result<()>;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,10 @@
|
||||||
|
|
||||||
use zbus::dbus_proxy;
|
use zbus::dbus_proxy;
|
||||||
|
|
||||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device.Wired")]
|
#[dbus_proxy(
|
||||||
|
interface = "org.freedesktop.NetworkManager.Device.Wired",
|
||||||
|
default_service = "org.freedesktop.NetworkManager"
|
||||||
|
)]
|
||||||
trait WiredDevice {
|
trait WiredDevice {
|
||||||
/// Carrier property
|
/// Carrier property
|
||||||
#[dbus_proxy(property)]
|
#[dbus_proxy(property)]
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,10 @@
|
||||||
|
|
||||||
use zbus::dbus_proxy;
|
use zbus::dbus_proxy;
|
||||||
|
|
||||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device.Wireless")]
|
#[dbus_proxy(
|
||||||
|
interface = "org.freedesktop.NetworkManager.Device.Wireless",
|
||||||
|
default_service = "org.freedesktop.NetworkManager"
|
||||||
|
)]
|
||||||
pub trait WirelessDevice {
|
pub trait WirelessDevice {
|
||||||
/// GetAccessPoints method
|
/// GetAccessPoints method
|
||||||
fn get_access_points(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
fn get_access_points(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,18 @@
|
||||||
|
|
||||||
pub mod access_point;
|
pub mod access_point;
|
||||||
pub mod config;
|
pub mod config;
|
||||||
|
pub mod connection;
|
||||||
pub mod device;
|
pub mod device;
|
||||||
pub mod settings;
|
pub mod settings;
|
||||||
pub mod statistics;
|
pub mod statistics;
|
||||||
|
|
||||||
use zbus::dbus_proxy;
|
use zbus::dbus_proxy;
|
||||||
|
|
||||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager")]
|
#[dbus_proxy(
|
||||||
|
interface = "org.freedesktop.NetworkManager",
|
||||||
|
default_service = "org.freedesktop.NetworkManager",
|
||||||
|
default_path = "/org/freedesktop/NetworkManager"
|
||||||
|
)]
|
||||||
pub trait NetworkManager {
|
pub trait NetworkManager {
|
||||||
/// ActivateConnection method
|
/// ActivateConnection method
|
||||||
fn activate_connection(
|
fn activate_connection(
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
//! # DBus interface proxy for: `org.freedesktop.NetworkManager.Settings`, `org.freedesktop.NetworkManager.Settings.Connection`
|
//! # DBus interface proxy for: `org.freedesktop.NetworkManager.Settings`
|
||||||
//!
|
//!
|
||||||
//! This code was generated by `zbus-xmlgen` `2.0.0` from DBus introspection data.
|
//! This code was generated by `zbus-xmlgen` `2.0.0` from DBus introspection data.
|
||||||
//! Source: `Interface '/org/freedesktop/NetworkManager/Settings' from service 'org.freedesktop.NetworkManager' on system bus`.
|
//! Source: `Interface '/org/freedesktop/NetworkManager/Settings' from service 'org.freedesktop.NetworkManager' on system bus`.
|
||||||
|
|
@ -20,9 +20,15 @@
|
||||||
//!
|
//!
|
||||||
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||||
|
|
||||||
|
pub mod connection;
|
||||||
|
|
||||||
use zbus::dbus_proxy;
|
use zbus::dbus_proxy;
|
||||||
|
|
||||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Settings")]
|
#[dbus_proxy(
|
||||||
|
interface = "org.freedesktop.NetworkManager.Settings",
|
||||||
|
default_service = "org.freedesktop.NetworkManager",
|
||||||
|
default_path = "/org/freedesktop/NetworkManager/Settings"
|
||||||
|
)]
|
||||||
pub trait Settings {
|
pub trait Settings {
|
||||||
/// AddConnection method
|
/// AddConnection method
|
||||||
fn add_connection(
|
fn add_connection(
|
||||||
|
|
@ -91,85 +97,3 @@ pub trait Settings {
|
||||||
#[dbus_proxy(property)]
|
#[dbus_proxy(property)]
|
||||||
fn hostname(&self) -> zbus::Result<String>;
|
fn hostname(&self) -> zbus::Result<String>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Settings.Connection")]
|
|
||||||
pub trait Connection {
|
|
||||||
/// ClearSecrets method
|
|
||||||
fn clear_secrets(&self) -> zbus::Result<()>;
|
|
||||||
|
|
||||||
/// Delete method
|
|
||||||
fn delete(&self) -> zbus::Result<()>;
|
|
||||||
|
|
||||||
/// GetSecrets method
|
|
||||||
fn get_secrets(
|
|
||||||
&self,
|
|
||||||
setting_name: &str,
|
|
||||||
) -> zbus::Result<
|
|
||||||
std::collections::HashMap<
|
|
||||||
String,
|
|
||||||
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
|
|
||||||
>,
|
|
||||||
>;
|
|
||||||
|
|
||||||
/// GetSettings method
|
|
||||||
fn get_settings(
|
|
||||||
&self,
|
|
||||||
) -> zbus::Result<
|
|
||||||
std::collections::HashMap<
|
|
||||||
String,
|
|
||||||
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
|
|
||||||
>,
|
|
||||||
>;
|
|
||||||
|
|
||||||
/// Save method
|
|
||||||
fn save(&self) -> zbus::Result<()>;
|
|
||||||
|
|
||||||
/// Update method
|
|
||||||
fn update(
|
|
||||||
&self,
|
|
||||||
properties: std::collections::HashMap<
|
|
||||||
&str,
|
|
||||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
|
||||||
>,
|
|
||||||
) -> zbus::Result<()>;
|
|
||||||
|
|
||||||
/// Update2 method
|
|
||||||
fn update2(
|
|
||||||
&self,
|
|
||||||
settings: std::collections::HashMap<
|
|
||||||
&str,
|
|
||||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
|
||||||
>,
|
|
||||||
flags: u32,
|
|
||||||
args: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
|
||||||
) -> zbus::Result<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>;
|
|
||||||
|
|
||||||
/// UpdateUnsaved method
|
|
||||||
fn update_unsaved(
|
|
||||||
&self,
|
|
||||||
properties: std::collections::HashMap<
|
|
||||||
&str,
|
|
||||||
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
|
||||||
>,
|
|
||||||
) -> zbus::Result<()>;
|
|
||||||
|
|
||||||
/// Removed signal
|
|
||||||
#[dbus_proxy(signal)]
|
|
||||||
fn removed(&self) -> zbus::Result<()>;
|
|
||||||
|
|
||||||
/// Updated signal
|
|
||||||
#[dbus_proxy(signal)]
|
|
||||||
fn updated(&self) -> zbus::Result<()>;
|
|
||||||
|
|
||||||
/// Filename property
|
|
||||||
#[dbus_proxy(property)]
|
|
||||||
fn filename(&self) -> zbus::Result<String>;
|
|
||||||
|
|
||||||
/// Flags property
|
|
||||||
#[dbus_proxy(property)]
|
|
||||||
fn flags(&self) -> zbus::Result<u32>;
|
|
||||||
|
|
||||||
/// Unsaved property
|
|
||||||
#[dbus_proxy(property)]
|
|
||||||
fn unsaved(&self) -> zbus::Result<bool>;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
108
networkmanager/src/interface/settings/connection.rs
Normal file
108
networkmanager/src/interface/settings/connection.rs
Normal file
|
|
@ -0,0 +1,108 @@
|
||||||
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
//! # DBus interface proxy for: `org.freedesktop.NetworkManager.Settings.Connection`
|
||||||
|
//!
|
||||||
|
//! This code was generated by `zbus-xmlgen` `2.0.0` from DBus introspection data.
|
||||||
|
//! Source: `Interface '/org/freedesktop/NetworkManager/Settings' 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.Settings.Connection",
|
||||||
|
default_service = "org.freedesktop.NetworkManager"
|
||||||
|
)]
|
||||||
|
pub trait ConnectionSettings {
|
||||||
|
/// ClearSecrets method
|
||||||
|
fn clear_secrets(&self) -> zbus::Result<()>;
|
||||||
|
|
||||||
|
/// Delete method
|
||||||
|
fn delete(&self) -> zbus::Result<()>;
|
||||||
|
|
||||||
|
/// GetSecrets method
|
||||||
|
fn get_secrets(
|
||||||
|
&self,
|
||||||
|
setting_name: &str,
|
||||||
|
) -> zbus::Result<
|
||||||
|
std::collections::HashMap<
|
||||||
|
String,
|
||||||
|
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
|
||||||
|
>,
|
||||||
|
>;
|
||||||
|
|
||||||
|
/// GetSettings method
|
||||||
|
fn get_settings(
|
||||||
|
&self,
|
||||||
|
) -> zbus::Result<
|
||||||
|
std::collections::HashMap<
|
||||||
|
String,
|
||||||
|
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
|
||||||
|
>,
|
||||||
|
>;
|
||||||
|
|
||||||
|
/// Save method
|
||||||
|
fn save(&self) -> zbus::Result<()>;
|
||||||
|
|
||||||
|
/// Update method
|
||||||
|
fn update(
|
||||||
|
&self,
|
||||||
|
properties: std::collections::HashMap<
|
||||||
|
&str,
|
||||||
|
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||||
|
>,
|
||||||
|
) -> zbus::Result<()>;
|
||||||
|
|
||||||
|
/// Update2 method
|
||||||
|
fn update2(
|
||||||
|
&self,
|
||||||
|
settings: std::collections::HashMap<
|
||||||
|
&str,
|
||||||
|
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||||
|
>,
|
||||||
|
flags: u32,
|
||||||
|
args: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||||
|
) -> zbus::Result<std::collections::HashMap<String, zbus::zvariant::OwnedValue>>;
|
||||||
|
|
||||||
|
/// UpdateUnsaved method
|
||||||
|
fn update_unsaved(
|
||||||
|
&self,
|
||||||
|
properties: std::collections::HashMap<
|
||||||
|
&str,
|
||||||
|
std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
|
||||||
|
>,
|
||||||
|
) -> zbus::Result<()>;
|
||||||
|
|
||||||
|
/// Removed signal
|
||||||
|
#[dbus_proxy(signal)]
|
||||||
|
fn removed(&self) -> zbus::Result<()>;
|
||||||
|
|
||||||
|
/// Updated signal
|
||||||
|
#[dbus_proxy(signal)]
|
||||||
|
fn updated(&self) -> zbus::Result<()>;
|
||||||
|
|
||||||
|
/// Filename property
|
||||||
|
#[dbus_proxy(property)]
|
||||||
|
fn filename(&self) -> zbus::Result<String>;
|
||||||
|
|
||||||
|
/// Flags property
|
||||||
|
#[dbus_proxy(property)]
|
||||||
|
fn flags(&self) -> zbus::Result<u32>;
|
||||||
|
|
||||||
|
/// Unsaved property
|
||||||
|
#[dbus_proxy(property)]
|
||||||
|
fn unsaved(&self) -> zbus::Result<bool>;
|
||||||
|
}
|
||||||
|
|
@ -22,7 +22,10 @@
|
||||||
|
|
||||||
use zbus::dbus_proxy;
|
use zbus::dbus_proxy;
|
||||||
|
|
||||||
#[dbus_proxy(interface = "org.freedesktop.NetworkManager.Device.Statistics")]
|
#[dbus_proxy(
|
||||||
|
interface = "org.freedesktop.NetworkManager.Device.Statistics",
|
||||||
|
default_service = "org.freedesktop.NetworkManager"
|
||||||
|
)]
|
||||||
pub trait Statistics {
|
pub trait Statistics {
|
||||||
/// RefreshRateMs property
|
/// RefreshRateMs property
|
||||||
#[dbus_proxy(property)]
|
#[dbus_proxy(property)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue