Created
July 2, 2024 16:34
-
-
Save rschulman/1cd6b9e2ae493a11bf5323b6691f96e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! # D-Bus interface proxy for: `org.freedesktop.NetworkManager.Settings` | |
//! | |
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus 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] section of the zbus | |
//! documentation. | |
//! | |
//! This type implements the [D-Bus standard interfaces], (`org.freedesktop.DBus.*`) for which the | |
//! following zbus API can be used: | |
//! | |
//! * [`zbus::fdo::PropertiesProxy`] | |
//! * [`zbus::fdo::IntrospectableProxy`] | |
//! * [`zbus::fdo::PeerProxy`] | |
//! | |
//! Consequently `zbus-xmlgen` did not generate code for the above interfaces. | |
//! | |
//! [Writing a client proxy]: https://dbus2.github.io/zbus/client.html | |
//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces, | |
use zbus::proxy; | |
#[proxy( | |
interface = "org.freedesktop.NetworkManager.Settings", | |
default_service = "org.freedesktop.NetworkManager", | |
default_path = "/org/freedesktop/NetworkManager/Settings" | |
)] | |
trait Settings { | |
/// AddConnection method | |
fn add_connection( | |
&self, | |
connection: std::collections::HashMap< | |
&str, | |
std::collections::HashMap<&str, &zbus::zvariant::Value<'_>>, | |
>, | |
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>; | |
/// AddConnection2 method | |
fn add_connection2( | |
&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<( | |
zbus::zvariant::OwnedObjectPath, | |
std::collections::HashMap<String, zbus::zvariant::OwnedValue>, | |
)>; | |
/// AddConnectionUnsaved method | |
fn add_connection_unsaved( | |
&self, | |
connection: std::collections::HashMap< | |
&str, | |
std::collections::HashMap<&str, &zbus::zvariant::Value<'_>>, | |
>, | |
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>; | |
/// GetConnectionByUuid method | |
fn get_connection_by_uuid(&self, uuid: &str) -> zbus::Result<zbus::zvariant::OwnedObjectPath>; | |
/// ListConnections method | |
fn list_connections(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>; | |
/// LoadConnections method | |
fn load_connections(&self, filenames: &[&str]) -> zbus::Result<(bool, Vec<String>)>; | |
/// ReloadConnections method | |
fn reload_connections(&self) -> zbus::Result<bool>; | |
/// SaveHostname method | |
fn save_hostname(&self, hostname: &str) -> zbus::Result<()>; | |
/// ConnectionRemoved signal | |
#[zbus(signal)] | |
fn connection_removed(&self, connection: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>; | |
/// NewConnection signal | |
#[zbus(signal)] | |
fn new_connection(&self, connection: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>; | |
/// CanModify property | |
#[zbus(property)] | |
fn can_modify(&self) -> zbus::Result<bool>; | |
/// Connections property | |
#[zbus(property)] | |
fn connections(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>; | |
/// Hostname property | |
#[zbus(property)] | |
fn hostname(&self) -> zbus::Result<String>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment