rusty_network_manager/network_manager/agent_manager.rs
1//! # D-Bus interface proxy for: `org.freedesktop.NetworkManager.AgentManager`
2//!
3//! This code was generated by `zbus-xmlgen` `4.0.1` from D-Bus introspection data.
4//! Source: `org.freedesktop.NetworkManager.AgentManager.xml`.
5//!
6//! You may prefer to adapt it, instead of using it verbatim.
7//!
8//! More information can be found in the [Writing a client proxy] section of the zbus
9//! documentation.
10//!
11//!
12//! [Writing a client proxy]: https://dbus2.github.io/zbus/client.html
13//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces,
14use zbus::{Connection, Result, proxy};
15
16impl AgentManagerProxy<'_> {
17 pub async fn new_from_path(
18 device_path: zbus::zvariant::OwnedObjectPath,
19 connection: &Connection,
20 ) -> Result<AgentManagerProxy<'_>> {
21 AgentManagerProxy::builder(connection)
22 .path(device_path)?
23 .build()
24 .await
25 }
26}
27
28#[proxy(
29 default_path = "/org/freedesktop/NetworkManager/AgentManager",
30 default_service = "org.freedesktop.NetworkManager",
31 interface = "org.freedesktop.NetworkManager.AgentManager",
32 assume_defaults = true
33)]
34pub trait AgentManager {
35 /// Register method
36 fn register(&self, identifier: &str) -> zbus::Result<()>;
37
38 /// RegisterWithCapabilities method
39 fn register_with_capabilities(&self, identifier: &str, capabilities: u32) -> zbus::Result<()>;
40
41 /// Unregister method
42 fn unregister(&self) -> zbus::Result<()>;
43}