1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
//! # D-Bus interface proxy for: `org.freedesktop.network1.Manager`
//!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data.
//! Source: `Interface '/org/freedesktop/network1' from service 'org.freedesktop.network1' 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::PeerProxy`]
//! * [`zbus::fdo::IntrospectableProxy`]
//! * [`zbus::fdo::PropertiesProxy`]
//!
//! 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,
#![allow(warnings)]
#![allow(clippy)]
use zbus::proxy;
#[proxy(
    interface = "org.freedesktop.network1.Manager",
    default_service = "org.freedesktop.network1",
    default_path = "/org/freedesktop/network1"
)]
trait Manager {
    /// Describe method
    fn describe(&self) -> zbus::Result<String>;

    /// DescribeLink method
    fn describe_link(&self, ifindex: i32) -> zbus::Result<String>;

    /// ForceRenewLink method
    fn force_renew_link(&self, ifindex: i32) -> zbus::Result<()>;

    /// GetLinkByIndex method
    fn get_link_by_index(
        &self,
        ifindex: i32,
    ) -> zbus::Result<(String, zbus::zvariant::OwnedObjectPath)>;

    /// GetLinkByName method
    fn get_link_by_name(&self, name: &str) -> zbus::Result<(i32, zbus::zvariant::OwnedObjectPath)>;

    /// ListLinks method
    fn list_links(&self) -> zbus::Result<Vec<(i32, String, zbus::zvariant::OwnedObjectPath)>>;

    /// ReconfigureLink method
    fn reconfigure_link(&self, ifindex: i32) -> zbus::Result<()>;

    /// Reload method
    fn reload(&self) -> zbus::Result<()>;

    /// RenewLink method
    fn renew_link(&self, ifindex: i32) -> zbus::Result<()>;

    /// RevertLinkDNS method
    #[zbus(name = "RevertLinkDNS")]
    fn revert_link_dns(&self, ifindex: i32) -> zbus::Result<()>;

    /// RevertLinkNTP method
    #[zbus(name = "RevertLinkNTP")]
    fn revert_link_ntp(&self, ifindex: i32) -> zbus::Result<()>;

    /// SetLinkDNS method
    #[zbus(name = "SetLinkDNS")]
    fn set_link_dns(&self, ifindex: i32, addresses: &[&(i32, &[u8])]) -> zbus::Result<()>;

    /// SetLinkDNSEx method
    #[zbus(name = "SetLinkDNSEx")]
    fn set_link_dnsex(
        &self,
        ifindex: i32,
        addresses: &[&(i32, &[u8], u16, &str)],
    ) -> zbus::Result<()>;

    /// SetLinkDNSOverTLS method
    #[zbus(name = "SetLinkDNSOverTLS")]
    fn set_link_dnsover_tls(&self, ifindex: i32, mode: &str) -> zbus::Result<()>;

    /// SetLinkDNSSEC method
    #[zbus(name = "SetLinkDNSSEC")]
    fn set_link_dnssec(&self, ifindex: i32, mode: &str) -> zbus::Result<()>;

    /// SetLinkDNSSECNegativeTrustAnchors method
    #[zbus(name = "SetLinkDNSSECNegativeTrustAnchors")]
    fn set_link_dnssecnegative_trust_anchors(
        &self,
        ifindex: i32,
        names: &[&str],
    ) -> zbus::Result<()>;

    /// SetLinkDefaultRoute method
    fn set_link_default_route(&self, ifindex: i32, enable: bool) -> zbus::Result<()>;

    /// SetLinkDomains method
    fn set_link_domains(&self, ifindex: i32, domains: &[&(&str, bool)]) -> zbus::Result<()>;

    /// SetLinkLLMNR method
    #[zbus(name = "SetLinkLLMNR")]
    fn set_link_llmnr(&self, ifindex: i32, mode: &str) -> zbus::Result<()>;

    /// SetLinkMulticastDNS method
    #[zbus(name = "SetLinkMulticastDNS")]
    fn set_link_multicast_dns(&self, ifindex: i32, mode: &str) -> zbus::Result<()>;

    /// SetLinkNTP method
    #[zbus(name = "SetLinkNTP")]
    fn set_link_ntp(&self, ifindex: i32, servers: &[&str]) -> zbus::Result<()>;

    /// AddressState property
    #[zbus(property)]
    fn address_state(&self) -> zbus::Result<String>;

    /// CarrierState property
    #[zbus(property)]
    fn carrier_state(&self) -> zbus::Result<String>;

    /// IPv4AddressState property
    #[zbus(property, name = "IPv4AddressState")]
    fn ipv4_address_state(&self) -> zbus::Result<String>;

    /// IPv6AddressState property
    #[zbus(property, name = "IPv6AddressState")]
    fn ipv6_address_state(&self) -> zbus::Result<String>;

    /// NamespaceId property
    #[zbus(property)]
    fn namespace_id(&self) -> zbus::Result<u64>;

    /// OnlineState property
    #[zbus(property)]
    fn online_state(&self) -> zbus::Result<String>;

    /// OperationalState property
    #[zbus(property)]
    fn operational_state(&self) -> zbus::Result<String>;
}