rusty_network_manager/network_manager/
ppp.rs

1//! # D-Bus interface proxy for: `org.freedesktop.NetworkManager.PPP`
2//!
3//! This code was generated by `zbus-xmlgen` `4.0.1` from D-Bus introspection data.
4//! Source: `org.freedesktop.NetworkManager.PPP.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 PPPProxy<'_> {
17    pub async fn new_from_path(
18        device_path: zbus::zvariant::OwnedObjectPath,
19        connection: &Connection,
20    ) -> Result<PPPProxy<'_>> {
21        PPPProxy::builder(connection)
22            .path(device_path)?
23            .build()
24            .await
25    }
26}
27
28#[proxy(
29    default_path = "/org/freedesktop/NetworkManager/PPP",
30    default_service = "org.freedesktop.NetworkManager",
31    interface = "org.freedesktop.NetworkManager.PPP",
32    assume_defaults = true
33)]
34pub trait PPP {
35    /// NeedSecrets method
36    fn need_secrets(&self) -> zbus::Result<(String, String)>;
37
38    /// SetIfindex method
39    fn set_ifindex(&self, ifindex: i32) -> zbus::Result<()>;
40
41    /// SetIp4Config method
42    fn set_ip4_config(
43        &self,
44        config: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
45    ) -> zbus::Result<()>;
46
47    /// SetIp6Config method
48    fn set_ip6_config(
49        &self,
50        config: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
51    ) -> zbus::Result<()>;
52
53    /// SetState method
54    fn set_state(&self, state: u32) -> zbus::Result<()>;
55}