nm_rs/auto/
flags.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir
3// from gtk-girs (https://github.com/gtk-rs/gir-files)
4// DO NOT EDIT
5
6use crate::ffi;
7use glib::{bitflags::bitflags, prelude::*, translate::*};
8
9bitflags! {
10    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
11    pub struct NM80211ApFlags: u32 {
12        #[doc(alias = "NM_802_11_AP_FLAGS_NONE")]
13        const NONE = ffi::NM_802_11_AP_FLAGS_NONE as _;
14        #[doc(alias = "NM_802_11_AP_FLAGS_PRIVACY")]
15        const PRIVACY = ffi::NM_802_11_AP_FLAGS_PRIVACY as _;
16        #[doc(alias = "NM_802_11_AP_FLAGS_WPS")]
17        const WPS = ffi::NM_802_11_AP_FLAGS_WPS as _;
18        #[doc(alias = "NM_802_11_AP_FLAGS_WPS_PBC")]
19        const WPS_PBC = ffi::NM_802_11_AP_FLAGS_WPS_PBC as _;
20        #[doc(alias = "NM_802_11_AP_FLAGS_WPS_PIN")]
21        const WPS_PIN = ffi::NM_802_11_AP_FLAGS_WPS_PIN as _;
22    }
23}
24
25#[doc(hidden)]
26impl IntoGlib for NM80211ApFlags {
27    type GlibType = ffi::NM80211ApFlags;
28
29    #[inline]
30    fn into_glib(self) -> ffi::NM80211ApFlags {
31        self.bits()
32    }
33}
34
35#[doc(hidden)]
36impl FromGlib<ffi::NM80211ApFlags> for NM80211ApFlags {
37    #[inline]
38    unsafe fn from_glib(value: ffi::NM80211ApFlags) -> Self {
39        skip_assert_initialized!();
40        Self::from_bits_truncate(value)
41    }
42}
43
44impl StaticType for NM80211ApFlags {
45    #[inline]
46    #[doc(alias = "nm_802_11_ap_flags_get_type")]
47    fn static_type() -> glib::Type {
48        unsafe { from_glib(ffi::nm_802_11_ap_flags_get_type()) }
49    }
50}
51
52impl glib::HasParamSpec for NM80211ApFlags {
53    type ParamSpec = glib::ParamSpecFlags;
54    type SetValue = Self;
55    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
56
57    fn param_spec_builder() -> Self::BuilderFn {
58        Self::ParamSpec::builder
59    }
60}
61
62impl glib::value::ValueType for NM80211ApFlags {
63    type Type = Self;
64}
65
66unsafe impl<'a> glib::value::FromValue<'a> for NM80211ApFlags {
67    type Checker = glib::value::GenericValueTypeChecker<Self>;
68
69    #[inline]
70    unsafe fn from_value(value: &'a glib::Value) -> Self {
71        skip_assert_initialized!();
72        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
73    }
74}
75
76impl ToValue for NM80211ApFlags {
77    #[inline]
78    fn to_value(&self) -> glib::Value {
79        let mut value = glib::Value::for_value_type::<Self>();
80        unsafe {
81            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
82        }
83        value
84    }
85
86    #[inline]
87    fn value_type(&self) -> glib::Type {
88        Self::static_type()
89    }
90}
91
92impl From<NM80211ApFlags> for glib::Value {
93    #[inline]
94    fn from(v: NM80211ApFlags) -> Self {
95        skip_assert_initialized!();
96        ToValue::to_value(&v)
97    }
98}
99
100bitflags! {
101    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
102    pub struct NM80211ApSecurityFlags: u32 {
103        #[doc(alias = "NM_802_11_AP_SEC_NONE")]
104        const NONE = ffi::NM_802_11_AP_SEC_NONE as _;
105        #[doc(alias = "NM_802_11_AP_SEC_PAIR_WEP40")]
106        const PAIR_WEP40 = ffi::NM_802_11_AP_SEC_PAIR_WEP40 as _;
107        #[doc(alias = "NM_802_11_AP_SEC_PAIR_WEP104")]
108        const PAIR_WEP104 = ffi::NM_802_11_AP_SEC_PAIR_WEP104 as _;
109        #[doc(alias = "NM_802_11_AP_SEC_PAIR_TKIP")]
110        const PAIR_TKIP = ffi::NM_802_11_AP_SEC_PAIR_TKIP as _;
111        #[doc(alias = "NM_802_11_AP_SEC_PAIR_CCMP")]
112        const PAIR_CCMP = ffi::NM_802_11_AP_SEC_PAIR_CCMP as _;
113        #[doc(alias = "NM_802_11_AP_SEC_GROUP_WEP40")]
114        const GROUP_WEP40 = ffi::NM_802_11_AP_SEC_GROUP_WEP40 as _;
115        #[doc(alias = "NM_802_11_AP_SEC_GROUP_WEP104")]
116        const GROUP_WEP104 = ffi::NM_802_11_AP_SEC_GROUP_WEP104 as _;
117        #[doc(alias = "NM_802_11_AP_SEC_GROUP_TKIP")]
118        const GROUP_TKIP = ffi::NM_802_11_AP_SEC_GROUP_TKIP as _;
119        #[doc(alias = "NM_802_11_AP_SEC_GROUP_CCMP")]
120        const GROUP_CCMP = ffi::NM_802_11_AP_SEC_GROUP_CCMP as _;
121        #[doc(alias = "NM_802_11_AP_SEC_KEY_MGMT_PSK")]
122        const KEY_MGMT_PSK = ffi::NM_802_11_AP_SEC_KEY_MGMT_PSK as _;
123        #[doc(alias = "NM_802_11_AP_SEC_KEY_MGMT_802_1X")]
124        const KEY_MGMT_802_1X = ffi::NM_802_11_AP_SEC_KEY_MGMT_802_1X as _;
125        #[doc(alias = "NM_802_11_AP_SEC_KEY_MGMT_SAE")]
126        const KEY_MGMT_SAE = ffi::NM_802_11_AP_SEC_KEY_MGMT_SAE as _;
127        #[doc(alias = "NM_802_11_AP_SEC_KEY_MGMT_OWE")]
128        const KEY_MGMT_OWE = ffi::NM_802_11_AP_SEC_KEY_MGMT_OWE as _;
129        #[doc(alias = "NM_802_11_AP_SEC_KEY_MGMT_OWE_TM")]
130        const KEY_MGMT_OWE_TM = ffi::NM_802_11_AP_SEC_KEY_MGMT_OWE_TM as _;
131        #[doc(alias = "NM_802_11_AP_SEC_KEY_MGMT_EAP_SUITE_B_192")]
132        const KEY_MGMT_EAP_SUITE_B_192 = ffi::NM_802_11_AP_SEC_KEY_MGMT_EAP_SUITE_B_192 as _;
133    }
134}
135
136#[doc(hidden)]
137impl IntoGlib for NM80211ApSecurityFlags {
138    type GlibType = ffi::NM80211ApSecurityFlags;
139
140    #[inline]
141    fn into_glib(self) -> ffi::NM80211ApSecurityFlags {
142        self.bits()
143    }
144}
145
146#[doc(hidden)]
147impl FromGlib<ffi::NM80211ApSecurityFlags> for NM80211ApSecurityFlags {
148    #[inline]
149    unsafe fn from_glib(value: ffi::NM80211ApSecurityFlags) -> Self {
150        skip_assert_initialized!();
151        Self::from_bits_truncate(value)
152    }
153}
154
155impl StaticType for NM80211ApSecurityFlags {
156    #[inline]
157    #[doc(alias = "nm_802_11_ap_security_flags_get_type")]
158    fn static_type() -> glib::Type {
159        unsafe { from_glib(ffi::nm_802_11_ap_security_flags_get_type()) }
160    }
161}
162
163impl glib::HasParamSpec for NM80211ApSecurityFlags {
164    type ParamSpec = glib::ParamSpecFlags;
165    type SetValue = Self;
166    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
167
168    fn param_spec_builder() -> Self::BuilderFn {
169        Self::ParamSpec::builder
170    }
171}
172
173impl glib::value::ValueType for NM80211ApSecurityFlags {
174    type Type = Self;
175}
176
177unsafe impl<'a> glib::value::FromValue<'a> for NM80211ApSecurityFlags {
178    type Checker = glib::value::GenericValueTypeChecker<Self>;
179
180    #[inline]
181    unsafe fn from_value(value: &'a glib::Value) -> Self {
182        skip_assert_initialized!();
183        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
184    }
185}
186
187impl ToValue for NM80211ApSecurityFlags {
188    #[inline]
189    fn to_value(&self) -> glib::Value {
190        let mut value = glib::Value::for_value_type::<Self>();
191        unsafe {
192            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
193        }
194        value
195    }
196
197    #[inline]
198    fn value_type(&self) -> glib::Type {
199        Self::static_type()
200    }
201}
202
203impl From<NM80211ApSecurityFlags> for glib::Value {
204    #[inline]
205    fn from(v: NM80211ApSecurityFlags) -> Self {
206        skip_assert_initialized!();
207        ToValue::to_value(&v)
208    }
209}
210
211#[cfg(feature = "v1_10")]
212bitflags! {
213    /// Flags describing the current activation state.
214    #[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
215    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
216    #[doc(alias = "NMActivationStateFlags")]
217    pub struct ActivationStateFlags: u32 {
218        /// an alias for numeric zero, no flags set.
219        #[doc(alias = "NM_ACTIVATION_STATE_FLAG_NONE")]
220        const NONE = ffi::NM_ACTIVATION_STATE_FLAG_NONE as _;
221        /// the device is a controller.
222        #[doc(alias = "NM_ACTIVATION_STATE_FLAG_IS_CONTROLLER")]
223        const IS_CONTROLLER = ffi::NM_ACTIVATION_STATE_FLAG_IS_CONTROLLER as _;
224        /// the device is a port.
225        #[doc(alias = "NM_ACTIVATION_STATE_FLAG_IS_PORT")]
226        const IS_PORT = ffi::NM_ACTIVATION_STATE_FLAG_IS_PORT as _;
227        /// layer2 is activated and ready.
228        #[doc(alias = "NM_ACTIVATION_STATE_FLAG_LAYER2_READY")]
229        const LAYER2_READY = ffi::NM_ACTIVATION_STATE_FLAG_LAYER2_READY as _;
230        /// IPv4 setting is completed.
231        #[doc(alias = "NM_ACTIVATION_STATE_FLAG_IP4_READY")]
232        const IP4_READY = ffi::NM_ACTIVATION_STATE_FLAG_IP4_READY as _;
233        /// IPv6 setting is completed.
234        #[doc(alias = "NM_ACTIVATION_STATE_FLAG_IP6_READY")]
235        const IP6_READY = ffi::NM_ACTIVATION_STATE_FLAG_IP6_READY as _;
236        /// The controller has any port devices attached.
237        ///   This only makes sense if the device is a controller.
238        #[doc(alias = "NM_ACTIVATION_STATE_FLAG_CONTROLLER_HAS_PORTS")]
239        const CONTROLLER_HAS_PORTS = ffi::NM_ACTIVATION_STATE_FLAG_CONTROLLER_HAS_PORTS as _;
240        /// the lifetime
241        ///   of the activation is bound to the visibility of the connection profile,
242        ///   which in turn depends on "connection.permissions" and whether a session
243        ///   for the user exists. Since: 1.16.
244        #[doc(alias = "NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY")]
245        const LIFETIME_BOUND_TO_PROFILE_VISIBILITY = ffi::NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY as _;
246        /// the active connection was generated to
247        ///  represent an external configuration of a networking device. Since: 1.26.
248        #[doc(alias = "NM_ACTIVATION_STATE_FLAG_EXTERNAL")]
249        const EXTERNAL = ffi::NM_ACTIVATION_STATE_FLAG_EXTERNAL as _;
250    }
251}
252
253#[cfg(feature = "v1_10")]
254#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
255#[doc(hidden)]
256impl IntoGlib for ActivationStateFlags {
257    type GlibType = ffi::NMActivationStateFlags;
258
259    #[inline]
260    fn into_glib(self) -> ffi::NMActivationStateFlags {
261        self.bits()
262    }
263}
264
265#[cfg(feature = "v1_10")]
266#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
267#[doc(hidden)]
268impl FromGlib<ffi::NMActivationStateFlags> for ActivationStateFlags {
269    #[inline]
270    unsafe fn from_glib(value: ffi::NMActivationStateFlags) -> Self {
271        skip_assert_initialized!();
272        Self::from_bits_truncate(value)
273    }
274}
275
276#[cfg(feature = "v1_10")]
277#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
278impl StaticType for ActivationStateFlags {
279    #[inline]
280    #[doc(alias = "nm_activation_state_flags_get_type")]
281    fn static_type() -> glib::Type {
282        unsafe { from_glib(ffi::nm_activation_state_flags_get_type()) }
283    }
284}
285
286#[cfg(feature = "v1_10")]
287#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
288impl glib::HasParamSpec for ActivationStateFlags {
289    type ParamSpec = glib::ParamSpecFlags;
290    type SetValue = Self;
291    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
292
293    fn param_spec_builder() -> Self::BuilderFn {
294        Self::ParamSpec::builder
295    }
296}
297
298#[cfg(feature = "v1_10")]
299#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
300impl glib::value::ValueType for ActivationStateFlags {
301    type Type = Self;
302}
303
304#[cfg(feature = "v1_10")]
305#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
306unsafe impl<'a> glib::value::FromValue<'a> for ActivationStateFlags {
307    type Checker = glib::value::GenericValueTypeChecker<Self>;
308
309    #[inline]
310    unsafe fn from_value(value: &'a glib::Value) -> Self {
311        skip_assert_initialized!();
312        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
313    }
314}
315
316#[cfg(feature = "v1_10")]
317#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
318impl ToValue for ActivationStateFlags {
319    #[inline]
320    fn to_value(&self) -> glib::Value {
321        let mut value = glib::Value::for_value_type::<Self>();
322        unsafe {
323            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
324        }
325        value
326    }
327
328    #[inline]
329    fn value_type(&self) -> glib::Type {
330        Self::static_type()
331    }
332}
333
334#[cfg(feature = "v1_10")]
335#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
336impl From<ActivationStateFlags> for glib::Value {
337    #[inline]
338    fn from(v: ActivationStateFlags) -> Self {
339        skip_assert_initialized!();
340        ToValue::to_value(&v)
341    }
342}
343
344bitflags! {
345    /// #NMBluetoothCapabilities values indicate the usable capabilities of a
346    /// Bluetooth device.
347    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
348    #[doc(alias = "NMBluetoothCapabilities")]
349    pub struct BluetoothCapabilities: u32 {
350        /// device has no usable capabilities
351        #[doc(alias = "NM_BT_CAPABILITY_NONE")]
352        const NONE = ffi::NM_BT_CAPABILITY_NONE as _;
353        /// device provides Dial-Up Networking capability
354        #[doc(alias = "NM_BT_CAPABILITY_DUN")]
355        const DUN = ffi::NM_BT_CAPABILITY_DUN as _;
356        /// device provides Network Access Point capability
357        #[doc(alias = "NM_BT_CAPABILITY_NAP")]
358        const NAP = ffi::NM_BT_CAPABILITY_NAP as _;
359    }
360}
361
362#[doc(hidden)]
363impl IntoGlib for BluetoothCapabilities {
364    type GlibType = ffi::NMBluetoothCapabilities;
365
366    #[inline]
367    fn into_glib(self) -> ffi::NMBluetoothCapabilities {
368        self.bits()
369    }
370}
371
372#[doc(hidden)]
373impl FromGlib<ffi::NMBluetoothCapabilities> for BluetoothCapabilities {
374    #[inline]
375    unsafe fn from_glib(value: ffi::NMBluetoothCapabilities) -> Self {
376        skip_assert_initialized!();
377        Self::from_bits_truncate(value)
378    }
379}
380
381impl StaticType for BluetoothCapabilities {
382    #[inline]
383    #[doc(alias = "nm_bluetooth_capabilities_get_type")]
384    fn static_type() -> glib::Type {
385        unsafe { from_glib(ffi::nm_bluetooth_capabilities_get_type()) }
386    }
387}
388
389impl glib::HasParamSpec for BluetoothCapabilities {
390    type ParamSpec = glib::ParamSpecFlags;
391    type SetValue = Self;
392    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
393
394    fn param_spec_builder() -> Self::BuilderFn {
395        Self::ParamSpec::builder
396    }
397}
398
399impl glib::value::ValueType for BluetoothCapabilities {
400    type Type = Self;
401}
402
403unsafe impl<'a> glib::value::FromValue<'a> for BluetoothCapabilities {
404    type Checker = glib::value::GenericValueTypeChecker<Self>;
405
406    #[inline]
407    unsafe fn from_value(value: &'a glib::Value) -> Self {
408        skip_assert_initialized!();
409        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
410    }
411}
412
413impl ToValue for BluetoothCapabilities {
414    #[inline]
415    fn to_value(&self) -> glib::Value {
416        let mut value = glib::Value::for_value_type::<Self>();
417        unsafe {
418            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
419        }
420        value
421    }
422
423    #[inline]
424    fn value_type(&self) -> glib::Type {
425        Self::static_type()
426    }
427}
428
429impl From<BluetoothCapabilities> for glib::Value {
430    #[inline]
431    fn from(v: BluetoothCapabilities) -> Self {
432        skip_assert_initialized!();
433        ToValue::to_value(&v)
434    }
435}
436
437#[cfg(feature = "v1_12")]
438bitflags! {
439    /// The flags for CheckpointCreate call
440    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
441    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
442    #[doc(alias = "NMCheckpointCreateFlags")]
443    pub struct CheckpointCreateFlags: u32 {
444        /// no flags
445        #[doc(alias = "NM_CHECKPOINT_CREATE_FLAG_NONE")]
446        const NONE = ffi::NM_CHECKPOINT_CREATE_FLAG_NONE as _;
447        /// when creating
448        ///   a new checkpoint, destroy all existing ones.
449        #[doc(alias = "NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL")]
450        const DESTROY_ALL = ffi::NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL as _;
451        /// upon rollback,
452        ///   delete any new connection added after the checkpoint. Since: 1.6.
453        #[doc(alias = "NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS")]
454        const DELETE_NEW_CONNECTIONS = ffi::NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS as _;
455        /// upon rollback,
456        ///   disconnect any new device appeared after the checkpoint. Since: 1.6.
457        #[doc(alias = "NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES")]
458        const DISCONNECT_NEW_DEVICES = ffi::NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES as _;
459        /// by default, creating
460        ///   a checkpoint fails if there are already existing checkpoints that
461        ///   reference the same devices. With this flag, creation of such
462        ///   checkpoints is allowed, however, if an older checkpoint
463        ///   that references overlapping devices gets rolled back, it will
464        ///   automatically destroy this checkpoint during rollback. This
465        ///   allows one to create several overlapping checkpoints in parallel,
466        ///   and rollback to them at will. With the special case that
467        ///   rolling back to an older checkpoint will invalidate all
468        ///   overlapping younger checkpoints. This opts-in that the
469        ///   checkpoint can be automatically destroyed by the rollback
470        ///   of an older checkpoint. Since: 1.12.
471        #[doc(alias = "NM_CHECKPOINT_CREATE_FLAG_ALLOW_OVERLAPPING")]
472        const ALLOW_OVERLAPPING = ffi::NM_CHECKPOINT_CREATE_FLAG_ALLOW_OVERLAPPING as _;
473        /// during rollback,
474        ///   by default externally added ports attached to bridge devices are preserved.
475        ///   With this flag, the rollback detaches all external ports.
476        ///   This only has an effect for bridge ports. Before 1.38, this was the default
477        ///   behavior. Since: 1.38.
478        #[doc(alias = "NM_CHECKPOINT_CREATE_FLAG_NO_PRESERVE_EXTERNAL_PORTS")]
479        const NO_PRESERVE_EXTERNAL_PORTS = ffi::NM_CHECKPOINT_CREATE_FLAG_NO_PRESERVE_EXTERNAL_PORTS as _;
480        /// during rollback,
481        ///   by default changes to global DNS via D-BUS interface are preserved.
482        ///   With this flag, the rollback reverts the global DNS changes made via D-Bus
483        ///   interface. Global DNS defined in [global-dns] section of
484        ///   NetworkManager.conf is not impacted by this flag. Since: 1.48.
485        #[doc(alias = "NM_CHECKPOINT_CREATE_FLAG_TRACK_INTERNAL_GLOBAL_DNS")]
486        const TRACK_INTERNAL_GLOBAL_DNS = ffi::NM_CHECKPOINT_CREATE_FLAG_TRACK_INTERNAL_GLOBAL_DNS as _;
487    }
488}
489
490#[cfg(feature = "v1_12")]
491#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
492#[doc(hidden)]
493impl IntoGlib for CheckpointCreateFlags {
494    type GlibType = ffi::NMCheckpointCreateFlags;
495
496    #[inline]
497    fn into_glib(self) -> ffi::NMCheckpointCreateFlags {
498        self.bits()
499    }
500}
501
502#[cfg(feature = "v1_12")]
503#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
504#[doc(hidden)]
505impl FromGlib<ffi::NMCheckpointCreateFlags> for CheckpointCreateFlags {
506    #[inline]
507    unsafe fn from_glib(value: ffi::NMCheckpointCreateFlags) -> Self {
508        skip_assert_initialized!();
509        Self::from_bits_truncate(value)
510    }
511}
512
513#[cfg(feature = "v1_12")]
514#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
515impl StaticType for CheckpointCreateFlags {
516    #[inline]
517    #[doc(alias = "nm_checkpoint_create_flags_get_type")]
518    fn static_type() -> glib::Type {
519        unsafe { from_glib(ffi::nm_checkpoint_create_flags_get_type()) }
520    }
521}
522
523#[cfg(feature = "v1_12")]
524#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
525impl glib::HasParamSpec for CheckpointCreateFlags {
526    type ParamSpec = glib::ParamSpecFlags;
527    type SetValue = Self;
528    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
529
530    fn param_spec_builder() -> Self::BuilderFn {
531        Self::ParamSpec::builder
532    }
533}
534
535#[cfg(feature = "v1_12")]
536#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
537impl glib::value::ValueType for CheckpointCreateFlags {
538    type Type = Self;
539}
540
541#[cfg(feature = "v1_12")]
542#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
543unsafe impl<'a> glib::value::FromValue<'a> for CheckpointCreateFlags {
544    type Checker = glib::value::GenericValueTypeChecker<Self>;
545
546    #[inline]
547    unsafe fn from_value(value: &'a glib::Value) -> Self {
548        skip_assert_initialized!();
549        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
550    }
551}
552
553#[cfg(feature = "v1_12")]
554#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
555impl ToValue for CheckpointCreateFlags {
556    #[inline]
557    fn to_value(&self) -> glib::Value {
558        let mut value = glib::Value::for_value_type::<Self>();
559        unsafe {
560            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
561        }
562        value
563    }
564
565    #[inline]
566    fn value_type(&self) -> glib::Type {
567        Self::static_type()
568    }
569}
570
571#[cfg(feature = "v1_12")]
572#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
573impl From<CheckpointCreateFlags> for glib::Value {
574    #[inline]
575    fn from(v: CheckpointCreateFlags) -> Self {
576        skip_assert_initialized!();
577        ToValue::to_value(&v)
578    }
579}
580
581#[cfg(feature = "v1_24")]
582bitflags! {
583    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
584    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
585    #[doc(alias = "NMClientInstanceFlags")]
586    pub struct ClientInstanceFlags: u32 {
587        /// special value to indicate no flags.
588        #[doc(alias = "NM_CLIENT_INSTANCE_FLAGS_NONE")]
589        const NONE = ffi::NM_CLIENT_INSTANCE_FLAGS_NONE as _;
590        /// by default, NMClient
591        ///   will fetch the permissions via "GetPermissions" and refetch them when
592        ///   "CheckPermissions" signal gets received. By setting this flag, this behavior
593        ///   can be disabled. You can toggle this flag to enable and disable automatic
594        ///   fetching of the permissions. Watch also nm_client_get_permissions_state()
595        ///   to know whether the permissions are up to date.
596        #[doc(alias = "NM_CLIENT_INSTANCE_FLAGS_NO_AUTO_FETCH_PERMISSIONS")]
597        const NO_AUTO_FETCH_PERMISSIONS = ffi::NM_CLIENT_INSTANCE_FLAGS_NO_AUTO_FETCH_PERMISSIONS as _;
598        /// as #NMClient is an GInitable
599        ///   and GAsyncInitable, nm_client_get_instance_flags() returns this flag
600        ///   once initialization completed with success. This flag cannot be set
601        ///   as NM_CLIENT_INSTANCE_FLAGS property. Since: 1.42.
602        #[doc(alias = "NM_CLIENT_INSTANCE_FLAGS_INITIALIZED_GOOD")]
603        const INITIALIZED_GOOD = ffi::NM_CLIENT_INSTANCE_FLAGS_INITIALIZED_GOOD as _;
604        /// like @NM_CLIENT_INSTANCE_FLAGS_INITIALIZED_GOOD
605        ///   indicates that the instance completed initialization with failure. In that
606        ///   case the instance is unusable. Since: 1.42.
607        #[doc(alias = "NM_CLIENT_INSTANCE_FLAGS_INITIALIZED_BAD")]
608        const INITIALIZED_BAD = ffi::NM_CLIENT_INSTANCE_FLAGS_INITIALIZED_BAD as _;
609    }
610}
611
612#[cfg(feature = "v1_24")]
613#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
614#[doc(hidden)]
615impl IntoGlib for ClientInstanceFlags {
616    type GlibType = ffi::NMClientInstanceFlags;
617
618    #[inline]
619    fn into_glib(self) -> ffi::NMClientInstanceFlags {
620        self.bits()
621    }
622}
623
624#[cfg(feature = "v1_24")]
625#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
626#[doc(hidden)]
627impl FromGlib<ffi::NMClientInstanceFlags> for ClientInstanceFlags {
628    #[inline]
629    unsafe fn from_glib(value: ffi::NMClientInstanceFlags) -> Self {
630        skip_assert_initialized!();
631        Self::from_bits_truncate(value)
632    }
633}
634
635#[cfg(feature = "v1_24")]
636#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
637impl StaticType for ClientInstanceFlags {
638    #[inline]
639    #[doc(alias = "nm_client_instance_flags_get_type")]
640    fn static_type() -> glib::Type {
641        unsafe { from_glib(ffi::nm_client_instance_flags_get_type()) }
642    }
643}
644
645#[cfg(feature = "v1_24")]
646#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
647impl glib::HasParamSpec for ClientInstanceFlags {
648    type ParamSpec = glib::ParamSpecFlags;
649    type SetValue = Self;
650    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
651
652    fn param_spec_builder() -> Self::BuilderFn {
653        Self::ParamSpec::builder
654    }
655}
656
657#[cfg(feature = "v1_24")]
658#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
659impl glib::value::ValueType for ClientInstanceFlags {
660    type Type = Self;
661}
662
663#[cfg(feature = "v1_24")]
664#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
665unsafe impl<'a> glib::value::FromValue<'a> for ClientInstanceFlags {
666    type Checker = glib::value::GenericValueTypeChecker<Self>;
667
668    #[inline]
669    unsafe fn from_value(value: &'a glib::Value) -> Self {
670        skip_assert_initialized!();
671        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
672    }
673}
674
675#[cfg(feature = "v1_24")]
676#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
677impl ToValue for ClientInstanceFlags {
678    #[inline]
679    fn to_value(&self) -> glib::Value {
680        let mut value = glib::Value::for_value_type::<Self>();
681        unsafe {
682            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
683        }
684        value
685    }
686
687    #[inline]
688    fn value_type(&self) -> glib::Type {
689        Self::static_type()
690    }
691}
692
693#[cfg(feature = "v1_24")]
694#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
695impl From<ClientInstanceFlags> for glib::Value {
696    #[inline]
697    fn from(v: ClientInstanceFlags) -> Self {
698        skip_assert_initialized!();
699        ToValue::to_value(&v)
700    }
701}
702
703bitflags! {
704    /// These flags determine which properties are serialized when calling
705    /// nm_connection_to_dbus().
706    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
707    #[doc(alias = "NMConnectionSerializationFlags")]
708    pub struct ConnectionSerializationFlags: u32 {
709        /// serialize all properties (including secrets)
710        #[doc(alias = "NM_CONNECTION_SERIALIZE_ALL")]
711        const ALL = ffi::NM_CONNECTION_SERIALIZE_ALL as _;
712        /// serialize properties that are
713        ///   not secrets. Since 1.32.
714        #[doc(alias = "NM_CONNECTION_SERIALIZE_WITH_NON_SECRET")]
715        const WITH_NON_SECRET = ffi::NM_CONNECTION_SERIALIZE_WITH_NON_SECRET as _;
716        /// this is a deprecated alias for
717        ///   @NM_CONNECTION_SERIALIZE_WITH_NON_SECRET.
718        #[doc(alias = "NM_CONNECTION_SERIALIZE_NO_SECRETS")]
719        const NO_SECRETS = ffi::NM_CONNECTION_SERIALIZE_NO_SECRETS as _;
720        /// serialize all secrets. This flag is
721        ///   ignored if any of @NM_CONNECTION_SERIALIZE_WITH_SECRETS_AGENT_OWNED,
722        ///   @NM_CONNECTION_SERIALIZE_WITH_SECRETS_SYSTEM_OWNED or
723        ///   @NM_CONNECTION_SERIALIZE_WITH_SECRETS_NOT_SAVED is set. Since 1.32.
724        #[doc(alias = "NM_CONNECTION_SERIALIZE_WITH_SECRETS")]
725        const WITH_SECRETS = ffi::NM_CONNECTION_SERIALIZE_WITH_SECRETS as _;
726        /// a deprecated alias for
727        ///   @NM_CONNECTION_SERIALIZE_WITH_SECRETS.
728        #[doc(alias = "NM_CONNECTION_SERIALIZE_ONLY_SECRETS")]
729        const ONLY_SECRETS = ffi::NM_CONNECTION_SERIALIZE_ONLY_SECRETS as _;
730        /// serialize agent-owned
731        ///   secrets. Since: 1.20.
732        #[doc(alias = "NM_CONNECTION_SERIALIZE_WITH_SECRETS_AGENT_OWNED")]
733        const WITH_SECRETS_AGENT_OWNED = ffi::NM_CONNECTION_SERIALIZE_WITH_SECRETS_AGENT_OWNED as _;
734        /// serialize system-owned
735        ///   secrets. Since: 1.32.
736        #[doc(alias = "NM_CONNECTION_SERIALIZE_WITH_SECRETS_SYSTEM_OWNED")]
737        const WITH_SECRETS_SYSTEM_OWNED = ffi::NM_CONNECTION_SERIALIZE_WITH_SECRETS_SYSTEM_OWNED as _;
738        /// serialize secrets that
739        ///   are marked as never saved. Since: 1.32.
740        #[doc(alias = "NM_CONNECTION_SERIALIZE_WITH_SECRETS_NOT_SAVED")]
741        const WITH_SECRETS_NOT_SAVED = ffi::NM_CONNECTION_SERIALIZE_WITH_SECRETS_NOT_SAVED as _;
742    }
743}
744
745#[doc(hidden)]
746impl IntoGlib for ConnectionSerializationFlags {
747    type GlibType = ffi::NMConnectionSerializationFlags;
748
749    #[inline]
750    fn into_glib(self) -> ffi::NMConnectionSerializationFlags {
751        self.bits()
752    }
753}
754
755#[doc(hidden)]
756impl FromGlib<ffi::NMConnectionSerializationFlags> for ConnectionSerializationFlags {
757    #[inline]
758    unsafe fn from_glib(value: ffi::NMConnectionSerializationFlags) -> Self {
759        skip_assert_initialized!();
760        Self::from_bits_truncate(value)
761    }
762}
763
764impl StaticType for ConnectionSerializationFlags {
765    #[inline]
766    #[doc(alias = "nm_connection_serialization_flags_get_type")]
767    fn static_type() -> glib::Type {
768        unsafe { from_glib(ffi::nm_connection_serialization_flags_get_type()) }
769    }
770}
771
772impl glib::HasParamSpec for ConnectionSerializationFlags {
773    type ParamSpec = glib::ParamSpecFlags;
774    type SetValue = Self;
775    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
776
777    fn param_spec_builder() -> Self::BuilderFn {
778        Self::ParamSpec::builder
779    }
780}
781
782impl glib::value::ValueType for ConnectionSerializationFlags {
783    type Type = Self;
784}
785
786unsafe impl<'a> glib::value::FromValue<'a> for ConnectionSerializationFlags {
787    type Checker = glib::value::GenericValueTypeChecker<Self>;
788
789    #[inline]
790    unsafe fn from_value(value: &'a glib::Value) -> Self {
791        skip_assert_initialized!();
792        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
793    }
794}
795
796impl ToValue for ConnectionSerializationFlags {
797    #[inline]
798    fn to_value(&self) -> glib::Value {
799        let mut value = glib::Value::for_value_type::<Self>();
800        unsafe {
801            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
802        }
803        value
804    }
805
806    #[inline]
807    fn value_type(&self) -> glib::Type {
808        Self::static_type()
809    }
810}
811
812impl From<ConnectionSerializationFlags> for glib::Value {
813    #[inline]
814    fn from(v: ConnectionSerializationFlags) -> Self {
815        skip_assert_initialized!();
816        ToValue::to_value(&v)
817    }
818}
819
820bitflags! {
821    /// General device capability flags.
822    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
823    #[doc(alias = "NMDeviceCapabilities")]
824    pub struct DeviceCapabilities: u32 {
825        /// device has no special capabilities
826        #[doc(alias = "NM_DEVICE_CAP_NONE")]
827        const NONE = ffi::NM_DEVICE_CAP_NONE as _;
828        /// NetworkManager supports this device
829        #[doc(alias = "NM_DEVICE_CAP_NM_SUPPORTED")]
830        const NM_SUPPORTED = ffi::NM_DEVICE_CAP_NM_SUPPORTED as _;
831        /// this device can indicate carrier status
832        #[doc(alias = "NM_DEVICE_CAP_CARRIER_DETECT")]
833        const CARRIER_DETECT = ffi::NM_DEVICE_CAP_CARRIER_DETECT as _;
834        /// this device is a software device
835        #[doc(alias = "NM_DEVICE_CAP_IS_SOFTWARE")]
836        const IS_SOFTWARE = ffi::NM_DEVICE_CAP_IS_SOFTWARE as _;
837        /// this device supports single-root I/O virtualization
838        #[doc(alias = "NM_DEVICE_CAP_SRIOV")]
839        const SRIOV = ffi::NM_DEVICE_CAP_SRIOV as _;
840    }
841}
842
843#[doc(hidden)]
844impl IntoGlib for DeviceCapabilities {
845    type GlibType = ffi::NMDeviceCapabilities;
846
847    #[inline]
848    fn into_glib(self) -> ffi::NMDeviceCapabilities {
849        self.bits()
850    }
851}
852
853#[doc(hidden)]
854impl FromGlib<ffi::NMDeviceCapabilities> for DeviceCapabilities {
855    #[inline]
856    unsafe fn from_glib(value: ffi::NMDeviceCapabilities) -> Self {
857        skip_assert_initialized!();
858        Self::from_bits_truncate(value)
859    }
860}
861
862impl StaticType for DeviceCapabilities {
863    #[inline]
864    #[doc(alias = "nm_device_capabilities_get_type")]
865    fn static_type() -> glib::Type {
866        unsafe { from_glib(ffi::nm_device_capabilities_get_type()) }
867    }
868}
869
870impl glib::HasParamSpec for DeviceCapabilities {
871    type ParamSpec = glib::ParamSpecFlags;
872    type SetValue = Self;
873    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
874
875    fn param_spec_builder() -> Self::BuilderFn {
876        Self::ParamSpec::builder
877    }
878}
879
880impl glib::value::ValueType for DeviceCapabilities {
881    type Type = Self;
882}
883
884unsafe impl<'a> glib::value::FromValue<'a> for DeviceCapabilities {
885    type Checker = glib::value::GenericValueTypeChecker<Self>;
886
887    #[inline]
888    unsafe fn from_value(value: &'a glib::Value) -> Self {
889        skip_assert_initialized!();
890        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
891    }
892}
893
894impl ToValue for DeviceCapabilities {
895    #[inline]
896    fn to_value(&self) -> glib::Value {
897        let mut value = glib::Value::for_value_type::<Self>();
898        unsafe {
899            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
900        }
901        value
902    }
903
904    #[inline]
905    fn value_type(&self) -> glib::Type {
906        Self::static_type()
907    }
908}
909
910impl From<DeviceCapabilities> for glib::Value {
911    #[inline]
912    fn from(v: DeviceCapabilities) -> Self {
913        skip_assert_initialized!();
914        ToValue::to_value(&v)
915    }
916}
917
918#[cfg(feature = "v1_22")]
919bitflags! {
920    /// Flags for a network interface.
921    #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
922    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
923    #[doc(alias = "NMDeviceInterfaceFlags")]
924    pub struct DeviceInterfaceFlags: u32 {
925        /// the interface is enabled from the
926        ///   administrative point of view. Corresponds to kernel IFF_UP.
927        #[doc(alias = "NM_DEVICE_INTERFACE_FLAG_UP")]
928        const UP = ffi::NM_DEVICE_INTERFACE_FLAG_UP as _;
929        /// the physical link is up. Corresponds
930        ///   to kernel IFF_LOWER_UP.
931        #[doc(alias = "NM_DEVICE_INTERFACE_FLAG_LOWER_UP")]
932        const LOWER_UP = ffi::NM_DEVICE_INTERFACE_FLAG_LOWER_UP as _;
933        /// receive all packets. Corresponds to
934        ///   kernel IFF_PROMISC. Since: 1.32.
935        #[doc(alias = "NM_DEVICE_INTERFACE_FLAG_PROMISC")]
936        const PROMISC = ffi::NM_DEVICE_INTERFACE_FLAG_PROMISC as _;
937        /// the interface has carrier. In most
938        ///   cases this is equal to the value of @NM_DEVICE_INTERFACE_FLAG_LOWER_UP.
939        ///   However some devices have a non-standard carrier detection mechanism.
940        #[doc(alias = "NM_DEVICE_INTERFACE_FLAG_CARRIER")]
941        const CARRIER = ffi::NM_DEVICE_INTERFACE_FLAG_CARRIER as _;
942        /// the flag to indicate device
943        ///   LLDP status. Since: 1.32.
944        #[doc(alias = "NM_DEVICE_INTERFACE_FLAG_LLDP_CLIENT_ENABLED")]
945        const LLDP_CLIENT_ENABLED = ffi::NM_DEVICE_INTERFACE_FLAG_LLDP_CLIENT_ENABLED as _;
946    }
947}
948
949#[cfg(feature = "v1_22")]
950#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
951#[doc(hidden)]
952impl IntoGlib for DeviceInterfaceFlags {
953    type GlibType = ffi::NMDeviceInterfaceFlags;
954
955    #[inline]
956    fn into_glib(self) -> ffi::NMDeviceInterfaceFlags {
957        self.bits()
958    }
959}
960
961#[cfg(feature = "v1_22")]
962#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
963#[doc(hidden)]
964impl FromGlib<ffi::NMDeviceInterfaceFlags> for DeviceInterfaceFlags {
965    #[inline]
966    unsafe fn from_glib(value: ffi::NMDeviceInterfaceFlags) -> Self {
967        skip_assert_initialized!();
968        Self::from_bits_truncate(value)
969    }
970}
971
972#[cfg(feature = "v1_22")]
973#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
974impl StaticType for DeviceInterfaceFlags {
975    #[inline]
976    #[doc(alias = "nm_device_interface_flags_get_type")]
977    fn static_type() -> glib::Type {
978        unsafe { from_glib(ffi::nm_device_interface_flags_get_type()) }
979    }
980}
981
982#[cfg(feature = "v1_22")]
983#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
984impl glib::HasParamSpec for DeviceInterfaceFlags {
985    type ParamSpec = glib::ParamSpecFlags;
986    type SetValue = Self;
987    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
988
989    fn param_spec_builder() -> Self::BuilderFn {
990        Self::ParamSpec::builder
991    }
992}
993
994#[cfg(feature = "v1_22")]
995#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
996impl glib::value::ValueType for DeviceInterfaceFlags {
997    type Type = Self;
998}
999
1000#[cfg(feature = "v1_22")]
1001#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1002unsafe impl<'a> glib::value::FromValue<'a> for DeviceInterfaceFlags {
1003    type Checker = glib::value::GenericValueTypeChecker<Self>;
1004
1005    #[inline]
1006    unsafe fn from_value(value: &'a glib::Value) -> Self {
1007        skip_assert_initialized!();
1008        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
1009    }
1010}
1011
1012#[cfg(feature = "v1_22")]
1013#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1014impl ToValue for DeviceInterfaceFlags {
1015    #[inline]
1016    fn to_value(&self) -> glib::Value {
1017        let mut value = glib::Value::for_value_type::<Self>();
1018        unsafe {
1019            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1020        }
1021        value
1022    }
1023
1024    #[inline]
1025    fn value_type(&self) -> glib::Type {
1026        Self::static_type()
1027    }
1028}
1029
1030#[cfg(feature = "v1_22")]
1031#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1032impl From<DeviceInterfaceFlags> for glib::Value {
1033    #[inline]
1034    fn from(v: DeviceInterfaceFlags) -> Self {
1035        skip_assert_initialized!();
1036        ToValue::to_value(&v)
1037    }
1038}
1039
1040bitflags! {
1041    /// #NMDeviceModemCapabilities values indicate the generic radio access
1042    /// technology families a modem device supports.  For more information on the
1043    /// specific access technologies the device supports use the ModemManager D-Bus
1044    /// API.
1045    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1046    #[doc(alias = "NMDeviceModemCapabilities")]
1047    pub struct DeviceModemCapabilities: u32 {
1048        /// modem has no usable capabilities
1049        #[doc(alias = "NM_DEVICE_MODEM_CAPABILITY_NONE")]
1050        const NONE = ffi::NM_DEVICE_MODEM_CAPABILITY_NONE as _;
1051        /// modem uses the analog wired telephone
1052        /// network and is not a wireless/cellular device
1053        #[doc(alias = "NM_DEVICE_MODEM_CAPABILITY_POTS")]
1054        const POTS = ffi::NM_DEVICE_MODEM_CAPABILITY_POTS as _;
1055        /// modem supports at least one of CDMA
1056        /// 1xRTT, EVDO revision 0, EVDO revision A, or EVDO revision B
1057        #[doc(alias = "NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO")]
1058        const CDMA_EVDO = ffi::NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO as _;
1059        /// modem supports at least one of GSM,
1060        /// GPRS, EDGE, UMTS, HSDPA, HSUPA, or HSPA+ packet switched data capability
1061        #[doc(alias = "NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS")]
1062        const GSM_UMTS = ffi::NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS as _;
1063        /// modem has LTE data capability
1064        #[doc(alias = "NM_DEVICE_MODEM_CAPABILITY_LTE")]
1065        const LTE = ffi::NM_DEVICE_MODEM_CAPABILITY_LTE as _;
1066        /// modem has 5GNR data capability. Since: 1.36.
1067        #[doc(alias = "NM_DEVICE_MODEM_CAPABILITY_5GNR")]
1068        const _5GNR = ffi::NM_DEVICE_MODEM_CAPABILITY_5GNR as _;
1069    }
1070}
1071
1072#[doc(hidden)]
1073impl IntoGlib for DeviceModemCapabilities {
1074    type GlibType = ffi::NMDeviceModemCapabilities;
1075
1076    #[inline]
1077    fn into_glib(self) -> ffi::NMDeviceModemCapabilities {
1078        self.bits()
1079    }
1080}
1081
1082#[doc(hidden)]
1083impl FromGlib<ffi::NMDeviceModemCapabilities> for DeviceModemCapabilities {
1084    #[inline]
1085    unsafe fn from_glib(value: ffi::NMDeviceModemCapabilities) -> Self {
1086        skip_assert_initialized!();
1087        Self::from_bits_truncate(value)
1088    }
1089}
1090
1091impl StaticType for DeviceModemCapabilities {
1092    #[inline]
1093    #[doc(alias = "nm_device_modem_capabilities_get_type")]
1094    fn static_type() -> glib::Type {
1095        unsafe { from_glib(ffi::nm_device_modem_capabilities_get_type()) }
1096    }
1097}
1098
1099impl glib::HasParamSpec for DeviceModemCapabilities {
1100    type ParamSpec = glib::ParamSpecFlags;
1101    type SetValue = Self;
1102    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1103
1104    fn param_spec_builder() -> Self::BuilderFn {
1105        Self::ParamSpec::builder
1106    }
1107}
1108
1109impl glib::value::ValueType for DeviceModemCapabilities {
1110    type Type = Self;
1111}
1112
1113unsafe impl<'a> glib::value::FromValue<'a> for DeviceModemCapabilities {
1114    type Checker = glib::value::GenericValueTypeChecker<Self>;
1115
1116    #[inline]
1117    unsafe fn from_value(value: &'a glib::Value) -> Self {
1118        skip_assert_initialized!();
1119        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
1120    }
1121}
1122
1123impl ToValue for DeviceModemCapabilities {
1124    #[inline]
1125    fn to_value(&self) -> glib::Value {
1126        let mut value = glib::Value::for_value_type::<Self>();
1127        unsafe {
1128            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1129        }
1130        value
1131    }
1132
1133    #[inline]
1134    fn value_type(&self) -> glib::Type {
1135        Self::static_type()
1136    }
1137}
1138
1139impl From<DeviceModemCapabilities> for glib::Value {
1140    #[inline]
1141    fn from(v: DeviceModemCapabilities) -> Self {
1142        skip_assert_initialized!();
1143        ToValue::to_value(&v)
1144    }
1145}
1146
1147#[cfg(feature = "v1_42")]
1148bitflags! {
1149    /// Flags for the Reapply() D-Bus call of a device and
1150    /// nm_device_reapply_async().
1151    #[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
1152    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1153    #[doc(alias = "NMDeviceReapplyFlags")]
1154    pub struct DeviceReapplyFlags: u32 {
1155        /// no flag set.
1156        #[doc(alias = "NM_DEVICE_REAPPLY_FLAGS_NONE")]
1157        const NONE = ffi::NM_DEVICE_REAPPLY_FLAGS_NONE as _;
1158        /// during reapply,
1159        ///   preserve external IP addresses and routes.
1160        #[doc(alias = "NM_DEVICE_REAPPLY_FLAGS_PRESERVE_EXTERNAL_IP")]
1161        const PRESERVE_EXTERNAL_IP = ffi::NM_DEVICE_REAPPLY_FLAGS_PRESERVE_EXTERNAL_IP as _;
1162    }
1163}
1164
1165#[cfg(feature = "v1_42")]
1166#[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
1167#[doc(hidden)]
1168impl IntoGlib for DeviceReapplyFlags {
1169    type GlibType = ffi::NMDeviceReapplyFlags;
1170
1171    #[inline]
1172    fn into_glib(self) -> ffi::NMDeviceReapplyFlags {
1173        self.bits()
1174    }
1175}
1176
1177#[cfg(feature = "v1_42")]
1178#[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
1179#[doc(hidden)]
1180impl FromGlib<ffi::NMDeviceReapplyFlags> for DeviceReapplyFlags {
1181    #[inline]
1182    unsafe fn from_glib(value: ffi::NMDeviceReapplyFlags) -> Self {
1183        skip_assert_initialized!();
1184        Self::from_bits_truncate(value)
1185    }
1186}
1187
1188#[cfg(feature = "v1_42")]
1189#[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
1190impl StaticType for DeviceReapplyFlags {
1191    #[inline]
1192    #[doc(alias = "nm_device_reapply_flags_get_type")]
1193    fn static_type() -> glib::Type {
1194        unsafe { from_glib(ffi::nm_device_reapply_flags_get_type()) }
1195    }
1196}
1197
1198#[cfg(feature = "v1_42")]
1199#[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
1200impl glib::HasParamSpec for DeviceReapplyFlags {
1201    type ParamSpec = glib::ParamSpecFlags;
1202    type SetValue = Self;
1203    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1204
1205    fn param_spec_builder() -> Self::BuilderFn {
1206        Self::ParamSpec::builder
1207    }
1208}
1209
1210#[cfg(feature = "v1_42")]
1211#[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
1212impl glib::value::ValueType for DeviceReapplyFlags {
1213    type Type = Self;
1214}
1215
1216#[cfg(feature = "v1_42")]
1217#[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
1218unsafe impl<'a> glib::value::FromValue<'a> for DeviceReapplyFlags {
1219    type Checker = glib::value::GenericValueTypeChecker<Self>;
1220
1221    #[inline]
1222    unsafe fn from_value(value: &'a glib::Value) -> Self {
1223        skip_assert_initialized!();
1224        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
1225    }
1226}
1227
1228#[cfg(feature = "v1_42")]
1229#[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
1230impl ToValue for DeviceReapplyFlags {
1231    #[inline]
1232    fn to_value(&self) -> glib::Value {
1233        let mut value = glib::Value::for_value_type::<Self>();
1234        unsafe {
1235            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1236        }
1237        value
1238    }
1239
1240    #[inline]
1241    fn value_type(&self) -> glib::Type {
1242        Self::static_type()
1243    }
1244}
1245
1246#[cfg(feature = "v1_42")]
1247#[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
1248impl From<DeviceReapplyFlags> for glib::Value {
1249    #[inline]
1250    fn from(v: DeviceReapplyFlags) -> Self {
1251        skip_assert_initialized!();
1252        ToValue::to_value(&v)
1253    }
1254}
1255
1256bitflags! {
1257    /// 802.11 specific device encryption and authentication capabilities.
1258    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1259    #[doc(alias = "NMDeviceWifiCapabilities")]
1260    pub struct DeviceWifiCapabilities: u32 {
1261        /// device has no encryption/authentication capabilities
1262        #[doc(alias = "NM_WIFI_DEVICE_CAP_NONE")]
1263        const NONE = ffi::NM_WIFI_DEVICE_CAP_NONE as _;
1264        /// device supports 40/64-bit WEP encryption
1265        #[doc(alias = "NM_WIFI_DEVICE_CAP_CIPHER_WEP40")]
1266        const CIPHER_WEP40 = ffi::NM_WIFI_DEVICE_CAP_CIPHER_WEP40 as _;
1267        /// device supports 104/128-bit WEP encryption
1268        #[doc(alias = "NM_WIFI_DEVICE_CAP_CIPHER_WEP104")]
1269        const CIPHER_WEP104 = ffi::NM_WIFI_DEVICE_CAP_CIPHER_WEP104 as _;
1270        /// device supports TKIP encryption
1271        #[doc(alias = "NM_WIFI_DEVICE_CAP_CIPHER_TKIP")]
1272        const CIPHER_TKIP = ffi::NM_WIFI_DEVICE_CAP_CIPHER_TKIP as _;
1273        /// device supports AES/CCMP encryption
1274        #[doc(alias = "NM_WIFI_DEVICE_CAP_CIPHER_CCMP")]
1275        const CIPHER_CCMP = ffi::NM_WIFI_DEVICE_CAP_CIPHER_CCMP as _;
1276        /// device supports WPA1 authentication
1277        #[doc(alias = "NM_WIFI_DEVICE_CAP_WPA")]
1278        const WPA = ffi::NM_WIFI_DEVICE_CAP_WPA as _;
1279        /// device supports WPA2/RSN authentication
1280        #[doc(alias = "NM_WIFI_DEVICE_CAP_RSN")]
1281        const RSN = ffi::NM_WIFI_DEVICE_CAP_RSN as _;
1282        /// device supports Access Point mode
1283        #[doc(alias = "NM_WIFI_DEVICE_CAP_AP")]
1284        const AP = ffi::NM_WIFI_DEVICE_CAP_AP as _;
1285        /// device supports Ad-Hoc mode
1286        #[doc(alias = "NM_WIFI_DEVICE_CAP_ADHOC")]
1287        const ADHOC = ffi::NM_WIFI_DEVICE_CAP_ADHOC as _;
1288        /// device reports frequency capabilities
1289        #[doc(alias = "NM_WIFI_DEVICE_CAP_FREQ_VALID")]
1290        const FREQ_VALID = ffi::NM_WIFI_DEVICE_CAP_FREQ_VALID as _;
1291        /// device supports 2.4GHz frequencies
1292        #[doc(alias = "NM_WIFI_DEVICE_CAP_FREQ_2GHZ")]
1293        const FREQ_2GHZ = ffi::NM_WIFI_DEVICE_CAP_FREQ_2GHZ as _;
1294        /// device supports 5GHz frequencies
1295        #[doc(alias = "NM_WIFI_DEVICE_CAP_FREQ_5GHZ")]
1296        const FREQ_5GHZ = ffi::NM_WIFI_DEVICE_CAP_FREQ_5GHZ as _;
1297        /// device supports 6GHz frequencies. Since: 1.46.
1298        #[doc(alias = "NM_WIFI_DEVICE_CAP_FREQ_6GHZ")]
1299        const FREQ_6GHZ = ffi::NM_WIFI_DEVICE_CAP_FREQ_6GHZ as _;
1300        /// device supports acting as a mesh point. Since: 1.20.
1301        #[doc(alias = "NM_WIFI_DEVICE_CAP_MESH")]
1302        const MESH = ffi::NM_WIFI_DEVICE_CAP_MESH as _;
1303        /// device supports WPA2/RSN in an IBSS network. Since: 1.22.
1304        #[doc(alias = "NM_WIFI_DEVICE_CAP_IBSS_RSN")]
1305        const IBSS_RSN = ffi::NM_WIFI_DEVICE_CAP_IBSS_RSN as _;
1306    }
1307}
1308
1309#[doc(hidden)]
1310impl IntoGlib for DeviceWifiCapabilities {
1311    type GlibType = ffi::NMDeviceWifiCapabilities;
1312
1313    #[inline]
1314    fn into_glib(self) -> ffi::NMDeviceWifiCapabilities {
1315        self.bits()
1316    }
1317}
1318
1319#[doc(hidden)]
1320impl FromGlib<ffi::NMDeviceWifiCapabilities> for DeviceWifiCapabilities {
1321    #[inline]
1322    unsafe fn from_glib(value: ffi::NMDeviceWifiCapabilities) -> Self {
1323        skip_assert_initialized!();
1324        Self::from_bits_truncate(value)
1325    }
1326}
1327
1328impl StaticType for DeviceWifiCapabilities {
1329    #[inline]
1330    #[doc(alias = "nm_device_wifi_capabilities_get_type")]
1331    fn static_type() -> glib::Type {
1332        unsafe { from_glib(ffi::nm_device_wifi_capabilities_get_type()) }
1333    }
1334}
1335
1336impl glib::HasParamSpec for DeviceWifiCapabilities {
1337    type ParamSpec = glib::ParamSpecFlags;
1338    type SetValue = Self;
1339    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1340
1341    fn param_spec_builder() -> Self::BuilderFn {
1342        Self::ParamSpec::builder
1343    }
1344}
1345
1346impl glib::value::ValueType for DeviceWifiCapabilities {
1347    type Type = Self;
1348}
1349
1350unsafe impl<'a> glib::value::FromValue<'a> for DeviceWifiCapabilities {
1351    type Checker = glib::value::GenericValueTypeChecker<Self>;
1352
1353    #[inline]
1354    unsafe fn from_value(value: &'a glib::Value) -> Self {
1355        skip_assert_initialized!();
1356        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
1357    }
1358}
1359
1360impl ToValue for DeviceWifiCapabilities {
1361    #[inline]
1362    fn to_value(&self) -> glib::Value {
1363        let mut value = glib::Value::for_value_type::<Self>();
1364        unsafe {
1365            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1366        }
1367        value
1368    }
1369
1370    #[inline]
1371    fn value_type(&self) -> glib::Type {
1372        Self::static_type()
1373    }
1374}
1375
1376impl From<DeviceWifiCapabilities> for glib::Value {
1377    #[inline]
1378    fn from(v: DeviceWifiCapabilities) -> Self {
1379        skip_assert_initialized!();
1380        ToValue::to_value(&v)
1381    }
1382}
1383
1384#[cfg(feature = "v1_22")]
1385bitflags! {
1386    /// #NMDhcpHostnameFlags describe flags related to the DHCP hostname and
1387    /// FQDN.
1388    #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1389    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1390    #[doc(alias = "NMDhcpHostnameFlags")]
1391    pub struct DhcpHostnameFlags: u32 {
1392        /// no flag set. The default value from
1393        ///   Networkmanager global configuration is used. If such value is unset
1394        ///   or still zero, the DHCP request will use standard FQDN flags, i.e.
1395        ///   [`FQDN_SERV_UPDATE`][Self::FQDN_SERV_UPDATE] and
1396        ///   [`FQDN_ENCODED`][Self::FQDN_ENCODED] for IPv4 and
1397        ///   [`FQDN_SERV_UPDATE`][Self::FQDN_SERV_UPDATE] for IPv6.
1398        #[doc(alias = "NM_DHCP_HOSTNAME_FLAG_NONE")]
1399        const NONE = ffi::NM_DHCP_HOSTNAME_FLAG_NONE as _;
1400        /// whether the server should
1401        ///   do the A RR (FQDN-to-address) DNS updates.
1402        #[doc(alias = "NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE")]
1403        const FQDN_SERV_UPDATE = ffi::NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE as _;
1404        /// if set, the FQDN is encoded
1405        ///   using canonical wire format. Otherwise it uses the deprecated
1406        ///   ASCII encoding. This flag is allowed only for DHCPv4.
1407        #[doc(alias = "NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED")]
1408        const FQDN_ENCODED = ffi::NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED as _;
1409        /// when not set, request the
1410        ///   server to perform updates (the PTR RR and possibly the A RR
1411        ///   based on the [`FQDN_SERV_UPDATE`][Self::FQDN_SERV_UPDATE] flag). If
1412        ///   this is set, the [`FQDN_SERV_UPDATE`][Self::FQDN_SERV_UPDATE] flag
1413        ///   should be cleared.
1414        #[doc(alias = "NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE")]
1415        const FQDN_NO_UPDATE = ffi::NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE as _;
1416        /// when set, no FQDN flags are
1417        ///   sent in the DHCP FQDN option. When cleared and all other FQDN
1418        ///   flags are zero, standard FQDN flags are sent. This flag is
1419        ///   incompatible with any other FQDN flag.
1420        #[doc(alias = "NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS")]
1421        const FQDN_CLEAR_FLAGS = ffi::NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS as _;
1422    }
1423}
1424
1425#[cfg(feature = "v1_22")]
1426#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1427#[doc(hidden)]
1428impl IntoGlib for DhcpHostnameFlags {
1429    type GlibType = ffi::NMDhcpHostnameFlags;
1430
1431    #[inline]
1432    fn into_glib(self) -> ffi::NMDhcpHostnameFlags {
1433        self.bits()
1434    }
1435}
1436
1437#[cfg(feature = "v1_22")]
1438#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1439#[doc(hidden)]
1440impl FromGlib<ffi::NMDhcpHostnameFlags> for DhcpHostnameFlags {
1441    #[inline]
1442    unsafe fn from_glib(value: ffi::NMDhcpHostnameFlags) -> Self {
1443        skip_assert_initialized!();
1444        Self::from_bits_truncate(value)
1445    }
1446}
1447
1448#[cfg(feature = "v1_22")]
1449#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1450impl StaticType for DhcpHostnameFlags {
1451    #[inline]
1452    #[doc(alias = "nm_dhcp_hostname_flags_get_type")]
1453    fn static_type() -> glib::Type {
1454        unsafe { from_glib(ffi::nm_dhcp_hostname_flags_get_type()) }
1455    }
1456}
1457
1458#[cfg(feature = "v1_22")]
1459#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1460impl glib::HasParamSpec for DhcpHostnameFlags {
1461    type ParamSpec = glib::ParamSpecFlags;
1462    type SetValue = Self;
1463    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1464
1465    fn param_spec_builder() -> Self::BuilderFn {
1466        Self::ParamSpec::builder
1467    }
1468}
1469
1470#[cfg(feature = "v1_22")]
1471#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1472impl glib::value::ValueType for DhcpHostnameFlags {
1473    type Type = Self;
1474}
1475
1476#[cfg(feature = "v1_22")]
1477#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1478unsafe impl<'a> glib::value::FromValue<'a> for DhcpHostnameFlags {
1479    type Checker = glib::value::GenericValueTypeChecker<Self>;
1480
1481    #[inline]
1482    unsafe fn from_value(value: &'a glib::Value) -> Self {
1483        skip_assert_initialized!();
1484        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
1485    }
1486}
1487
1488#[cfg(feature = "v1_22")]
1489#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1490impl ToValue for DhcpHostnameFlags {
1491    #[inline]
1492    fn to_value(&self) -> glib::Value {
1493        let mut value = glib::Value::for_value_type::<Self>();
1494        unsafe {
1495            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1496        }
1497        value
1498    }
1499
1500    #[inline]
1501    fn value_type(&self) -> glib::Type {
1502        Self::static_type()
1503    }
1504}
1505
1506#[cfg(feature = "v1_22")]
1507#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1508impl From<DhcpHostnameFlags> for glib::Value {
1509    #[inline]
1510    fn from(v: DhcpHostnameFlags) -> Self {
1511        skip_assert_initialized!();
1512        ToValue::to_value(&v)
1513    }
1514}
1515
1516#[cfg(feature = "v1_22")]
1517bitflags! {
1518    /// Compare flags for nm_ip_address_cmp_full().
1519    #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1520    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1521    #[doc(alias = "NMIPAddressCmpFlags")]
1522    pub struct IPAddressCmpFlags: u32 {
1523        /// no flags.
1524        #[doc(alias = "NM_IP_ADDRESS_CMP_FLAGS_NONE")]
1525        const NONE = ffi::NM_IP_ADDRESS_CMP_FLAGS_NONE as _;
1526        /// when comparing two addresses,
1527        ///   also consider their attributes. Warning: note that attributes are GVariants
1528        ///   and they don't have a total order. In other words, if the address differs only
1529        ///   by their attributes, the returned compare order is not total. In that case,
1530        ///   the return value merely indicates equality (zero) or inequality.
1531        #[doc(alias = "NM_IP_ADDRESS_CMP_FLAGS_WITH_ATTRS")]
1532        const WITH_ATTRS = ffi::NM_IP_ADDRESS_CMP_FLAGS_WITH_ATTRS as _;
1533    }
1534}
1535
1536#[cfg(feature = "v1_22")]
1537#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1538#[doc(hidden)]
1539impl IntoGlib for IPAddressCmpFlags {
1540    type GlibType = ffi::NMIPAddressCmpFlags;
1541
1542    #[inline]
1543    fn into_glib(self) -> ffi::NMIPAddressCmpFlags {
1544        self.bits()
1545    }
1546}
1547
1548#[cfg(feature = "v1_22")]
1549#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1550#[doc(hidden)]
1551impl FromGlib<ffi::NMIPAddressCmpFlags> for IPAddressCmpFlags {
1552    #[inline]
1553    unsafe fn from_glib(value: ffi::NMIPAddressCmpFlags) -> Self {
1554        skip_assert_initialized!();
1555        Self::from_bits_truncate(value)
1556    }
1557}
1558
1559#[cfg(feature = "v1_22")]
1560#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1561impl StaticType for IPAddressCmpFlags {
1562    #[inline]
1563    #[doc(alias = "nm_ip_address_cmp_flags_get_type")]
1564    fn static_type() -> glib::Type {
1565        unsafe { from_glib(ffi::nm_ip_address_cmp_flags_get_type()) }
1566    }
1567}
1568
1569#[cfg(feature = "v1_22")]
1570#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1571impl glib::HasParamSpec for IPAddressCmpFlags {
1572    type ParamSpec = glib::ParamSpecFlags;
1573    type SetValue = Self;
1574    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1575
1576    fn param_spec_builder() -> Self::BuilderFn {
1577        Self::ParamSpec::builder
1578    }
1579}
1580
1581#[cfg(feature = "v1_22")]
1582#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1583impl glib::value::ValueType for IPAddressCmpFlags {
1584    type Type = Self;
1585}
1586
1587#[cfg(feature = "v1_22")]
1588#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1589unsafe impl<'a> glib::value::FromValue<'a> for IPAddressCmpFlags {
1590    type Checker = glib::value::GenericValueTypeChecker<Self>;
1591
1592    #[inline]
1593    unsafe fn from_value(value: &'a glib::Value) -> Self {
1594        skip_assert_initialized!();
1595        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
1596    }
1597}
1598
1599#[cfg(feature = "v1_22")]
1600#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1601impl ToValue for IPAddressCmpFlags {
1602    #[inline]
1603    fn to_value(&self) -> glib::Value {
1604        let mut value = glib::Value::for_value_type::<Self>();
1605        unsafe {
1606            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1607        }
1608        value
1609    }
1610
1611    #[inline]
1612    fn value_type(&self) -> glib::Type {
1613        Self::static_type()
1614    }
1615}
1616
1617#[cfg(feature = "v1_22")]
1618#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1619impl From<IPAddressCmpFlags> for glib::Value {
1620    #[inline]
1621    fn from(v: IPAddressCmpFlags) -> Self {
1622        skip_assert_initialized!();
1623        ToValue::to_value(&v)
1624    }
1625}
1626
1627#[cfg(feature = "v1_18")]
1628bitflags! {
1629    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1630    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1631    #[doc(alias = "NMIPRoutingRuleAsStringFlags")]
1632    pub struct IPRoutingRuleAsStringFlags: u32 {
1633        /// no flags selected.
1634        #[doc(alias = "NM_IP_ROUTING_RULE_AS_STRING_FLAGS_NONE")]
1635        const NONE = ffi::NM_IP_ROUTING_RULE_AS_STRING_FLAGS_NONE as _;
1636        /// whether to allow parsing
1637        ///   IPv4 addresses.
1638        #[doc(alias = "NM_IP_ROUTING_RULE_AS_STRING_FLAGS_AF_INET")]
1639        const AF_INET = ffi::NM_IP_ROUTING_RULE_AS_STRING_FLAGS_AF_INET as _;
1640        /// whether to allow parsing
1641        ///   IPv6 addresses. If both @NM_IP_ROUTING_RULE_AS_STRING_FLAGS_AF_INET and
1642        ///   @NM_IP_ROUTING_RULE_AS_STRING_FLAGS_AF_INET6 are unset, it's the same
1643        ///   as setting them both.
1644        #[doc(alias = "NM_IP_ROUTING_RULE_AS_STRING_FLAGS_AF_INET6")]
1645        const AF_INET6 = ffi::NM_IP_ROUTING_RULE_AS_STRING_FLAGS_AF_INET6 as _;
1646        /// if set, ensure that the
1647        ///   rule verfies or fail.
1648        #[doc(alias = "NM_IP_ROUTING_RULE_AS_STRING_FLAGS_VALIDATE")]
1649        const VALIDATE = ffi::NM_IP_ROUTING_RULE_AS_STRING_FLAGS_VALIDATE as _;
1650    }
1651}
1652
1653#[cfg(feature = "v1_18")]
1654#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1655#[doc(hidden)]
1656impl IntoGlib for IPRoutingRuleAsStringFlags {
1657    type GlibType = ffi::NMIPRoutingRuleAsStringFlags;
1658
1659    #[inline]
1660    fn into_glib(self) -> ffi::NMIPRoutingRuleAsStringFlags {
1661        self.bits()
1662    }
1663}
1664
1665#[cfg(feature = "v1_18")]
1666#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1667#[doc(hidden)]
1668impl FromGlib<ffi::NMIPRoutingRuleAsStringFlags> for IPRoutingRuleAsStringFlags {
1669    #[inline]
1670    unsafe fn from_glib(value: ffi::NMIPRoutingRuleAsStringFlags) -> Self {
1671        skip_assert_initialized!();
1672        Self::from_bits_truncate(value)
1673    }
1674}
1675
1676#[cfg(feature = "v1_18")]
1677#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1678impl StaticType for IPRoutingRuleAsStringFlags {
1679    #[inline]
1680    #[doc(alias = "nm_ip_routing_rule_as_string_flags_get_type")]
1681    fn static_type() -> glib::Type {
1682        unsafe { from_glib(ffi::nm_ip_routing_rule_as_string_flags_get_type()) }
1683    }
1684}
1685
1686#[cfg(feature = "v1_18")]
1687#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1688impl glib::HasParamSpec for IPRoutingRuleAsStringFlags {
1689    type ParamSpec = glib::ParamSpecFlags;
1690    type SetValue = Self;
1691    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1692
1693    fn param_spec_builder() -> Self::BuilderFn {
1694        Self::ParamSpec::builder
1695    }
1696}
1697
1698#[cfg(feature = "v1_18")]
1699#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1700impl glib::value::ValueType for IPRoutingRuleAsStringFlags {
1701    type Type = Self;
1702}
1703
1704#[cfg(feature = "v1_18")]
1705#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1706unsafe impl<'a> glib::value::FromValue<'a> for IPRoutingRuleAsStringFlags {
1707    type Checker = glib::value::GenericValueTypeChecker<Self>;
1708
1709    #[inline]
1710    unsafe fn from_value(value: &'a glib::Value) -> Self {
1711        skip_assert_initialized!();
1712        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
1713    }
1714}
1715
1716#[cfg(feature = "v1_18")]
1717#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1718impl ToValue for IPRoutingRuleAsStringFlags {
1719    #[inline]
1720    fn to_value(&self) -> glib::Value {
1721        let mut value = glib::Value::for_value_type::<Self>();
1722        unsafe {
1723            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1724        }
1725        value
1726    }
1727
1728    #[inline]
1729    fn value_type(&self) -> glib::Type {
1730        Self::static_type()
1731    }
1732}
1733
1734#[cfg(feature = "v1_18")]
1735#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1736impl From<IPRoutingRuleAsStringFlags> for glib::Value {
1737    #[inline]
1738    fn from(v: IPRoutingRuleAsStringFlags) -> Self {
1739        skip_assert_initialized!();
1740        ToValue::to_value(&v)
1741    }
1742}
1743
1744#[cfg(feature = "v1_12")]
1745bitflags! {
1746    /// IP tunnel flags.
1747    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
1748    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1749    #[doc(alias = "NMIPTunnelFlags")]
1750    pub struct IPTunnelFlags: u32 {
1751        /// no flag
1752        #[doc(alias = "NM_IP_TUNNEL_FLAG_NONE")]
1753        const NONE = ffi::NM_IP_TUNNEL_FLAG_NONE as _;
1754        /// don't add encapsulation limit
1755        ///     if one isn't present in inner packet
1756        #[doc(alias = "NM_IP_TUNNEL_FLAG_IP6_IGN_ENCAP_LIMIT")]
1757        const IP6_IGN_ENCAP_LIMIT = ffi::NM_IP_TUNNEL_FLAG_IP6_IGN_ENCAP_LIMIT as _;
1758        /// copy the traffic class field
1759        ///     from the inner packet
1760        #[doc(alias = "NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_TCLASS")]
1761        const IP6_USE_ORIG_TCLASS = ffi::NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_TCLASS as _;
1762        /// copy the flowlabel from the
1763        ///     inner packet
1764        #[doc(alias = "NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FLOWLABEL")]
1765        const IP6_USE_ORIG_FLOWLABEL = ffi::NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FLOWLABEL as _;
1766        /// used for Mobile IPv6
1767        #[doc(alias = "NM_IP_TUNNEL_FLAG_IP6_MIP6_DEV")]
1768        const IP6_MIP6_DEV = ffi::NM_IP_TUNNEL_FLAG_IP6_MIP6_DEV as _;
1769        /// copy DSCP from the outer packet
1770        #[doc(alias = "NM_IP_TUNNEL_FLAG_IP6_RCV_DSCP_COPY")]
1771        const IP6_RCV_DSCP_COPY = ffi::NM_IP_TUNNEL_FLAG_IP6_RCV_DSCP_COPY as _;
1772        /// copy fwmark from inner packet
1773        #[doc(alias = "NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FWMARK")]
1774        const IP6_USE_ORIG_FWMARK = ffi::NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FWMARK as _;
1775    }
1776}
1777
1778#[cfg(feature = "v1_12")]
1779#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
1780#[doc(hidden)]
1781impl IntoGlib for IPTunnelFlags {
1782    type GlibType = ffi::NMIPTunnelFlags;
1783
1784    #[inline]
1785    fn into_glib(self) -> ffi::NMIPTunnelFlags {
1786        self.bits()
1787    }
1788}
1789
1790#[cfg(feature = "v1_12")]
1791#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
1792#[doc(hidden)]
1793impl FromGlib<ffi::NMIPTunnelFlags> for IPTunnelFlags {
1794    #[inline]
1795    unsafe fn from_glib(value: ffi::NMIPTunnelFlags) -> Self {
1796        skip_assert_initialized!();
1797        Self::from_bits_truncate(value)
1798    }
1799}
1800
1801#[cfg(feature = "v1_12")]
1802#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
1803impl StaticType for IPTunnelFlags {
1804    #[inline]
1805    #[doc(alias = "nm_ip_tunnel_flags_get_type")]
1806    fn static_type() -> glib::Type {
1807        unsafe { from_glib(ffi::nm_ip_tunnel_flags_get_type()) }
1808    }
1809}
1810
1811#[cfg(feature = "v1_12")]
1812#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
1813impl glib::HasParamSpec for IPTunnelFlags {
1814    type ParamSpec = glib::ParamSpecFlags;
1815    type SetValue = Self;
1816    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1817
1818    fn param_spec_builder() -> Self::BuilderFn {
1819        Self::ParamSpec::builder
1820    }
1821}
1822
1823#[cfg(feature = "v1_12")]
1824#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
1825impl glib::value::ValueType for IPTunnelFlags {
1826    type Type = Self;
1827}
1828
1829#[cfg(feature = "v1_12")]
1830#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
1831unsafe impl<'a> glib::value::FromValue<'a> for IPTunnelFlags {
1832    type Checker = glib::value::GenericValueTypeChecker<Self>;
1833
1834    #[inline]
1835    unsafe fn from_value(value: &'a glib::Value) -> Self {
1836        skip_assert_initialized!();
1837        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
1838    }
1839}
1840
1841#[cfg(feature = "v1_12")]
1842#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
1843impl ToValue for IPTunnelFlags {
1844    #[inline]
1845    fn to_value(&self) -> glib::Value {
1846        let mut value = glib::Value::for_value_type::<Self>();
1847        unsafe {
1848            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1849        }
1850        value
1851    }
1852
1853    #[inline]
1854    fn value_type(&self) -> glib::Type {
1855        Self::static_type()
1856    }
1857}
1858
1859#[cfg(feature = "v1_12")]
1860#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
1861impl From<IPTunnelFlags> for glib::Value {
1862    #[inline]
1863    fn from(v: IPTunnelFlags) -> Self {
1864        skip_assert_initialized!();
1865        ToValue::to_value(&v)
1866    }
1867}
1868
1869#[cfg(feature = "v1_30")]
1870bitflags! {
1871    /// Flags for customizing nm_keyfile_read() and nm_keyfile_write().
1872    ///
1873    /// Currently no flags are implemented.
1874    #[cfg_attr(docsrs, doc(cfg(feature = "v1_30")))]
1875    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1876    #[doc(alias = "NMKeyfileHandlerFlags")]
1877    pub struct KeyfileHandlerFlags: u32 {
1878        /// no flags set.
1879        #[doc(alias = "NM_KEYFILE_HANDLER_FLAGS_NONE")]
1880        const NONE = ffi::NM_KEYFILE_HANDLER_FLAGS_NONE as _;
1881    }
1882}
1883
1884#[cfg(feature = "v1_30")]
1885#[cfg_attr(docsrs, doc(cfg(feature = "v1_30")))]
1886#[doc(hidden)]
1887impl IntoGlib for KeyfileHandlerFlags {
1888    type GlibType = ffi::NMKeyfileHandlerFlags;
1889
1890    #[inline]
1891    fn into_glib(self) -> ffi::NMKeyfileHandlerFlags {
1892        self.bits()
1893    }
1894}
1895
1896#[cfg(feature = "v1_30")]
1897#[cfg_attr(docsrs, doc(cfg(feature = "v1_30")))]
1898#[doc(hidden)]
1899impl FromGlib<ffi::NMKeyfileHandlerFlags> for KeyfileHandlerFlags {
1900    #[inline]
1901    unsafe fn from_glib(value: ffi::NMKeyfileHandlerFlags) -> Self {
1902        skip_assert_initialized!();
1903        Self::from_bits_truncate(value)
1904    }
1905}
1906
1907#[cfg(feature = "v1_30")]
1908#[cfg_attr(docsrs, doc(cfg(feature = "v1_30")))]
1909impl StaticType for KeyfileHandlerFlags {
1910    #[inline]
1911    #[doc(alias = "nm_keyfile_handler_flags_get_type")]
1912    fn static_type() -> glib::Type {
1913        unsafe { from_glib(ffi::nm_keyfile_handler_flags_get_type()) }
1914    }
1915}
1916
1917#[cfg(feature = "v1_30")]
1918#[cfg_attr(docsrs, doc(cfg(feature = "v1_30")))]
1919impl glib::HasParamSpec for KeyfileHandlerFlags {
1920    type ParamSpec = glib::ParamSpecFlags;
1921    type SetValue = Self;
1922    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1923
1924    fn param_spec_builder() -> Self::BuilderFn {
1925        Self::ParamSpec::builder
1926    }
1927}
1928
1929#[cfg(feature = "v1_30")]
1930#[cfg_attr(docsrs, doc(cfg(feature = "v1_30")))]
1931impl glib::value::ValueType for KeyfileHandlerFlags {
1932    type Type = Self;
1933}
1934
1935#[cfg(feature = "v1_30")]
1936#[cfg_attr(docsrs, doc(cfg(feature = "v1_30")))]
1937unsafe impl<'a> glib::value::FromValue<'a> for KeyfileHandlerFlags {
1938    type Checker = glib::value::GenericValueTypeChecker<Self>;
1939
1940    #[inline]
1941    unsafe fn from_value(value: &'a glib::Value) -> Self {
1942        skip_assert_initialized!();
1943        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
1944    }
1945}
1946
1947#[cfg(feature = "v1_30")]
1948#[cfg_attr(docsrs, doc(cfg(feature = "v1_30")))]
1949impl ToValue for KeyfileHandlerFlags {
1950    #[inline]
1951    fn to_value(&self) -> glib::Value {
1952        let mut value = glib::Value::for_value_type::<Self>();
1953        unsafe {
1954            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1955        }
1956        value
1957    }
1958
1959    #[inline]
1960    fn value_type(&self) -> glib::Type {
1961        Self::static_type()
1962    }
1963}
1964
1965#[cfg(feature = "v1_30")]
1966#[cfg_attr(docsrs, doc(cfg(feature = "v1_30")))]
1967impl From<KeyfileHandlerFlags> for glib::Value {
1968    #[inline]
1969    fn from(v: KeyfileHandlerFlags) -> Self {
1970        skip_assert_initialized!();
1971        ToValue::to_value(&v)
1972    }
1973}
1974
1975#[cfg(feature = "v1_22")]
1976bitflags! {
1977    /// Flags for the manager Reload() call.
1978    #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1979    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1980    #[doc(alias = "NMManagerReloadFlags")]
1981    pub struct ManagerReloadFlags: u32 {
1982        /// reload the NetworkManager.conf configuration
1983        ///   from disk. Note that this does not include connections, which can be
1984        ///   reloaded via Setting's ReloadConnections().
1985        #[doc(alias = "NM_MANAGER_RELOAD_FLAG_CONF")]
1986        const CONF = ffi::NM_MANAGER_RELOAD_FLAG_CONF as _;
1987        /// update DNS configuration, which usually
1988        ///   involves writing /etc/resolv.conf anew.
1989        #[doc(alias = "NM_MANAGER_RELOAD_FLAG_DNS_RC")]
1990        const DNS_RC = ffi::NM_MANAGER_RELOAD_FLAG_DNS_RC as _;
1991        /// means to restart the DNS plugin. This
1992        ///   is for example useful when using dnsmasq plugin, which uses additional
1993        ///   configuration in /etc/NetworkManager/dnsmasq.d. If you edit those files,
1994        ///   you can restart the DNS plugin. This action shortly interrupts name
1995        ///   resolution.
1996        #[doc(alias = "NM_MANAGER_RELOAD_FLAG_DNS_FULL")]
1997        const DNS_FULL = ffi::NM_MANAGER_RELOAD_FLAG_DNS_FULL as _;
1998    }
1999}
2000
2001#[cfg(feature = "v1_22")]
2002#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
2003#[doc(hidden)]
2004impl IntoGlib for ManagerReloadFlags {
2005    type GlibType = ffi::NMManagerReloadFlags;
2006
2007    #[inline]
2008    fn into_glib(self) -> ffi::NMManagerReloadFlags {
2009        self.bits()
2010    }
2011}
2012
2013#[cfg(feature = "v1_22")]
2014#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
2015#[doc(hidden)]
2016impl FromGlib<ffi::NMManagerReloadFlags> for ManagerReloadFlags {
2017    #[inline]
2018    unsafe fn from_glib(value: ffi::NMManagerReloadFlags) -> Self {
2019        skip_assert_initialized!();
2020        Self::from_bits_truncate(value)
2021    }
2022}
2023
2024#[cfg(feature = "v1_22")]
2025#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
2026impl StaticType for ManagerReloadFlags {
2027    #[inline]
2028    #[doc(alias = "nm_manager_reload_flags_get_type")]
2029    fn static_type() -> glib::Type {
2030        unsafe { from_glib(ffi::nm_manager_reload_flags_get_type()) }
2031    }
2032}
2033
2034#[cfg(feature = "v1_22")]
2035#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
2036impl glib::HasParamSpec for ManagerReloadFlags {
2037    type ParamSpec = glib::ParamSpecFlags;
2038    type SetValue = Self;
2039    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2040
2041    fn param_spec_builder() -> Self::BuilderFn {
2042        Self::ParamSpec::builder
2043    }
2044}
2045
2046#[cfg(feature = "v1_22")]
2047#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
2048impl glib::value::ValueType for ManagerReloadFlags {
2049    type Type = Self;
2050}
2051
2052#[cfg(feature = "v1_22")]
2053#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
2054unsafe impl<'a> glib::value::FromValue<'a> for ManagerReloadFlags {
2055    type Checker = glib::value::GenericValueTypeChecker<Self>;
2056
2057    #[inline]
2058    unsafe fn from_value(value: &'a glib::Value) -> Self {
2059        skip_assert_initialized!();
2060        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
2061    }
2062}
2063
2064#[cfg(feature = "v1_22")]
2065#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
2066impl ToValue for ManagerReloadFlags {
2067    #[inline]
2068    fn to_value(&self) -> glib::Value {
2069        let mut value = glib::Value::for_value_type::<Self>();
2070        unsafe {
2071            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2072        }
2073        value
2074    }
2075
2076    #[inline]
2077    fn value_type(&self) -> glib::Type {
2078        Self::static_type()
2079    }
2080}
2081
2082#[cfg(feature = "v1_22")]
2083#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
2084impl From<ManagerReloadFlags> for glib::Value {
2085    #[inline]
2086    fn from(v: ManagerReloadFlags) -> Self {
2087        skip_assert_initialized!();
2088        ToValue::to_value(&v)
2089    }
2090}
2091
2092#[cfg(feature = "v1_40")]
2093bitflags! {
2094    #[cfg_attr(docsrs, doc(cfg(feature = "v1_40")))]
2095    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2096    #[doc(alias = "NMMptcpFlags")]
2097    pub struct MptcpFlags: u32 {
2098        /// The default, meaning that no MPTCP flags are set.
2099        #[doc(alias = "NM_MPTCP_FLAGS_NONE")]
2100        const NONE = ffi::NM_MPTCP_FLAGS_NONE as _;
2101        /// don't configure MPTCP endpoints on the device.
2102        #[doc(alias = "NM_MPTCP_FLAGS_DISABLED")]
2103        const DISABLED = ffi::NM_MPTCP_FLAGS_DISABLED as _;
2104        /// MPTCP is enabled and endpoints will be configured.
2105        ///   This flag is implied if any of the other flags indicate that
2106        ///   MPTCP is enabled and therefore in most cases unnecessary.
2107        ///   Note that if "/proc/sys/net/mptcp/enabled" sysctl is disabled, MPTCP
2108        ///   handling is disabled despite this flag. This can be overruled with the
2109        ///   "also-without-sysctl" flag.
2110        ///   Note that by default interfaces that don't have a default route are
2111        ///   excluded from having MPTCP endpoints configured. This can be overruled
2112        ///   with the "also-without-default-route" and this affects endpoints
2113        ///   per address family.
2114        #[doc(alias = "NM_MPTCP_FLAGS_ENABLED")]
2115        const ENABLED = ffi::NM_MPTCP_FLAGS_ENABLED as _;
2116        /// even if MPTCP handling is enabled
2117        ///   via the "enabled" flag, it is ignored unless "/proc/sys/net/mptcp/enabled"
2118        ///   is on. With this flag, MPTCP endpoints will be configured regardless
2119        ///   of the sysctl setting.
2120        #[doc(alias = "NM_MPTCP_FLAGS_ALSO_WITHOUT_SYSCTL")]
2121        const ALSO_WITHOUT_SYSCTL = ffi::NM_MPTCP_FLAGS_ALSO_WITHOUT_SYSCTL as _;
2122        /// even if MPTCP handling is enabled
2123        ///   via the "enabled" flag, it is ignored per-address family unless NetworkManager
2124        ///   configures a default route. With this flag, NetworkManager will also configure
2125        ///   MPTCP endpoints if there is no default route. This takes effect per-address
2126        ///   family.
2127        #[doc(alias = "NM_MPTCP_FLAGS_ALSO_WITHOUT_DEFAULT_ROUTE")]
2128        const ALSO_WITHOUT_DEFAULT_ROUTE = ffi::NM_MPTCP_FLAGS_ALSO_WITHOUT_DEFAULT_ROUTE as _;
2129        /// Flag for the MPTCP endpoint. The endpoint will be
2130        ///   announced/signaled to each peer via an MPTCP ADD_ADDR sub-option.
2131        #[doc(alias = "NM_MPTCP_FLAGS_SIGNAL")]
2132        const SIGNAL = ffi::NM_MPTCP_FLAGS_SIGNAL as _;
2133        /// Flag for the MPTCP endpoint. If additional subflow creation
2134        ///   is allowed by the MPTCP limits, the MPTCP path manager will try to create an
2135        ///   additional subflow using this endpoint as the source address after the MPTCP connection
2136        ///   is established.
2137        #[doc(alias = "NM_MPTCP_FLAGS_SUBFLOW")]
2138        const SUBFLOW = ffi::NM_MPTCP_FLAGS_SUBFLOW as _;
2139        /// Flag for the MPTCP endpoint. If this is a subflow endpoint, the
2140        ///   subflows created using this endpoint will have the backup flag set during the connection
2141        ///   process. This flag instructs the peer to only send data on a given subflow when all
2142        ///   non-backup subflows are unavailable. This does not affect outgoing data,
2143        ///   where subflow priority is determined by the backup/non-backup flag received
2144        ///   from the peer
2145        #[doc(alias = "NM_MPTCP_FLAGS_BACKUP")]
2146        const BACKUP = ffi::NM_MPTCP_FLAGS_BACKUP as _;
2147        /// Flag for the MPTCP endpoint. If this is a subflow endpoint and additional
2148        ///   subflow creation is allowed by the MPTCP limits, the MPTCP path manager will try to create an
2149        ///   additional subflow for each known peer address, using this endpoint as the source address.
2150        ///   This will occur after the MPTCP connection is established. If the peer did not announce
2151        ///   any additional addresses using the MPTCP ADD_ADDR sub-option, this will behave the same
2152        ///   as a plain subflow endpoint. When the peer does announce addresses, each received ADD_ADDR
2153        ///   sub-option will trigger creation of an additional subflow to generate a full mesh topology.
2154        #[doc(alias = "NM_MPTCP_FLAGS_FULLMESH")]
2155        const FULLMESH = ffi::NM_MPTCP_FLAGS_FULLMESH as _;
2156    }
2157}
2158
2159#[cfg(feature = "v1_40")]
2160#[cfg_attr(docsrs, doc(cfg(feature = "v1_40")))]
2161#[doc(hidden)]
2162impl IntoGlib for MptcpFlags {
2163    type GlibType = ffi::NMMptcpFlags;
2164
2165    #[inline]
2166    fn into_glib(self) -> ffi::NMMptcpFlags {
2167        self.bits()
2168    }
2169}
2170
2171#[cfg(feature = "v1_40")]
2172#[cfg_attr(docsrs, doc(cfg(feature = "v1_40")))]
2173#[doc(hidden)]
2174impl FromGlib<ffi::NMMptcpFlags> for MptcpFlags {
2175    #[inline]
2176    unsafe fn from_glib(value: ffi::NMMptcpFlags) -> Self {
2177        skip_assert_initialized!();
2178        Self::from_bits_truncate(value)
2179    }
2180}
2181
2182#[cfg(feature = "v1_40")]
2183#[cfg_attr(docsrs, doc(cfg(feature = "v1_40")))]
2184impl StaticType for MptcpFlags {
2185    #[inline]
2186    #[doc(alias = "nm_mptcp_flags_get_type")]
2187    fn static_type() -> glib::Type {
2188        unsafe { from_glib(ffi::nm_mptcp_flags_get_type()) }
2189    }
2190}
2191
2192#[cfg(feature = "v1_40")]
2193#[cfg_attr(docsrs, doc(cfg(feature = "v1_40")))]
2194impl glib::HasParamSpec for MptcpFlags {
2195    type ParamSpec = glib::ParamSpecFlags;
2196    type SetValue = Self;
2197    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2198
2199    fn param_spec_builder() -> Self::BuilderFn {
2200        Self::ParamSpec::builder
2201    }
2202}
2203
2204#[cfg(feature = "v1_40")]
2205#[cfg_attr(docsrs, doc(cfg(feature = "v1_40")))]
2206impl glib::value::ValueType for MptcpFlags {
2207    type Type = Self;
2208}
2209
2210#[cfg(feature = "v1_40")]
2211#[cfg_attr(docsrs, doc(cfg(feature = "v1_40")))]
2212unsafe impl<'a> glib::value::FromValue<'a> for MptcpFlags {
2213    type Checker = glib::value::GenericValueTypeChecker<Self>;
2214
2215    #[inline]
2216    unsafe fn from_value(value: &'a glib::Value) -> Self {
2217        skip_assert_initialized!();
2218        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
2219    }
2220}
2221
2222#[cfg(feature = "v1_40")]
2223#[cfg_attr(docsrs, doc(cfg(feature = "v1_40")))]
2224impl ToValue for MptcpFlags {
2225    #[inline]
2226    fn to_value(&self) -> glib::Value {
2227        let mut value = glib::Value::for_value_type::<Self>();
2228        unsafe {
2229            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2230        }
2231        value
2232    }
2233
2234    #[inline]
2235    fn value_type(&self) -> glib::Type {
2236        Self::static_type()
2237    }
2238}
2239
2240#[cfg(feature = "v1_40")]
2241#[cfg_attr(docsrs, doc(cfg(feature = "v1_40")))]
2242impl From<MptcpFlags> for glib::Value {
2243    #[inline]
2244    fn from(v: MptcpFlags) -> Self {
2245        skip_assert_initialized!();
2246        ToValue::to_value(&v)
2247    }
2248}
2249
2250#[cfg(feature = "v1_38")]
2251bitflags! {
2252    /// Flags related to radio interfaces.
2253    #[cfg_attr(docsrs, doc(cfg(feature = "v1_38")))]
2254    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2255    #[doc(alias = "NMRadioFlags")]
2256    pub struct RadioFlags: u32 {
2257        /// an alias for numeric zero, no flags set.
2258        #[doc(alias = "NM_RADIO_FLAG_NONE")]
2259        const NONE = ffi::NM_RADIO_FLAG_NONE as _;
2260        /// A Wireless LAN device or rfkill switch
2261        ///   is detected in the system.
2262        #[doc(alias = "NM_RADIO_FLAG_WLAN_AVAILABLE")]
2263        const WLAN_AVAILABLE = ffi::NM_RADIO_FLAG_WLAN_AVAILABLE as _;
2264        /// A Wireless WAN device or rfkill switch
2265        ///   is detected in the system.
2266        #[doc(alias = "NM_RADIO_FLAG_WWAN_AVAILABLE")]
2267        const WWAN_AVAILABLE = ffi::NM_RADIO_FLAG_WWAN_AVAILABLE as _;
2268    }
2269}
2270
2271#[cfg(feature = "v1_38")]
2272#[cfg_attr(docsrs, doc(cfg(feature = "v1_38")))]
2273#[doc(hidden)]
2274impl IntoGlib for RadioFlags {
2275    type GlibType = ffi::NMRadioFlags;
2276
2277    #[inline]
2278    fn into_glib(self) -> ffi::NMRadioFlags {
2279        self.bits()
2280    }
2281}
2282
2283#[cfg(feature = "v1_38")]
2284#[cfg_attr(docsrs, doc(cfg(feature = "v1_38")))]
2285#[doc(hidden)]
2286impl FromGlib<ffi::NMRadioFlags> for RadioFlags {
2287    #[inline]
2288    unsafe fn from_glib(value: ffi::NMRadioFlags) -> Self {
2289        skip_assert_initialized!();
2290        Self::from_bits_truncate(value)
2291    }
2292}
2293
2294#[cfg(feature = "v1_38")]
2295#[cfg_attr(docsrs, doc(cfg(feature = "v1_38")))]
2296impl StaticType for RadioFlags {
2297    #[inline]
2298    #[doc(alias = "nm_radio_flags_get_type")]
2299    fn static_type() -> glib::Type {
2300        unsafe { from_glib(ffi::nm_radio_flags_get_type()) }
2301    }
2302}
2303
2304#[cfg(feature = "v1_38")]
2305#[cfg_attr(docsrs, doc(cfg(feature = "v1_38")))]
2306impl glib::HasParamSpec for RadioFlags {
2307    type ParamSpec = glib::ParamSpecFlags;
2308    type SetValue = Self;
2309    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2310
2311    fn param_spec_builder() -> Self::BuilderFn {
2312        Self::ParamSpec::builder
2313    }
2314}
2315
2316#[cfg(feature = "v1_38")]
2317#[cfg_attr(docsrs, doc(cfg(feature = "v1_38")))]
2318impl glib::value::ValueType for RadioFlags {
2319    type Type = Self;
2320}
2321
2322#[cfg(feature = "v1_38")]
2323#[cfg_attr(docsrs, doc(cfg(feature = "v1_38")))]
2324unsafe impl<'a> glib::value::FromValue<'a> for RadioFlags {
2325    type Checker = glib::value::GenericValueTypeChecker<Self>;
2326
2327    #[inline]
2328    unsafe fn from_value(value: &'a glib::Value) -> Self {
2329        skip_assert_initialized!();
2330        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
2331    }
2332}
2333
2334#[cfg(feature = "v1_38")]
2335#[cfg_attr(docsrs, doc(cfg(feature = "v1_38")))]
2336impl ToValue for RadioFlags {
2337    #[inline]
2338    fn to_value(&self) -> glib::Value {
2339        let mut value = glib::Value::for_value_type::<Self>();
2340        unsafe {
2341            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2342        }
2343        value
2344    }
2345
2346    #[inline]
2347    fn value_type(&self) -> glib::Type {
2348        Self::static_type()
2349    }
2350}
2351
2352#[cfg(feature = "v1_38")]
2353#[cfg_attr(docsrs, doc(cfg(feature = "v1_38")))]
2354impl From<RadioFlags> for glib::Value {
2355    #[inline]
2356    fn from(v: RadioFlags) -> Self {
2357        skip_assert_initialized!();
2358        ToValue::to_value(&v)
2359    }
2360}
2361
2362bitflags! {
2363    /// #NMSecretAgentCapabilities indicate various capabilities of the agent.
2364    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2365    #[doc(alias = "NMSecretAgentCapabilities")]
2366    pub struct SecretAgentCapabilities: u32 {
2367        /// the agent supports no special capabilities
2368        #[doc(alias = "NM_SECRET_AGENT_CAPABILITY_NONE")]
2369        const NONE = ffi::NM_SECRET_AGENT_CAPABILITY_NONE as _;
2370        /// the agent supports passing hints to
2371        /// VPN plugin authentication dialogs.
2372        #[doc(alias = "NM_SECRET_AGENT_CAPABILITY_VPN_HINTS")]
2373        const VPN_HINTS = ffi::NM_SECRET_AGENT_CAPABILITY_VPN_HINTS as _;
2374        /// bounds checking value; should not be used.
2375        #[doc(alias = "NM_SECRET_AGENT_CAPABILITY_LAST")]
2376        const LAST = ffi::NM_SECRET_AGENT_CAPABILITY_LAST as _;
2377    }
2378}
2379
2380#[doc(hidden)]
2381impl IntoGlib for SecretAgentCapabilities {
2382    type GlibType = ffi::NMSecretAgentCapabilities;
2383
2384    #[inline]
2385    fn into_glib(self) -> ffi::NMSecretAgentCapabilities {
2386        self.bits()
2387    }
2388}
2389
2390#[doc(hidden)]
2391impl FromGlib<ffi::NMSecretAgentCapabilities> for SecretAgentCapabilities {
2392    #[inline]
2393    unsafe fn from_glib(value: ffi::NMSecretAgentCapabilities) -> Self {
2394        skip_assert_initialized!();
2395        Self::from_bits_truncate(value)
2396    }
2397}
2398
2399impl StaticType for SecretAgentCapabilities {
2400    #[inline]
2401    #[doc(alias = "nm_secret_agent_capabilities_get_type")]
2402    fn static_type() -> glib::Type {
2403        unsafe { from_glib(ffi::nm_secret_agent_capabilities_get_type()) }
2404    }
2405}
2406
2407impl glib::HasParamSpec for SecretAgentCapabilities {
2408    type ParamSpec = glib::ParamSpecFlags;
2409    type SetValue = Self;
2410    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2411
2412    fn param_spec_builder() -> Self::BuilderFn {
2413        Self::ParamSpec::builder
2414    }
2415}
2416
2417impl glib::value::ValueType for SecretAgentCapabilities {
2418    type Type = Self;
2419}
2420
2421unsafe impl<'a> glib::value::FromValue<'a> for SecretAgentCapabilities {
2422    type Checker = glib::value::GenericValueTypeChecker<Self>;
2423
2424    #[inline]
2425    unsafe fn from_value(value: &'a glib::Value) -> Self {
2426        skip_assert_initialized!();
2427        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
2428    }
2429}
2430
2431impl ToValue for SecretAgentCapabilities {
2432    #[inline]
2433    fn to_value(&self) -> glib::Value {
2434        let mut value = glib::Value::for_value_type::<Self>();
2435        unsafe {
2436            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2437        }
2438        value
2439    }
2440
2441    #[inline]
2442    fn value_type(&self) -> glib::Type {
2443        Self::static_type()
2444    }
2445}
2446
2447impl From<SecretAgentCapabilities> for glib::Value {
2448    #[inline]
2449    fn from(v: SecretAgentCapabilities) -> Self {
2450        skip_assert_initialized!();
2451        ToValue::to_value(&v)
2452    }
2453}
2454
2455bitflags! {
2456    /// #NMSecretAgentGetSecretsFlags values modify the behavior of a GetSecrets request.
2457    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2458    #[doc(alias = "NMSecretAgentGetSecretsFlags")]
2459    pub struct SecretAgentGetSecretsFlags: u32 {
2460        /// no special behavior; by default no
2461        ///   user interaction is allowed and requests for secrets are fulfilled from
2462        ///   persistent storage, or if no secrets are available an error is returned.
2463        #[doc(alias = "NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE")]
2464        const NONE = ffi::NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE as _;
2465        /// allows the request to
2466        ///   interact with the user, possibly prompting via UI for secrets if any are
2467        ///   required, or if none are found in persistent storage.
2468        #[doc(alias = "NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION")]
2469        const ALLOW_INTERACTION = ffi::NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION as _;
2470        /// explicitly prompt for new
2471        ///   secrets from the user.  This flag signals that NetworkManager thinks any
2472        ///   existing secrets are invalid or wrong.  This flag implies that interaction
2473        ///   is allowed.
2474        #[doc(alias = "NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW")]
2475        const REQUEST_NEW = ffi::NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW as _;
2476        /// set if the request was
2477        ///   initiated by user-requested action via the D-Bus interface, as opposed to
2478        ///   automatically initiated by NetworkManager in response to (for example) scan
2479        ///   results or carrier changes.
2480        #[doc(alias = "NM_SECRET_AGENT_GET_SECRETS_FLAG_USER_REQUESTED")]
2481        const USER_REQUESTED = ffi::NM_SECRET_AGENT_GET_SECRETS_FLAG_USER_REQUESTED as _;
2482        /// indicates that WPS enrollment
2483        ///   is active with PBC method. The agent may suggest that the user pushes a button
2484        ///   on the router instead of supplying a PSK.
2485        #[doc(alias = "NM_SECRET_AGENT_GET_SECRETS_FLAG_WPS_PBC_ACTIVE")]
2486        const WPS_PBC_ACTIVE = ffi::NM_SECRET_AGENT_GET_SECRETS_FLAG_WPS_PBC_ACTIVE as _;
2487        /// Internal flag, not part of
2488        ///   the D-Bus API.
2489        #[doc(alias = "NM_SECRET_AGENT_GET_SECRETS_FLAG_ONLY_SYSTEM")]
2490        const ONLY_SYSTEM = ffi::NM_SECRET_AGENT_GET_SECRETS_FLAG_ONLY_SYSTEM as _;
2491        /// Internal flag, not part of
2492        ///   the D-Bus API.
2493        #[doc(alias = "NM_SECRET_AGENT_GET_SECRETS_FLAG_NO_ERRORS")]
2494        const NO_ERRORS = ffi::NM_SECRET_AGENT_GET_SECRETS_FLAG_NO_ERRORS as _;
2495    }
2496}
2497
2498#[doc(hidden)]
2499impl IntoGlib for SecretAgentGetSecretsFlags {
2500    type GlibType = ffi::NMSecretAgentGetSecretsFlags;
2501
2502    #[inline]
2503    fn into_glib(self) -> ffi::NMSecretAgentGetSecretsFlags {
2504        self.bits()
2505    }
2506}
2507
2508#[doc(hidden)]
2509impl FromGlib<ffi::NMSecretAgentGetSecretsFlags> for SecretAgentGetSecretsFlags {
2510    #[inline]
2511    unsafe fn from_glib(value: ffi::NMSecretAgentGetSecretsFlags) -> Self {
2512        skip_assert_initialized!();
2513        Self::from_bits_truncate(value)
2514    }
2515}
2516
2517impl StaticType for SecretAgentGetSecretsFlags {
2518    #[inline]
2519    #[doc(alias = "nm_secret_agent_get_secrets_flags_get_type")]
2520    fn static_type() -> glib::Type {
2521        unsafe { from_glib(ffi::nm_secret_agent_get_secrets_flags_get_type()) }
2522    }
2523}
2524
2525impl glib::HasParamSpec for SecretAgentGetSecretsFlags {
2526    type ParamSpec = glib::ParamSpecFlags;
2527    type SetValue = Self;
2528    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2529
2530    fn param_spec_builder() -> Self::BuilderFn {
2531        Self::ParamSpec::builder
2532    }
2533}
2534
2535impl glib::value::ValueType for SecretAgentGetSecretsFlags {
2536    type Type = Self;
2537}
2538
2539unsafe impl<'a> glib::value::FromValue<'a> for SecretAgentGetSecretsFlags {
2540    type Checker = glib::value::GenericValueTypeChecker<Self>;
2541
2542    #[inline]
2543    unsafe fn from_value(value: &'a glib::Value) -> Self {
2544        skip_assert_initialized!();
2545        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
2546    }
2547}
2548
2549impl ToValue for SecretAgentGetSecretsFlags {
2550    #[inline]
2551    fn to_value(&self) -> glib::Value {
2552        let mut value = glib::Value::for_value_type::<Self>();
2553        unsafe {
2554            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2555        }
2556        value
2557    }
2558
2559    #[inline]
2560    fn value_type(&self) -> glib::Type {
2561        Self::static_type()
2562    }
2563}
2564
2565impl From<SecretAgentGetSecretsFlags> for glib::Value {
2566    #[inline]
2567    fn from(v: SecretAgentGetSecretsFlags) -> Self {
2568        skip_assert_initialized!();
2569        ToValue::to_value(&v)
2570    }
2571}
2572
2573#[cfg(feature = "v1_8")]
2574bitflags! {
2575    /// #NMSetting8021xAuthFlags values indicate which authentication settings
2576    /// should be used.
2577    ///
2578    /// Before 1.22, this was wrongly marked as a enum and not as a flags
2579    /// type.
2580    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2581    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2582    #[doc(alias = "NMSetting8021xAuthFlags")]
2583    pub struct Setting8021xAuthFlags: u32 {
2584        /// No flags
2585        #[doc(alias = "NM_SETTING_802_1X_AUTH_FLAGS_NONE")]
2586        const NONE = ffi::NM_SETTING_802_1X_AUTH_FLAGS_NONE as _;
2587        /// Disable TLSv1.0
2588        #[doc(alias = "NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_0_DISABLE")]
2589        const TLS_1_0_DISABLE = ffi::NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_0_DISABLE as _;
2590        /// Disable TLSv1.1
2591        #[doc(alias = "NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_1_DISABLE")]
2592        const TLS_1_1_DISABLE = ffi::NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_1_DISABLE as _;
2593        /// Disable TLSv1.2
2594        #[doc(alias = "NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_2_DISABLE")]
2595        const TLS_1_2_DISABLE = ffi::NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_2_DISABLE as _;
2596        /// Disable TLS time checks. Since 1.42.
2597        #[doc(alias = "NM_SETTING_802_1X_AUTH_FLAGS_TLS_DISABLE_TIME_CHECKS")]
2598        const TLS_DISABLE_TIME_CHECKS = ffi::NM_SETTING_802_1X_AUTH_FLAGS_TLS_DISABLE_TIME_CHECKS as _;
2599        /// Disable TLSv1.3. Since 1.42.
2600        #[doc(alias = "NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_3_DISABLE")]
2601        const TLS_1_3_DISABLE = ffi::NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_3_DISABLE as _;
2602        /// Enable TLSv1.0. Since 1.42.
2603        #[doc(alias = "NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_0_ENABLE")]
2604        const TLS_1_0_ENABLE = ffi::NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_0_ENABLE as _;
2605        /// Enable TLSv1.1. Since 1.42.
2606        #[doc(alias = "NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_1_ENABLE")]
2607        const TLS_1_1_ENABLE = ffi::NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_1_ENABLE as _;
2608        /// Enable TLSv1.2. Since 1.42.
2609        #[doc(alias = "NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_2_ENABLE")]
2610        const TLS_1_2_ENABLE = ffi::NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_2_ENABLE as _;
2611        /// Enable TLSv1.3. Since 1.42.
2612        #[doc(alias = "NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_3_ENABLE")]
2613        const TLS_1_3_ENABLE = ffi::NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_3_ENABLE as _;
2614        /// All supported flags
2615        #[doc(alias = "NM_SETTING_802_1X_AUTH_FLAGS_ALL")]
2616        const ALL = ffi::NM_SETTING_802_1X_AUTH_FLAGS_ALL as _;
2617    }
2618}
2619
2620#[cfg(feature = "v1_8")]
2621#[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2622#[doc(hidden)]
2623impl IntoGlib for Setting8021xAuthFlags {
2624    type GlibType = ffi::NMSetting8021xAuthFlags;
2625
2626    #[inline]
2627    fn into_glib(self) -> ffi::NMSetting8021xAuthFlags {
2628        self.bits()
2629    }
2630}
2631
2632#[cfg(feature = "v1_8")]
2633#[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2634#[doc(hidden)]
2635impl FromGlib<ffi::NMSetting8021xAuthFlags> for Setting8021xAuthFlags {
2636    #[inline]
2637    unsafe fn from_glib(value: ffi::NMSetting8021xAuthFlags) -> Self {
2638        skip_assert_initialized!();
2639        Self::from_bits_truncate(value)
2640    }
2641}
2642
2643#[cfg(feature = "v1_8")]
2644#[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2645impl StaticType for Setting8021xAuthFlags {
2646    #[inline]
2647    #[doc(alias = "nm_setting_802_1x_auth_flags_get_type")]
2648    fn static_type() -> glib::Type {
2649        unsafe { from_glib(ffi::nm_setting_802_1x_auth_flags_get_type()) }
2650    }
2651}
2652
2653#[cfg(feature = "v1_8")]
2654#[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2655impl glib::HasParamSpec for Setting8021xAuthFlags {
2656    type ParamSpec = glib::ParamSpecFlags;
2657    type SetValue = Self;
2658    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2659
2660    fn param_spec_builder() -> Self::BuilderFn {
2661        Self::ParamSpec::builder
2662    }
2663}
2664
2665#[cfg(feature = "v1_8")]
2666#[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2667impl glib::value::ValueType for Setting8021xAuthFlags {
2668    type Type = Self;
2669}
2670
2671#[cfg(feature = "v1_8")]
2672#[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2673unsafe impl<'a> glib::value::FromValue<'a> for Setting8021xAuthFlags {
2674    type Checker = glib::value::GenericValueTypeChecker<Self>;
2675
2676    #[inline]
2677    unsafe fn from_value(value: &'a glib::Value) -> Self {
2678        skip_assert_initialized!();
2679        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
2680    }
2681}
2682
2683#[cfg(feature = "v1_8")]
2684#[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2685impl ToValue for Setting8021xAuthFlags {
2686    #[inline]
2687    fn to_value(&self) -> glib::Value {
2688        let mut value = glib::Value::for_value_type::<Self>();
2689        unsafe {
2690            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2691        }
2692        value
2693    }
2694
2695    #[inline]
2696    fn value_type(&self) -> glib::Type {
2697        Self::static_type()
2698    }
2699}
2700
2701#[cfg(feature = "v1_8")]
2702#[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
2703impl From<Setting8021xAuthFlags> for glib::Value {
2704    #[inline]
2705    fn from(v: Setting8021xAuthFlags) -> Self {
2706        skip_assert_initialized!();
2707        ToValue::to_value(&v)
2708    }
2709}
2710
2711bitflags! {
2712    /// DCB feature flags.
2713    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2714    #[doc(alias = "NMSettingDcbFlags")]
2715    pub struct SettingDcbFlags: u32 {
2716        /// no flag
2717        #[doc(alias = "NM_SETTING_DCB_FLAG_NONE")]
2718        const NONE = ffi::NM_SETTING_DCB_FLAG_NONE as _;
2719        /// the feature is enabled
2720        #[doc(alias = "NM_SETTING_DCB_FLAG_ENABLE")]
2721        const ENABLE = ffi::NM_SETTING_DCB_FLAG_ENABLE as _;
2722        /// the feature is advertised
2723        #[doc(alias = "NM_SETTING_DCB_FLAG_ADVERTISE")]
2724        const ADVERTISE = ffi::NM_SETTING_DCB_FLAG_ADVERTISE as _;
2725        /// the feature is willing to change based on
2726        /// peer configuration advertisements
2727        #[doc(alias = "NM_SETTING_DCB_FLAG_WILLING")]
2728        const WILLING = ffi::NM_SETTING_DCB_FLAG_WILLING as _;
2729    }
2730}
2731
2732#[doc(hidden)]
2733impl IntoGlib for SettingDcbFlags {
2734    type GlibType = ffi::NMSettingDcbFlags;
2735
2736    #[inline]
2737    fn into_glib(self) -> ffi::NMSettingDcbFlags {
2738        self.bits()
2739    }
2740}
2741
2742#[doc(hidden)]
2743impl FromGlib<ffi::NMSettingDcbFlags> for SettingDcbFlags {
2744    #[inline]
2745    unsafe fn from_glib(value: ffi::NMSettingDcbFlags) -> Self {
2746        skip_assert_initialized!();
2747        Self::from_bits_truncate(value)
2748    }
2749}
2750
2751impl StaticType for SettingDcbFlags {
2752    #[inline]
2753    #[doc(alias = "nm_setting_dcb_flags_get_type")]
2754    fn static_type() -> glib::Type {
2755        unsafe { from_glib(ffi::nm_setting_dcb_flags_get_type()) }
2756    }
2757}
2758
2759impl glib::HasParamSpec for SettingDcbFlags {
2760    type ParamSpec = glib::ParamSpecFlags;
2761    type SetValue = Self;
2762    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2763
2764    fn param_spec_builder() -> Self::BuilderFn {
2765        Self::ParamSpec::builder
2766    }
2767}
2768
2769impl glib::value::ValueType for SettingDcbFlags {
2770    type Type = Self;
2771}
2772
2773unsafe impl<'a> glib::value::FromValue<'a> for SettingDcbFlags {
2774    type Checker = glib::value::GenericValueTypeChecker<Self>;
2775
2776    #[inline]
2777    unsafe fn from_value(value: &'a glib::Value) -> Self {
2778        skip_assert_initialized!();
2779        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
2780    }
2781}
2782
2783impl ToValue for SettingDcbFlags {
2784    #[inline]
2785    fn to_value(&self) -> glib::Value {
2786        let mut value = glib::Value::for_value_type::<Self>();
2787        unsafe {
2788            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2789        }
2790        value
2791    }
2792
2793    #[inline]
2794    fn value_type(&self) -> glib::Type {
2795        Self::static_type()
2796    }
2797}
2798
2799impl From<SettingDcbFlags> for glib::Value {
2800    #[inline]
2801    fn from(v: SettingDcbFlags) -> Self {
2802        skip_assert_initialized!();
2803        ToValue::to_value(&v)
2804    }
2805}
2806
2807#[cfg(feature = "v1_52")]
2808bitflags! {
2809    /// These flags modify the ethtool FEC(Forward Error Correction) mode.
2810    #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
2811    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2812    #[doc(alias = "NMSettingEthtoolFecMode")]
2813    pub struct SettingEthtoolFecMode: u32 {
2814        /// Select default/best FEC mode automatically.
2815        #[doc(alias = "NM_SETTING_ETHTOOL_FEC_MODE_AUTO")]
2816        const AUTO = ffi::NM_SETTING_ETHTOOL_FEC_MODE_AUTO as _;
2817        /// No FEC mode.
2818        #[doc(alias = "NM_SETTING_ETHTOOL_FEC_MODE_OFF")]
2819        const OFF = ffi::NM_SETTING_ETHTOOL_FEC_MODE_OFF as _;
2820        /// Reed-Solomon FEC Mode.
2821        #[doc(alias = "NM_SETTING_ETHTOOL_FEC_MODE_RS")]
2822        const RS = ffi::NM_SETTING_ETHTOOL_FEC_MODE_RS as _;
2823        /// Base-R/Reed-Solomon FEC Mode.
2824        #[doc(alias = "NM_SETTING_ETHTOOL_FEC_MODE_BASER")]
2825        const BASER = ffi::NM_SETTING_ETHTOOL_FEC_MODE_BASER as _;
2826        /// Low Latency Reed Solomon FEC Mode.
2827        #[doc(alias = "NM_SETTING_ETHTOOL_FEC_MODE_LLRS")]
2828        const LLRS = ffi::NM_SETTING_ETHTOOL_FEC_MODE_LLRS as _;
2829    }
2830}
2831
2832#[cfg(feature = "v1_52")]
2833#[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
2834#[doc(hidden)]
2835impl IntoGlib for SettingEthtoolFecMode {
2836    type GlibType = ffi::NMSettingEthtoolFecMode;
2837
2838    #[inline]
2839    fn into_glib(self) -> ffi::NMSettingEthtoolFecMode {
2840        self.bits()
2841    }
2842}
2843
2844#[cfg(feature = "v1_52")]
2845#[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
2846#[doc(hidden)]
2847impl FromGlib<ffi::NMSettingEthtoolFecMode> for SettingEthtoolFecMode {
2848    #[inline]
2849    unsafe fn from_glib(value: ffi::NMSettingEthtoolFecMode) -> Self {
2850        skip_assert_initialized!();
2851        Self::from_bits_truncate(value)
2852    }
2853}
2854
2855#[cfg(feature = "v1_52")]
2856#[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
2857impl StaticType for SettingEthtoolFecMode {
2858    #[inline]
2859    #[doc(alias = "nm_setting_ethtool_fec_mode_get_type")]
2860    fn static_type() -> glib::Type {
2861        unsafe { from_glib(ffi::nm_setting_ethtool_fec_mode_get_type()) }
2862    }
2863}
2864
2865#[cfg(feature = "v1_52")]
2866#[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
2867impl glib::HasParamSpec for SettingEthtoolFecMode {
2868    type ParamSpec = glib::ParamSpecFlags;
2869    type SetValue = Self;
2870    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2871
2872    fn param_spec_builder() -> Self::BuilderFn {
2873        Self::ParamSpec::builder
2874    }
2875}
2876
2877#[cfg(feature = "v1_52")]
2878#[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
2879impl glib::value::ValueType for SettingEthtoolFecMode {
2880    type Type = Self;
2881}
2882
2883#[cfg(feature = "v1_52")]
2884#[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
2885unsafe impl<'a> glib::value::FromValue<'a> for SettingEthtoolFecMode {
2886    type Checker = glib::value::GenericValueTypeChecker<Self>;
2887
2888    #[inline]
2889    unsafe fn from_value(value: &'a glib::Value) -> Self {
2890        skip_assert_initialized!();
2891        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
2892    }
2893}
2894
2895#[cfg(feature = "v1_52")]
2896#[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
2897impl ToValue for SettingEthtoolFecMode {
2898    #[inline]
2899    fn to_value(&self) -> glib::Value {
2900        let mut value = glib::Value::for_value_type::<Self>();
2901        unsafe {
2902            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2903        }
2904        value
2905    }
2906
2907    #[inline]
2908    fn value_type(&self) -> glib::Type {
2909        Self::static_type()
2910    }
2911}
2912
2913#[cfg(feature = "v1_52")]
2914#[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
2915impl From<SettingEthtoolFecMode> for glib::Value {
2916    #[inline]
2917    fn from(v: SettingEthtoolFecMode) -> Self {
2918        skip_assert_initialized!();
2919        ToValue::to_value(&v)
2920    }
2921}
2922
2923bitflags! {
2924    /// These flags indicate specific behavior related to handling of a secret.  Each
2925    /// secret has a corresponding set of these flags which indicate how the secret
2926    /// is to be stored and/or requested when it is needed.
2927    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2928    #[doc(alias = "NMSettingSecretFlags")]
2929    pub struct SettingSecretFlags: u32 {
2930        /// the system is responsible for providing and
2931        /// storing this secret (default)
2932        #[doc(alias = "NM_SETTING_SECRET_FLAG_NONE")]
2933        const NONE = ffi::NM_SETTING_SECRET_FLAG_NONE as _;
2934        /// a user secret agent is responsible
2935        /// for providing and storing this secret; when it is required agents will be
2936        /// asked to retrieve it
2937        #[doc(alias = "NM_SETTING_SECRET_FLAG_AGENT_OWNED")]
2938        const AGENT_OWNED = ffi::NM_SETTING_SECRET_FLAG_AGENT_OWNED as _;
2939        /// this secret should not be saved, but
2940        /// should be requested from the user each time it is needed
2941        #[doc(alias = "NM_SETTING_SECRET_FLAG_NOT_SAVED")]
2942        const NOT_SAVED = ffi::NM_SETTING_SECRET_FLAG_NOT_SAVED as _;
2943        /// in situations where it cannot be
2944        /// automatically determined that the secret is required (some VPNs and PPP
2945        /// providers don't require all secrets) this flag indicates that the specific
2946        /// secret is not required
2947        #[doc(alias = "NM_SETTING_SECRET_FLAG_NOT_REQUIRED")]
2948        const NOT_REQUIRED = ffi::NM_SETTING_SECRET_FLAG_NOT_REQUIRED as _;
2949    }
2950}
2951
2952#[doc(hidden)]
2953impl IntoGlib for SettingSecretFlags {
2954    type GlibType = ffi::NMSettingSecretFlags;
2955
2956    #[inline]
2957    fn into_glib(self) -> ffi::NMSettingSecretFlags {
2958        self.bits()
2959    }
2960}
2961
2962#[doc(hidden)]
2963impl FromGlib<ffi::NMSettingSecretFlags> for SettingSecretFlags {
2964    #[inline]
2965    unsafe fn from_glib(value: ffi::NMSettingSecretFlags) -> Self {
2966        skip_assert_initialized!();
2967        Self::from_bits_truncate(value)
2968    }
2969}
2970
2971impl StaticType for SettingSecretFlags {
2972    #[inline]
2973    #[doc(alias = "nm_setting_secret_flags_get_type")]
2974    fn static_type() -> glib::Type {
2975        unsafe { from_glib(ffi::nm_setting_secret_flags_get_type()) }
2976    }
2977}
2978
2979impl glib::HasParamSpec for SettingSecretFlags {
2980    type ParamSpec = glib::ParamSpecFlags;
2981    type SetValue = Self;
2982    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2983
2984    fn param_spec_builder() -> Self::BuilderFn {
2985        Self::ParamSpec::builder
2986    }
2987}
2988
2989impl glib::value::ValueType for SettingSecretFlags {
2990    type Type = Self;
2991}
2992
2993unsafe impl<'a> glib::value::FromValue<'a> for SettingSecretFlags {
2994    type Checker = glib::value::GenericValueTypeChecker<Self>;
2995
2996    #[inline]
2997    unsafe fn from_value(value: &'a glib::Value) -> Self {
2998        skip_assert_initialized!();
2999        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
3000    }
3001}
3002
3003impl ToValue for SettingSecretFlags {
3004    #[inline]
3005    fn to_value(&self) -> glib::Value {
3006        let mut value = glib::Value::for_value_type::<Self>();
3007        unsafe {
3008            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
3009        }
3010        value
3011    }
3012
3013    #[inline]
3014    fn value_type(&self) -> glib::Type {
3015        Self::static_type()
3016    }
3017}
3018
3019impl From<SettingSecretFlags> for glib::Value {
3020    #[inline]
3021    fn from(v: SettingSecretFlags) -> Self {
3022        skip_assert_initialized!();
3023        ToValue::to_value(&v)
3024    }
3025}
3026
3027#[cfg(feature = "v1_2")]
3028bitflags! {
3029    /// Options for #NMSettingWired:wake-on-lan. Note that not all options
3030    /// are supported by all devices.
3031    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
3032    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
3033    #[doc(alias = "NMSettingWiredWakeOnLan")]
3034    pub struct SettingWiredWakeOnLan: u32 {
3035        /// Wake on PHY activity
3036        #[doc(alias = "NM_SETTING_WIRED_WAKE_ON_LAN_PHY")]
3037        const PHY = ffi::NM_SETTING_WIRED_WAKE_ON_LAN_PHY as _;
3038        /// Wake on unicast messages
3039        #[doc(alias = "NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST")]
3040        const UNICAST = ffi::NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST as _;
3041        /// Wake on multicast messages
3042        #[doc(alias = "NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST")]
3043        const MULTICAST = ffi::NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST as _;
3044        /// Wake on broadcast messages
3045        #[doc(alias = "NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST")]
3046        const BROADCAST = ffi::NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST as _;
3047        /// Wake on ARP
3048        #[doc(alias = "NM_SETTING_WIRED_WAKE_ON_LAN_ARP")]
3049        const ARP = ffi::NM_SETTING_WIRED_WAKE_ON_LAN_ARP as _;
3050        /// Wake on magic packet
3051        #[doc(alias = "NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC")]
3052        const MAGIC = ffi::NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC as _;
3053        /// Use the default value
3054        #[doc(alias = "NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT")]
3055        const DEFAULT = ffi::NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT as _;
3056        /// Don't change configured settings
3057        #[doc(alias = "NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE")]
3058        const IGNORE = ffi::NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE as _;
3059    }
3060}
3061
3062#[cfg(feature = "v1_2")]
3063#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
3064#[doc(hidden)]
3065impl IntoGlib for SettingWiredWakeOnLan {
3066    type GlibType = ffi::NMSettingWiredWakeOnLan;
3067
3068    #[inline]
3069    fn into_glib(self) -> ffi::NMSettingWiredWakeOnLan {
3070        self.bits()
3071    }
3072}
3073
3074#[cfg(feature = "v1_2")]
3075#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
3076#[doc(hidden)]
3077impl FromGlib<ffi::NMSettingWiredWakeOnLan> for SettingWiredWakeOnLan {
3078    #[inline]
3079    unsafe fn from_glib(value: ffi::NMSettingWiredWakeOnLan) -> Self {
3080        skip_assert_initialized!();
3081        Self::from_bits_truncate(value)
3082    }
3083}
3084
3085#[cfg(feature = "v1_2")]
3086#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
3087impl StaticType for SettingWiredWakeOnLan {
3088    #[inline]
3089    #[doc(alias = "nm_setting_wired_wake_on_lan_get_type")]
3090    fn static_type() -> glib::Type {
3091        unsafe { from_glib(ffi::nm_setting_wired_wake_on_lan_get_type()) }
3092    }
3093}
3094
3095#[cfg(feature = "v1_2")]
3096#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
3097impl glib::HasParamSpec for SettingWiredWakeOnLan {
3098    type ParamSpec = glib::ParamSpecFlags;
3099    type SetValue = Self;
3100    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
3101
3102    fn param_spec_builder() -> Self::BuilderFn {
3103        Self::ParamSpec::builder
3104    }
3105}
3106
3107#[cfg(feature = "v1_2")]
3108#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
3109impl glib::value::ValueType for SettingWiredWakeOnLan {
3110    type Type = Self;
3111}
3112
3113#[cfg(feature = "v1_2")]
3114#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
3115unsafe impl<'a> glib::value::FromValue<'a> for SettingWiredWakeOnLan {
3116    type Checker = glib::value::GenericValueTypeChecker<Self>;
3117
3118    #[inline]
3119    unsafe fn from_value(value: &'a glib::Value) -> Self {
3120        skip_assert_initialized!();
3121        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
3122    }
3123}
3124
3125#[cfg(feature = "v1_2")]
3126#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
3127impl ToValue for SettingWiredWakeOnLan {
3128    #[inline]
3129    fn to_value(&self) -> glib::Value {
3130        let mut value = glib::Value::for_value_type::<Self>();
3131        unsafe {
3132            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
3133        }
3134        value
3135    }
3136
3137    #[inline]
3138    fn value_type(&self) -> glib::Type {
3139        Self::static_type()
3140    }
3141}
3142
3143#[cfg(feature = "v1_2")]
3144#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
3145impl From<SettingWiredWakeOnLan> for glib::Value {
3146    #[inline]
3147    fn from(v: SettingWiredWakeOnLan) -> Self {
3148        skip_assert_initialized!();
3149        ToValue::to_value(&v)
3150    }
3151}
3152
3153#[cfg(feature = "v1_10")]
3154bitflags! {
3155    /// Configure the use of WPS by a connection while it activates.
3156    ///
3157    /// Note: prior to 1.16, this was a GEnum type instead of a GFlags type
3158    /// although, with the same numeric values.
3159    #[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
3160    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
3161    #[doc(alias = "NMSettingWirelessSecurityWpsMethod")]
3162    pub struct SettingWirelessSecurityWpsMethod: u32 {
3163        /// Attempt whichever method AP supports
3164        #[doc(alias = "NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_DEFAULT")]
3165        const DEFAULT = ffi::NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_DEFAULT as _;
3166        /// WPS can not be used.
3167        #[doc(alias = "NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_DISABLED")]
3168        const DISABLED = ffi::NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_DISABLED as _;
3169        /// Use WPS, any method
3170        #[doc(alias = "NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_AUTO")]
3171        const AUTO = ffi::NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_AUTO as _;
3172        /// use WPS push-button method
3173        #[doc(alias = "NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_PBC")]
3174        const PBC = ffi::NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_PBC as _;
3175        /// use PIN method
3176        #[doc(alias = "NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_PIN")]
3177        const PIN = ffi::NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_PIN as _;
3178    }
3179}
3180
3181#[cfg(feature = "v1_10")]
3182#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
3183#[doc(hidden)]
3184impl IntoGlib for SettingWirelessSecurityWpsMethod {
3185    type GlibType = ffi::NMSettingWirelessSecurityWpsMethod;
3186
3187    #[inline]
3188    fn into_glib(self) -> ffi::NMSettingWirelessSecurityWpsMethod {
3189        self.bits()
3190    }
3191}
3192
3193#[cfg(feature = "v1_10")]
3194#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
3195#[doc(hidden)]
3196impl FromGlib<ffi::NMSettingWirelessSecurityWpsMethod> for SettingWirelessSecurityWpsMethod {
3197    #[inline]
3198    unsafe fn from_glib(value: ffi::NMSettingWirelessSecurityWpsMethod) -> Self {
3199        skip_assert_initialized!();
3200        Self::from_bits_truncate(value)
3201    }
3202}
3203
3204#[cfg(feature = "v1_10")]
3205#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
3206impl StaticType for SettingWirelessSecurityWpsMethod {
3207    #[inline]
3208    #[doc(alias = "nm_setting_wireless_security_wps_method_get_type")]
3209    fn static_type() -> glib::Type {
3210        unsafe { from_glib(ffi::nm_setting_wireless_security_wps_method_get_type()) }
3211    }
3212}
3213
3214#[cfg(feature = "v1_10")]
3215#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
3216impl glib::HasParamSpec for SettingWirelessSecurityWpsMethod {
3217    type ParamSpec = glib::ParamSpecFlags;
3218    type SetValue = Self;
3219    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
3220
3221    fn param_spec_builder() -> Self::BuilderFn {
3222        Self::ParamSpec::builder
3223    }
3224}
3225
3226#[cfg(feature = "v1_10")]
3227#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
3228impl glib::value::ValueType for SettingWirelessSecurityWpsMethod {
3229    type Type = Self;
3230}
3231
3232#[cfg(feature = "v1_10")]
3233#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
3234unsafe impl<'a> glib::value::FromValue<'a> for SettingWirelessSecurityWpsMethod {
3235    type Checker = glib::value::GenericValueTypeChecker<Self>;
3236
3237    #[inline]
3238    unsafe fn from_value(value: &'a glib::Value) -> Self {
3239        skip_assert_initialized!();
3240        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
3241    }
3242}
3243
3244#[cfg(feature = "v1_10")]
3245#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
3246impl ToValue for SettingWirelessSecurityWpsMethod {
3247    #[inline]
3248    fn to_value(&self) -> glib::Value {
3249        let mut value = glib::Value::for_value_type::<Self>();
3250        unsafe {
3251            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
3252        }
3253        value
3254    }
3255
3256    #[inline]
3257    fn value_type(&self) -> glib::Type {
3258        Self::static_type()
3259    }
3260}
3261
3262#[cfg(feature = "v1_10")]
3263#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
3264impl From<SettingWirelessSecurityWpsMethod> for glib::Value {
3265    #[inline]
3266    fn from(v: SettingWirelessSecurityWpsMethod) -> Self {
3267        skip_assert_initialized!();
3268        ToValue::to_value(&v)
3269    }
3270}
3271
3272#[cfg(feature = "v1_12")]
3273bitflags! {
3274    /// Options for #NMSettingWireless:wake-on-wlan. Note that not all options
3275    /// are supported by all devices.
3276    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3277    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
3278    #[doc(alias = "NMSettingWirelessWakeOnWLan")]
3279    pub struct SettingWirelessWakeOnWLan: u32 {
3280        /// Wake on any activity
3281        #[doc(alias = "NM_SETTING_WIRELESS_WAKE_ON_WLAN_ANY")]
3282        const ANY = ffi::NM_SETTING_WIRELESS_WAKE_ON_WLAN_ANY as _;
3283        /// Wake on disconnect
3284        #[doc(alias = "NM_SETTING_WIRELESS_WAKE_ON_WLAN_DISCONNECT")]
3285        const DISCONNECT = ffi::NM_SETTING_WIRELESS_WAKE_ON_WLAN_DISCONNECT as _;
3286        /// Wake on magic packet
3287        #[doc(alias = "NM_SETTING_WIRELESS_WAKE_ON_WLAN_MAGIC")]
3288        const MAGIC = ffi::NM_SETTING_WIRELESS_WAKE_ON_WLAN_MAGIC as _;
3289        /// Wake on GTK rekey failure
3290        #[doc(alias = "NM_SETTING_WIRELESS_WAKE_ON_WLAN_GTK_REKEY_FAILURE")]
3291        const GTK_REKEY_FAILURE = ffi::NM_SETTING_WIRELESS_WAKE_ON_WLAN_GTK_REKEY_FAILURE as _;
3292        /// Wake on EAP identity request
3293        #[doc(alias = "NM_SETTING_WIRELESS_WAKE_ON_WLAN_EAP_IDENTITY_REQUEST")]
3294        const EAP_IDENTITY_REQUEST = ffi::NM_SETTING_WIRELESS_WAKE_ON_WLAN_EAP_IDENTITY_REQUEST as _;
3295        /// Wake on 4way handshake
3296        #[doc(alias = "NM_SETTING_WIRELESS_WAKE_ON_WLAN_4WAY_HANDSHAKE")]
3297        const _4WAY_HANDSHAKE = ffi::NM_SETTING_WIRELESS_WAKE_ON_WLAN_4WAY_HANDSHAKE as _;
3298        /// Wake on rfkill release
3299        #[doc(alias = "NM_SETTING_WIRELESS_WAKE_ON_WLAN_RFKILL_RELEASE")]
3300        const RFKILL_RELEASE = ffi::NM_SETTING_WIRELESS_WAKE_ON_WLAN_RFKILL_RELEASE as _;
3301        #[doc(alias = "NM_SETTING_WIRELESS_WAKE_ON_WLAN_TCP")]
3302        const TCP = ffi::NM_SETTING_WIRELESS_WAKE_ON_WLAN_TCP as _;
3303        /// Wake on all events. This does not
3304        ///   include the exclusive flags @NM_SETTING_WIRELESS_WAKE_ON_WLAN_DEFAULT or
3305        ///   @NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE.
3306        #[doc(alias = "NM_SETTING_WIRELESS_WAKE_ON_WLAN_ALL")]
3307        const ALL = ffi::NM_SETTING_WIRELESS_WAKE_ON_WLAN_ALL as _;
3308        /// Use the default value
3309        #[doc(alias = "NM_SETTING_WIRELESS_WAKE_ON_WLAN_DEFAULT")]
3310        const DEFAULT = ffi::NM_SETTING_WIRELESS_WAKE_ON_WLAN_DEFAULT as _;
3311        /// Don't change configured settings
3312        #[doc(alias = "NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE")]
3313        const IGNORE = ffi::NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE as _;
3314    }
3315}
3316
3317#[cfg(feature = "v1_12")]
3318#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3319#[doc(hidden)]
3320impl IntoGlib for SettingWirelessWakeOnWLan {
3321    type GlibType = ffi::NMSettingWirelessWakeOnWLan;
3322
3323    #[inline]
3324    fn into_glib(self) -> ffi::NMSettingWirelessWakeOnWLan {
3325        self.bits()
3326    }
3327}
3328
3329#[cfg(feature = "v1_12")]
3330#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3331#[doc(hidden)]
3332impl FromGlib<ffi::NMSettingWirelessWakeOnWLan> for SettingWirelessWakeOnWLan {
3333    #[inline]
3334    unsafe fn from_glib(value: ffi::NMSettingWirelessWakeOnWLan) -> Self {
3335        skip_assert_initialized!();
3336        Self::from_bits_truncate(value)
3337    }
3338}
3339
3340#[cfg(feature = "v1_12")]
3341#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3342impl StaticType for SettingWirelessWakeOnWLan {
3343    #[inline]
3344    #[doc(alias = "nm_setting_wireless_wake_on_wlan_get_type")]
3345    fn static_type() -> glib::Type {
3346        unsafe { from_glib(ffi::nm_setting_wireless_wake_on_wlan_get_type()) }
3347    }
3348}
3349
3350#[cfg(feature = "v1_12")]
3351#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3352impl glib::HasParamSpec for SettingWirelessWakeOnWLan {
3353    type ParamSpec = glib::ParamSpecFlags;
3354    type SetValue = Self;
3355    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
3356
3357    fn param_spec_builder() -> Self::BuilderFn {
3358        Self::ParamSpec::builder
3359    }
3360}
3361
3362#[cfg(feature = "v1_12")]
3363#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3364impl glib::value::ValueType for SettingWirelessWakeOnWLan {
3365    type Type = Self;
3366}
3367
3368#[cfg(feature = "v1_12")]
3369#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3370unsafe impl<'a> glib::value::FromValue<'a> for SettingWirelessWakeOnWLan {
3371    type Checker = glib::value::GenericValueTypeChecker<Self>;
3372
3373    #[inline]
3374    unsafe fn from_value(value: &'a glib::Value) -> Self {
3375        skip_assert_initialized!();
3376        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
3377    }
3378}
3379
3380#[cfg(feature = "v1_12")]
3381#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3382impl ToValue for SettingWirelessWakeOnWLan {
3383    #[inline]
3384    fn to_value(&self) -> glib::Value {
3385        let mut value = glib::Value::for_value_type::<Self>();
3386        unsafe {
3387            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
3388        }
3389        value
3390    }
3391
3392    #[inline]
3393    fn value_type(&self) -> glib::Type {
3394        Self::static_type()
3395    }
3396}
3397
3398#[cfg(feature = "v1_12")]
3399#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3400impl From<SettingWirelessWakeOnWLan> for glib::Value {
3401    #[inline]
3402    fn from(v: SettingWirelessWakeOnWLan) -> Self {
3403        skip_assert_initialized!();
3404        ToValue::to_value(&v)
3405    }
3406}
3407
3408#[cfg(feature = "v1_20")]
3409bitflags! {
3410    /// Numeric flags for the "flags" argument of AddConnection2() D-Bus API.
3411    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
3412    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
3413    #[doc(alias = "NMSettingsAddConnection2Flags")]
3414    pub struct SettingsAddConnection2Flags: u32 {
3415        /// an alias for numeric zero, no flags set.
3416        #[doc(alias = "NM_SETTINGS_ADD_CONNECTION2_FLAG_NONE")]
3417        const NONE = ffi::NM_SETTINGS_ADD_CONNECTION2_FLAG_NONE as _;
3418        /// to persist the connection to disk.
3419        #[doc(alias = "NM_SETTINGS_ADD_CONNECTION2_FLAG_TO_DISK")]
3420        const TO_DISK = ffi::NM_SETTINGS_ADD_CONNECTION2_FLAG_TO_DISK as _;
3421        /// to make the connection in-memory only.
3422        #[doc(alias = "NM_SETTINGS_ADD_CONNECTION2_FLAG_IN_MEMORY")]
3423        const IN_MEMORY = ffi::NM_SETTINGS_ADD_CONNECTION2_FLAG_IN_MEMORY as _;
3424        /// usually, when the connection
3425        ///   has autoconnect enabled and gets added, it becomes eligible to autoconnect
3426        ///   right away. Setting this flag, disables autoconnect until the connection
3427        ///   is manually activated.
3428        #[doc(alias = "NM_SETTINGS_ADD_CONNECTION2_FLAG_BLOCK_AUTOCONNECT")]
3429        const BLOCK_AUTOCONNECT = ffi::NM_SETTINGS_ADD_CONNECTION2_FLAG_BLOCK_AUTOCONNECT as _;
3430    }
3431}
3432
3433#[cfg(feature = "v1_20")]
3434#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
3435#[doc(hidden)]
3436impl IntoGlib for SettingsAddConnection2Flags {
3437    type GlibType = ffi::NMSettingsAddConnection2Flags;
3438
3439    #[inline]
3440    fn into_glib(self) -> ffi::NMSettingsAddConnection2Flags {
3441        self.bits()
3442    }
3443}
3444
3445#[cfg(feature = "v1_20")]
3446#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
3447#[doc(hidden)]
3448impl FromGlib<ffi::NMSettingsAddConnection2Flags> for SettingsAddConnection2Flags {
3449    #[inline]
3450    unsafe fn from_glib(value: ffi::NMSettingsAddConnection2Flags) -> Self {
3451        skip_assert_initialized!();
3452        Self::from_bits_truncate(value)
3453    }
3454}
3455
3456#[cfg(feature = "v1_20")]
3457#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
3458impl StaticType for SettingsAddConnection2Flags {
3459    #[inline]
3460    #[doc(alias = "nm_settings_add_connection2_flags_get_type")]
3461    fn static_type() -> glib::Type {
3462        unsafe { from_glib(ffi::nm_settings_add_connection2_flags_get_type()) }
3463    }
3464}
3465
3466#[cfg(feature = "v1_20")]
3467#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
3468impl glib::HasParamSpec for SettingsAddConnection2Flags {
3469    type ParamSpec = glib::ParamSpecFlags;
3470    type SetValue = Self;
3471    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
3472
3473    fn param_spec_builder() -> Self::BuilderFn {
3474        Self::ParamSpec::builder
3475    }
3476}
3477
3478#[cfg(feature = "v1_20")]
3479#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
3480impl glib::value::ValueType for SettingsAddConnection2Flags {
3481    type Type = Self;
3482}
3483
3484#[cfg(feature = "v1_20")]
3485#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
3486unsafe impl<'a> glib::value::FromValue<'a> for SettingsAddConnection2Flags {
3487    type Checker = glib::value::GenericValueTypeChecker<Self>;
3488
3489    #[inline]
3490    unsafe fn from_value(value: &'a glib::Value) -> Self {
3491        skip_assert_initialized!();
3492        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
3493    }
3494}
3495
3496#[cfg(feature = "v1_20")]
3497#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
3498impl ToValue for SettingsAddConnection2Flags {
3499    #[inline]
3500    fn to_value(&self) -> glib::Value {
3501        let mut value = glib::Value::for_value_type::<Self>();
3502        unsafe {
3503            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
3504        }
3505        value
3506    }
3507
3508    #[inline]
3509    fn value_type(&self) -> glib::Type {
3510        Self::static_type()
3511    }
3512}
3513
3514#[cfg(feature = "v1_20")]
3515#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
3516impl From<SettingsAddConnection2Flags> for glib::Value {
3517    #[inline]
3518    fn from(v: SettingsAddConnection2Flags) -> Self {
3519        skip_assert_initialized!();
3520        ToValue::to_value(&v)
3521    }
3522}
3523
3524#[cfg(feature = "v1_12")]
3525bitflags! {
3526    /// Flags describing the current activation state.
3527    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3528    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
3529    #[doc(alias = "NMSettingsConnectionFlags")]
3530    pub struct SettingsConnectionFlags: u32 {
3531        /// an alias for numeric zero, no flags set.
3532        #[doc(alias = "NM_SETTINGS_CONNECTION_FLAG_NONE")]
3533        const NONE = ffi::NM_SETTINGS_CONNECTION_FLAG_NONE as _;
3534        /// the connection is not saved to disk.
3535        ///   That either means, that the connection is in-memory only and currently
3536        ///   is not backed by a file. Or, that the connection is backed by a file,
3537        ///   but has modifications in-memory that were not persisted to disk.
3538        #[doc(alias = "NM_SETTINGS_CONNECTION_FLAG_UNSAVED")]
3539        const UNSAVED = ffi::NM_SETTINGS_CONNECTION_FLAG_UNSAVED as _;
3540        /// A connection is "nm-generated" if
3541        ///  it was generated by NetworkManger. If the connection gets modified or saved
3542        ///  by the user, the flag gets cleared. A nm-generated is also unsaved
3543        ///  and has no backing file as it is in-memory only.
3544        #[doc(alias = "NM_SETTINGS_CONNECTION_FLAG_NM_GENERATED")]
3545        const NM_GENERATED = ffi::NM_SETTINGS_CONNECTION_FLAG_NM_GENERATED as _;
3546        /// The connection will be deleted
3547        ///  when it disconnects. That is for in-memory connections (unsaved), which are
3548        ///  currently active but deleted on disconnect. Volatile connections are
3549        ///  always unsaved, but they are also no backing file on disk and are entirely
3550        ///  in-memory only.
3551        #[doc(alias = "NM_SETTINGS_CONNECTION_FLAG_VOLATILE")]
3552        const VOLATILE = ffi::NM_SETTINGS_CONNECTION_FLAG_VOLATILE as _;
3553        /// the profile was generated to represent
3554        ///  an external configuration of a networking device. Since: 1.26.
3555        #[doc(alias = "NM_SETTINGS_CONNECTION_FLAG_EXTERNAL")]
3556        const EXTERNAL = ffi::NM_SETTINGS_CONNECTION_FLAG_EXTERNAL as _;
3557    }
3558}
3559
3560#[cfg(feature = "v1_12")]
3561#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3562#[doc(hidden)]
3563impl IntoGlib for SettingsConnectionFlags {
3564    type GlibType = ffi::NMSettingsConnectionFlags;
3565
3566    #[inline]
3567    fn into_glib(self) -> ffi::NMSettingsConnectionFlags {
3568        self.bits()
3569    }
3570}
3571
3572#[cfg(feature = "v1_12")]
3573#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3574#[doc(hidden)]
3575impl FromGlib<ffi::NMSettingsConnectionFlags> for SettingsConnectionFlags {
3576    #[inline]
3577    unsafe fn from_glib(value: ffi::NMSettingsConnectionFlags) -> Self {
3578        skip_assert_initialized!();
3579        Self::from_bits_truncate(value)
3580    }
3581}
3582
3583#[cfg(feature = "v1_12")]
3584#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3585impl StaticType for SettingsConnectionFlags {
3586    #[inline]
3587    #[doc(alias = "nm_settings_connection_flags_get_type")]
3588    fn static_type() -> glib::Type {
3589        unsafe { from_glib(ffi::nm_settings_connection_flags_get_type()) }
3590    }
3591}
3592
3593#[cfg(feature = "v1_12")]
3594#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3595impl glib::HasParamSpec for SettingsConnectionFlags {
3596    type ParamSpec = glib::ParamSpecFlags;
3597    type SetValue = Self;
3598    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
3599
3600    fn param_spec_builder() -> Self::BuilderFn {
3601        Self::ParamSpec::builder
3602    }
3603}
3604
3605#[cfg(feature = "v1_12")]
3606#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3607impl glib::value::ValueType for SettingsConnectionFlags {
3608    type Type = Self;
3609}
3610
3611#[cfg(feature = "v1_12")]
3612#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3613unsafe impl<'a> glib::value::FromValue<'a> for SettingsConnectionFlags {
3614    type Checker = glib::value::GenericValueTypeChecker<Self>;
3615
3616    #[inline]
3617    unsafe fn from_value(value: &'a glib::Value) -> Self {
3618        skip_assert_initialized!();
3619        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
3620    }
3621}
3622
3623#[cfg(feature = "v1_12")]
3624#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3625impl ToValue for SettingsConnectionFlags {
3626    #[inline]
3627    fn to_value(&self) -> glib::Value {
3628        let mut value = glib::Value::for_value_type::<Self>();
3629        unsafe {
3630            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
3631        }
3632        value
3633    }
3634
3635    #[inline]
3636    fn value_type(&self) -> glib::Type {
3637        Self::static_type()
3638    }
3639}
3640
3641#[cfg(feature = "v1_12")]
3642#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3643impl From<SettingsConnectionFlags> for glib::Value {
3644    #[inline]
3645    fn from(v: SettingsConnectionFlags) -> Self {
3646        skip_assert_initialized!();
3647        ToValue::to_value(&v)
3648    }
3649}
3650
3651#[cfg(feature = "v1_12")]
3652bitflags! {
3653    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3654    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
3655    #[doc(alias = "NMSettingsUpdate2Flags")]
3656    pub struct SettingsUpdate2Flags: u32 {
3657        /// an alias for numeric zero, no flags set.
3658        #[doc(alias = "NM_SETTINGS_UPDATE2_FLAG_NONE")]
3659        const NONE = ffi::NM_SETTINGS_UPDATE2_FLAG_NONE as _;
3660        /// to persist the connection to disk.
3661        #[doc(alias = "NM_SETTINGS_UPDATE2_FLAG_TO_DISK")]
3662        const TO_DISK = ffi::NM_SETTINGS_UPDATE2_FLAG_TO_DISK as _;
3663        /// makes the profile in-memory.
3664        ///   Note that such profiles are stored in keyfile format under /run.
3665        ///   If the file is already in-memory, the file in /run is updated in-place.
3666        ///   Otherwise, the previous storage for the profile is left unchanged
3667        ///   on disk, and the in-memory copy shadows it.
3668        ///   Note that the original filename of the previous persistent storage (if any)
3669        ///   is remembered. That means, when later persisting the profile again to disk,
3670        ///   the file on disk will be overwritten again.
3671        ///   Likewise, when finally deleting the profile, both the storage from /run
3672        ///   and persistent storage are deleted (or if the persistent storage does not
3673        ///   allow deletion, and nmmeta file is written to mark the UUID as deleted).
3674        #[doc(alias = "NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY")]
3675        const IN_MEMORY = ffi::NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY as _;
3676        /// this is almost the same
3677        ///   as [`IN_MEMORY`][Self::IN_MEMORY], with one difference: when later deleting
3678        ///   the profile, the original profile will not be deleted. Instead a nmmeta
3679        ///   file is written to /run to indicate that the profile is gone.
3680        ///   Note that if such a nmmeta tombstone file exists and hides a file in persistent
3681        ///   storage, then when re-adding the profile with the same UUID, then the original
3682        ///   storage is taken over again.
3683        #[doc(alias = "NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_DETACHED")]
3684        const IN_MEMORY_DETACHED = ffi::NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_DETACHED as _;
3685        /// this is like [`IN_MEMORY`][Self::IN_MEMORY],
3686        ///   but if the connection has a corresponding file on persistent storage, the file
3687        ///   will be deleted right away. If the profile is later again persisted to disk,
3688        ///   a new, unused filename will be chosen.
3689        #[doc(alias = "NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_ONLY")]
3690        const IN_MEMORY_ONLY = ffi::NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_ONLY as _;
3691        /// This can be specified with either
3692        ///   [`IN_MEMORY`][Self::IN_MEMORY], [`IN_MEMORY_DETACHED`][Self::IN_MEMORY_DETACHED]
3693        ///   or [`IN_MEMORY_ONLY`][Self::IN_MEMORY_ONLY].
3694        ///   After making the connection in-memory only, the connection is marked
3695        ///   as volatile. That means, if the connection is currently not active
3696        ///   it will be deleted right away. Otherwise, it is marked to for deletion
3697        ///   once the connection deactivates. A volatile connection cannot autoactivate
3698        ///   again (because it's about to be deleted), but a manual activation will
3699        ///   clear the volatile flag.
3700        #[doc(alias = "NM_SETTINGS_UPDATE2_FLAG_VOLATILE")]
3701        const VOLATILE = ffi::NM_SETTINGS_UPDATE2_FLAG_VOLATILE as _;
3702        /// usually, when the connection
3703        ///   has autoconnect enabled and is modified, it becomes eligible to autoconnect
3704        ///   right away. Setting this flag, disables autoconnect until the connection
3705        ///   is manually activated.
3706        #[doc(alias = "NM_SETTINGS_UPDATE2_FLAG_BLOCK_AUTOCONNECT")]
3707        const BLOCK_AUTOCONNECT = ffi::NM_SETTINGS_UPDATE2_FLAG_BLOCK_AUTOCONNECT as _;
3708        /// when a profile gets modified that is
3709        ///   currently active, then these changes don't take effect for the active
3710        ///   device unless the profile gets reactivated or the configuration reapplied.
3711        ///   There are two exceptions: by default "connection.zone" and "connection.metered"
3712        ///   properties take effect immediately. Specify this flag to prevent these
3713        ///   properties to take effect, so that the change is restricted to modify
3714        ///   the profile. Since: 1.20.
3715        #[doc(alias = "NM_SETTINGS_UPDATE2_FLAG_NO_REAPPLY")]
3716        const NO_REAPPLY = ffi::NM_SETTINGS_UPDATE2_FLAG_NO_REAPPLY as _;
3717    }
3718}
3719
3720#[cfg(feature = "v1_12")]
3721#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3722#[doc(hidden)]
3723impl IntoGlib for SettingsUpdate2Flags {
3724    type GlibType = ffi::NMSettingsUpdate2Flags;
3725
3726    #[inline]
3727    fn into_glib(self) -> ffi::NMSettingsUpdate2Flags {
3728        self.bits()
3729    }
3730}
3731
3732#[cfg(feature = "v1_12")]
3733#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3734#[doc(hidden)]
3735impl FromGlib<ffi::NMSettingsUpdate2Flags> for SettingsUpdate2Flags {
3736    #[inline]
3737    unsafe fn from_glib(value: ffi::NMSettingsUpdate2Flags) -> Self {
3738        skip_assert_initialized!();
3739        Self::from_bits_truncate(value)
3740    }
3741}
3742
3743#[cfg(feature = "v1_12")]
3744#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3745impl StaticType for SettingsUpdate2Flags {
3746    #[inline]
3747    #[doc(alias = "nm_settings_update2_flags_get_type")]
3748    fn static_type() -> glib::Type {
3749        unsafe { from_glib(ffi::nm_settings_update2_flags_get_type()) }
3750    }
3751}
3752
3753#[cfg(feature = "v1_12")]
3754#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3755impl glib::HasParamSpec for SettingsUpdate2Flags {
3756    type ParamSpec = glib::ParamSpecFlags;
3757    type SetValue = Self;
3758    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
3759
3760    fn param_spec_builder() -> Self::BuilderFn {
3761        Self::ParamSpec::builder
3762    }
3763}
3764
3765#[cfg(feature = "v1_12")]
3766#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3767impl glib::value::ValueType for SettingsUpdate2Flags {
3768    type Type = Self;
3769}
3770
3771#[cfg(feature = "v1_12")]
3772#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3773unsafe impl<'a> glib::value::FromValue<'a> for SettingsUpdate2Flags {
3774    type Checker = glib::value::GenericValueTypeChecker<Self>;
3775
3776    #[inline]
3777    unsafe fn from_value(value: &'a glib::Value) -> Self {
3778        skip_assert_initialized!();
3779        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
3780    }
3781}
3782
3783#[cfg(feature = "v1_12")]
3784#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3785impl ToValue for SettingsUpdate2Flags {
3786    #[inline]
3787    fn to_value(&self) -> glib::Value {
3788        let mut value = glib::Value::for_value_type::<Self>();
3789        unsafe {
3790            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
3791        }
3792        value
3793    }
3794
3795    #[inline]
3796    fn value_type(&self) -> glib::Type {
3797        Self::static_type()
3798    }
3799}
3800
3801#[cfg(feature = "v1_12")]
3802#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3803impl From<SettingsUpdate2Flags> for glib::Value {
3804    #[inline]
3805    fn from(v: SettingsUpdate2Flags) -> Self {
3806        skip_assert_initialized!();
3807        ToValue::to_value(&v)
3808    }
3809}
3810
3811#[cfg(feature = "v1_12")]
3812bitflags! {
3813    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3814    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
3815    #[doc(alias = "NMTeamLinkWatcherArpPingFlags")]
3816    pub struct TeamLinkWatcherArpPingFlags: u32 {
3817        /// the arp_ping link watcher
3818        ///    option 'validate_active' is enabled (set to true).
3819        #[doc(alias = "NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_VALIDATE_ACTIVE")]
3820        const VALIDATE_ACTIVE = ffi::NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_VALIDATE_ACTIVE as _;
3821        /// the arp_ping link watcher
3822        ///    option 'validate_inactive' is enabled (set to true).
3823        #[doc(alias = "NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_VALIDATE_INACTIVE")]
3824        const VALIDATE_INACTIVE = ffi::NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_VALIDATE_INACTIVE as _;
3825        /// the arp_ping link watcher option
3826        ///    'send_always' is enabled (set to true).
3827        #[doc(alias = "NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_SEND_ALWAYS")]
3828        const SEND_ALWAYS = ffi::NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_SEND_ALWAYS as _;
3829    }
3830}
3831
3832#[cfg(feature = "v1_12")]
3833#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3834#[doc(hidden)]
3835impl IntoGlib for TeamLinkWatcherArpPingFlags {
3836    type GlibType = ffi::NMTeamLinkWatcherArpPingFlags;
3837
3838    #[inline]
3839    fn into_glib(self) -> ffi::NMTeamLinkWatcherArpPingFlags {
3840        self.bits()
3841    }
3842}
3843
3844#[cfg(feature = "v1_12")]
3845#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3846#[doc(hidden)]
3847impl FromGlib<ffi::NMTeamLinkWatcherArpPingFlags> for TeamLinkWatcherArpPingFlags {
3848    #[inline]
3849    unsafe fn from_glib(value: ffi::NMTeamLinkWatcherArpPingFlags) -> Self {
3850        skip_assert_initialized!();
3851        Self::from_bits_truncate(value)
3852    }
3853}
3854
3855#[cfg(feature = "v1_12")]
3856#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3857impl StaticType for TeamLinkWatcherArpPingFlags {
3858    #[inline]
3859    #[doc(alias = "nm_team_link_watcher_arp_ping_flags_get_type")]
3860    fn static_type() -> glib::Type {
3861        unsafe { from_glib(ffi::nm_team_link_watcher_arp_ping_flags_get_type()) }
3862    }
3863}
3864
3865#[cfg(feature = "v1_12")]
3866#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3867impl glib::HasParamSpec for TeamLinkWatcherArpPingFlags {
3868    type ParamSpec = glib::ParamSpecFlags;
3869    type SetValue = Self;
3870    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
3871
3872    fn param_spec_builder() -> Self::BuilderFn {
3873        Self::ParamSpec::builder
3874    }
3875}
3876
3877#[cfg(feature = "v1_12")]
3878#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3879impl glib::value::ValueType for TeamLinkWatcherArpPingFlags {
3880    type Type = Self;
3881}
3882
3883#[cfg(feature = "v1_12")]
3884#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3885unsafe impl<'a> glib::value::FromValue<'a> for TeamLinkWatcherArpPingFlags {
3886    type Checker = glib::value::GenericValueTypeChecker<Self>;
3887
3888    #[inline]
3889    unsafe fn from_value(value: &'a glib::Value) -> Self {
3890        skip_assert_initialized!();
3891        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
3892    }
3893}
3894
3895#[cfg(feature = "v1_12")]
3896#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3897impl ToValue for TeamLinkWatcherArpPingFlags {
3898    #[inline]
3899    fn to_value(&self) -> glib::Value {
3900        let mut value = glib::Value::for_value_type::<Self>();
3901        unsafe {
3902            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
3903        }
3904        value
3905    }
3906
3907    #[inline]
3908    fn value_type(&self) -> glib::Type {
3909        Self::static_type()
3910    }
3911}
3912
3913#[cfg(feature = "v1_12")]
3914#[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
3915impl From<TeamLinkWatcherArpPingFlags> for glib::Value {
3916    #[inline]
3917    fn from(v: TeamLinkWatcherArpPingFlags) -> Self {
3918        skip_assert_initialized!();
3919        ToValue::to_value(&v)
3920    }
3921}
3922
3923bitflags! {
3924    /// #NMVlanFlags values control the behavior of the VLAN interface.
3925    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
3926    #[doc(alias = "NMVlanFlags")]
3927    pub struct VlanFlags: u32 {
3928        /// indicates that this interface should reorder
3929        ///  outgoing packet headers to look more like a non-VLAN Ethernet interface
3930        #[doc(alias = "NM_VLAN_FLAG_REORDER_HEADERS")]
3931        const REORDER_HEADERS = ffi::NM_VLAN_FLAG_REORDER_HEADERS as _;
3932        /// indicates that this interface should use GVRP to register
3933        ///  itself with its switch
3934        #[doc(alias = "NM_VLAN_FLAG_GVRP")]
3935        const GVRP = ffi::NM_VLAN_FLAG_GVRP as _;
3936        /// indicates that this interface's operating
3937        ///  state is tied to the underlying network interface but other details
3938        ///  (like routing) are not.
3939        #[doc(alias = "NM_VLAN_FLAG_LOOSE_BINDING")]
3940        const LOOSE_BINDING = ffi::NM_VLAN_FLAG_LOOSE_BINDING as _;
3941        /// indicates that this interface should use MVRP to register
3942        ///  itself with its switch
3943        #[doc(alias = "NM_VLAN_FLAG_MVRP")]
3944        const MVRP = ffi::NM_VLAN_FLAG_MVRP as _;
3945    }
3946}
3947
3948#[doc(hidden)]
3949impl IntoGlib for VlanFlags {
3950    type GlibType = ffi::NMVlanFlags;
3951
3952    #[inline]
3953    fn into_glib(self) -> ffi::NMVlanFlags {
3954        self.bits()
3955    }
3956}
3957
3958#[doc(hidden)]
3959impl FromGlib<ffi::NMVlanFlags> for VlanFlags {
3960    #[inline]
3961    unsafe fn from_glib(value: ffi::NMVlanFlags) -> Self {
3962        skip_assert_initialized!();
3963        Self::from_bits_truncate(value)
3964    }
3965}
3966
3967impl StaticType for VlanFlags {
3968    #[inline]
3969    #[doc(alias = "nm_vlan_flags_get_type")]
3970    fn static_type() -> glib::Type {
3971        unsafe { from_glib(ffi::nm_vlan_flags_get_type()) }
3972    }
3973}
3974
3975impl glib::HasParamSpec for VlanFlags {
3976    type ParamSpec = glib::ParamSpecFlags;
3977    type SetValue = Self;
3978    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
3979
3980    fn param_spec_builder() -> Self::BuilderFn {
3981        Self::ParamSpec::builder
3982    }
3983}
3984
3985impl glib::value::ValueType for VlanFlags {
3986    type Type = Self;
3987}
3988
3989unsafe impl<'a> glib::value::FromValue<'a> for VlanFlags {
3990    type Checker = glib::value::GenericValueTypeChecker<Self>;
3991
3992    #[inline]
3993    unsafe fn from_value(value: &'a glib::Value) -> Self {
3994        skip_assert_initialized!();
3995        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
3996    }
3997}
3998
3999impl ToValue for VlanFlags {
4000    #[inline]
4001    fn to_value(&self) -> glib::Value {
4002        let mut value = glib::Value::for_value_type::<Self>();
4003        unsafe {
4004            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
4005        }
4006        value
4007    }
4008
4009    #[inline]
4010    fn value_type(&self) -> glib::Type {
4011        Self::static_type()
4012    }
4013}
4014
4015impl From<VlanFlags> for glib::Value {
4016    #[inline]
4017    fn from(v: VlanFlags) -> Self {
4018        skip_assert_initialized!();
4019        ToValue::to_value(&v)
4020    }
4021}
4022
4023bitflags! {
4024    /// Flags that indicate certain capabilities of the plugin to editor programs.
4025    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
4026    #[doc(alias = "NMVpnEditorPluginCapability")]
4027    pub struct VpnEditorPluginCapability: u32 {
4028        /// Unknown or no capability.
4029        #[doc(alias = "NM_VPN_EDITOR_PLUGIN_CAPABILITY_NONE")]
4030        const NONE = ffi::NM_VPN_EDITOR_PLUGIN_CAPABILITY_NONE as _;
4031        /// The plugin can import new connections.
4032        #[doc(alias = "NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT")]
4033        const IMPORT = ffi::NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT as _;
4034        /// The plugin can export connections.
4035        #[doc(alias = "NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT")]
4036        const EXPORT = ffi::NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT as _;
4037        /// The plugin supports IPv6 addressing.
4038        #[doc(alias = "NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6")]
4039        const IPV6 = ffi::NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6 as _;
4040        /// The GUI editor plugin is not available. Since: 1.52.
4041        #[doc(alias = "NM_VPN_EDITOR_PLUGIN_CAPABILITY_NO_EDITOR")]
4042        const NO_EDITOR = ffi::NM_VPN_EDITOR_PLUGIN_CAPABILITY_NO_EDITOR as _;
4043    }
4044}
4045
4046#[doc(hidden)]
4047impl IntoGlib for VpnEditorPluginCapability {
4048    type GlibType = ffi::NMVpnEditorPluginCapability;
4049
4050    #[inline]
4051    fn into_glib(self) -> ffi::NMVpnEditorPluginCapability {
4052        self.bits()
4053    }
4054}
4055
4056#[doc(hidden)]
4057impl FromGlib<ffi::NMVpnEditorPluginCapability> for VpnEditorPluginCapability {
4058    #[inline]
4059    unsafe fn from_glib(value: ffi::NMVpnEditorPluginCapability) -> Self {
4060        skip_assert_initialized!();
4061        Self::from_bits_truncate(value)
4062    }
4063}
4064
4065impl StaticType for VpnEditorPluginCapability {
4066    #[inline]
4067    #[doc(alias = "nm_vpn_editor_plugin_capability_get_type")]
4068    fn static_type() -> glib::Type {
4069        unsafe { from_glib(ffi::nm_vpn_editor_plugin_capability_get_type()) }
4070    }
4071}
4072
4073impl glib::HasParamSpec for VpnEditorPluginCapability {
4074    type ParamSpec = glib::ParamSpecFlags;
4075    type SetValue = Self;
4076    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
4077
4078    fn param_spec_builder() -> Self::BuilderFn {
4079        Self::ParamSpec::builder
4080    }
4081}
4082
4083impl glib::value::ValueType for VpnEditorPluginCapability {
4084    type Type = Self;
4085}
4086
4087unsafe impl<'a> glib::value::FromValue<'a> for VpnEditorPluginCapability {
4088    type Checker = glib::value::GenericValueTypeChecker<Self>;
4089
4090    #[inline]
4091    unsafe fn from_value(value: &'a glib::Value) -> Self {
4092        skip_assert_initialized!();
4093        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
4094    }
4095}
4096
4097impl ToValue for VpnEditorPluginCapability {
4098    #[inline]
4099    fn to_value(&self) -> glib::Value {
4100        let mut value = glib::Value::for_value_type::<Self>();
4101        unsafe {
4102            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
4103        }
4104        value
4105    }
4106
4107    #[inline]
4108    fn value_type(&self) -> glib::Type {
4109        Self::static_type()
4110    }
4111}
4112
4113impl From<VpnEditorPluginCapability> for glib::Value {
4114    #[inline]
4115    fn from(v: VpnEditorPluginCapability) -> Self {
4116        skip_assert_initialized!();
4117        ToValue::to_value(&v)
4118    }
4119}