monitord/dbus/
zbus_networkd.rs

1//! # D-Bus interface proxy for: `org.freedesktop.network1.Manager`
2//!
3//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data.
4//! Source: `Interface '/org/freedesktop/network1' from service 'org.freedesktop.network1' on system bus`.
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//! This type implements the [D-Bus standard interfaces], (`org.freedesktop.DBus.*`) for which the
12//! following zbus API can be used:
13//!
14//! * [`zbus::fdo::PeerProxy`]
15//! * [`zbus::fdo::IntrospectableProxy`]
16//! * [`zbus::fdo::PropertiesProxy`]
17//!
18//! Consequently `zbus-xmlgen` did not generate code for the above interfaces.
19//!
20//! [Writing a client proxy]: https://dbus2.github.io/zbus/client.html
21//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces,
22#![allow(warnings)]
23#![allow(clippy)]
24use zbus::proxy;
25#[proxy(
26    interface = "org.freedesktop.network1.Manager",
27    default_service = "org.freedesktop.network1",
28    default_path = "/org/freedesktop/network1"
29)]
30pub trait Manager {
31    /// Describe method
32    fn describe(&self) -> zbus::Result<String>;
33
34    /// DescribeLink method
35    fn describe_link(&self, ifindex: i32) -> zbus::Result<String>;
36
37    /// ForceRenewLink method
38    fn force_renew_link(&self, ifindex: i32) -> zbus::Result<()>;
39
40    /// GetLinkByIndex method
41    fn get_link_by_index(
42        &self,
43        ifindex: i32,
44    ) -> zbus::Result<(String, zbus::zvariant::OwnedObjectPath)>;
45
46    /// GetLinkByName method
47    fn get_link_by_name(&self, name: &str) -> zbus::Result<(i32, zbus::zvariant::OwnedObjectPath)>;
48
49    /// ListLinks method
50    fn list_links(&self) -> zbus::Result<Vec<(i32, String, zbus::zvariant::OwnedObjectPath)>>;
51
52    /// ReconfigureLink method
53    fn reconfigure_link(&self, ifindex: i32) -> zbus::Result<()>;
54
55    /// Reload method
56    fn reload(&self) -> zbus::Result<()>;
57
58    /// RenewLink method
59    fn renew_link(&self, ifindex: i32) -> zbus::Result<()>;
60
61    /// RevertLinkDNS method
62    #[zbus(name = "RevertLinkDNS")]
63    fn revert_link_dns(&self, ifindex: i32) -> zbus::Result<()>;
64
65    /// RevertLinkNTP method
66    #[zbus(name = "RevertLinkNTP")]
67    fn revert_link_ntp(&self, ifindex: i32) -> zbus::Result<()>;
68
69    /// SetLinkDNS method
70    #[zbus(name = "SetLinkDNS")]
71    fn set_link_dns(&self, ifindex: i32, addresses: &[&(i32, &[u8])]) -> zbus::Result<()>;
72
73    /// SetLinkDNSEx method
74    #[zbus(name = "SetLinkDNSEx")]
75    fn set_link_dnsex(
76        &self,
77        ifindex: i32,
78        addresses: &[&(i32, &[u8], u16, &str)],
79    ) -> zbus::Result<()>;
80
81    /// SetLinkDNSOverTLS method
82    #[zbus(name = "SetLinkDNSOverTLS")]
83    fn set_link_dnsover_tls(&self, ifindex: i32, mode: &str) -> zbus::Result<()>;
84
85    /// SetLinkDNSSEC method
86    #[zbus(name = "SetLinkDNSSEC")]
87    fn set_link_dnssec(&self, ifindex: i32, mode: &str) -> zbus::Result<()>;
88
89    /// SetLinkDNSSECNegativeTrustAnchors method
90    #[zbus(name = "SetLinkDNSSECNegativeTrustAnchors")]
91    fn set_link_dnssecnegative_trust_anchors(
92        &self,
93        ifindex: i32,
94        names: &[&str],
95    ) -> zbus::Result<()>;
96
97    /// SetLinkDefaultRoute method
98    fn set_link_default_route(&self, ifindex: i32, enable: bool) -> zbus::Result<()>;
99
100    /// SetLinkDomains method
101    fn set_link_domains(&self, ifindex: i32, domains: &[&(&str, bool)]) -> zbus::Result<()>;
102
103    /// SetLinkLLMNR method
104    #[zbus(name = "SetLinkLLMNR")]
105    fn set_link_llmnr(&self, ifindex: i32, mode: &str) -> zbus::Result<()>;
106
107    /// SetLinkMulticastDNS method
108    #[zbus(name = "SetLinkMulticastDNS")]
109    fn set_link_multicast_dns(&self, ifindex: i32, mode: &str) -> zbus::Result<()>;
110
111    /// SetLinkNTP method
112    #[zbus(name = "SetLinkNTP")]
113    fn set_link_ntp(&self, ifindex: i32, servers: &[&str]) -> zbus::Result<()>;
114
115    /// AddressState property
116    #[zbus(property)]
117    fn address_state(&self) -> zbus::Result<String>;
118
119    /// CarrierState property
120    #[zbus(property)]
121    fn carrier_state(&self) -> zbus::Result<String>;
122
123    /// IPv4AddressState property
124    #[zbus(property, name = "IPv4AddressState")]
125    fn ipv4_address_state(&self) -> zbus::Result<String>;
126
127    /// IPv6AddressState property
128    #[zbus(property, name = "IPv6AddressState")]
129    fn ipv6_address_state(&self) -> zbus::Result<String>;
130
131    /// NamespaceId property
132    #[zbus(property)]
133    fn namespace_id(&self) -> zbus::Result<u64>;
134
135    /// OnlineState property
136    #[zbus(property)]
137    fn online_state(&self) -> zbus::Result<String>;
138
139    /// OperationalState property
140    #[zbus(property)]
141    fn operational_state(&self) -> zbus::Result<String>;
142}