nm_rs/auto/
device_vxlan.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#![allow(deprecated)]
6
7use crate::{ffi,Device,Object};
8use glib::{prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
9use std::{boxed::Box as Box_};
10
11glib::wrapper! {
12    ///
13    ///
14    /// ## Properties
15    ///
16    ///
17    /// #### `ageing`
18    ///  The lifetime in seconds of FDB entries learnt by the kernel.
19    ///
20    /// Readable
21    ///
22    ///
23    /// #### `carrier`
24    ///  Whether the device has carrier.
25    ///
26    /// This property is not implemented yet, and the property is always FALSE.
27    ///
28    /// Readable
29    ///
30    ///
31    /// #### `dst-port`
32    ///  The UDP destination port used to communicate with the remote VXLAN tunnel
33    /// endpoint.
34    ///
35    /// Readable
36    ///
37    ///
38    /// #### `group`
39    ///  The unicast destination IP address used in outgoing packets when the
40    /// destination link layer address is not known in the VXLAN device
41    /// forwarding database or the multicast IP address joined.
42    ///
43    /// Readable
44    ///
45    ///
46    /// #### `id`
47    ///  The device's VXLAN ID.
48    ///
49    /// Readable
50    ///
51    ///
52    /// #### `l2miss`
53    ///  Whether netlink LL ADDR miss notifications are generated.
54    ///
55    /// Readable
56    ///
57    ///
58    /// #### `l3miss`
59    ///  Whether netlink IP ADDR miss notifications are generated.
60    ///
61    /// Readable
62    ///
63    ///
64    /// #### `learning`
65    ///  Whether unknown source link layer addresses and IP addresses are entered
66    /// into the VXLAN device forwarding database.
67    ///
68    /// Readable
69    ///
70    ///
71    /// #### `limit`
72    ///  The maximum number of entries that can be added to the forwarding table.
73    ///
74    /// Readable
75    ///
76    ///
77    /// #### `local`
78    ///  The source IP address to use in outgoing packets.
79    ///
80    /// Readable
81    ///
82    ///
83    /// #### `parent`
84    ///  The devices's parent device.
85    ///
86    /// Readable
87    ///
88    ///
89    /// #### `proxy`
90    ///  Whether ARP proxy is turned on.
91    ///
92    /// Readable
93    ///
94    ///
95    /// #### `rsc`
96    ///  Whether route short circuit is turned on.
97    ///
98    /// Readable
99    ///
100    ///
101    /// #### `src-port-max`
102    ///  The maximum UDP source port used to communicate with the remote VXLAN
103    /// tunnel endpoint.
104    ///
105    /// Readable
106    ///
107    ///
108    /// #### `src-port-min`
109    ///  The minimum UDP source port used to communicate with the remote VXLAN
110    /// tunnel endpoint.
111    ///
112    /// Readable
113    ///
114    ///
115    /// #### `tos`
116    ///  The TOS value to use in outgoing packets.
117    ///
118    /// Readable
119    ///
120    ///
121    /// #### `ttl`
122    ///  The time-to-live value to use in outgoing packets.
123    ///
124    /// Readable
125    /// <details><summary><h4>Device</h4></summary>
126    ///
127    ///
128    /// #### `active-connection`
129    ///  The #NMActiveConnection object that "owns" this device during activation.
130    ///
131    /// Readable
132    ///
133    ///
134    /// #### `autoconnect`
135    ///  Whether the device can auto-activate a connection.
136    ///
137    /// The property setter is a synchronous D-Bus call. This is deprecated since 1.22.
138    ///
139    /// Readable | Writeable
140    ///
141    ///
142    /// #### `available-connections`
143    ///  The available connections of the device
144    ///
145    /// Readable
146    ///
147    ///
148    /// #### `capabilities`
149    ///  The capabilities of the device.
150    ///
151    /// Readable
152    ///
153    ///
154    /// #### `device-type`
155    ///  The numeric type of the device.
156    ///
157    /// Readable
158    ///
159    ///
160    /// #### `dhcp4-config`
161    ///  The IPv4 #NMDhcpConfig of the device.
162    ///
163    /// Readable
164    ///
165    ///
166    /// #### `dhcp6-config`
167    ///  The IPv6 #NMDhcpConfig of the device.
168    ///
169    /// Readable
170    ///
171    ///
172    /// #### `driver`
173    ///  The driver of the device.
174    ///
175    /// Readable
176    ///
177    ///
178    /// #### `driver-version`
179    ///  The version of the device driver.
180    ///
181    /// Readable
182    ///
183    ///
184    /// #### `firmware-missing`
185    ///  When [`true`] indicates the device is likely missing firmware required
186    /// for its operation.
187    ///
188    /// Readable
189    ///
190    ///
191    /// #### `firmware-version`
192    ///  The firmware version of the device.
193    ///
194    /// Readable
195    ///
196    ///
197    /// #### `hw-address`
198    ///  The hardware address of the device.
199    ///
200    /// Readable
201    ///
202    ///
203    /// #### `interface`
204    ///  The interface of the device.
205    ///
206    /// Readable
207    ///
208    ///
209    /// #### `interface-flags`
210    ///  The interface flags.
211    ///
212    /// Readable
213    ///
214    ///
215    /// #### `ip-interface`
216    ///  The IP interface of the device which should be used for all IP-related
217    /// operations like addressing and routing.
218    ///
219    /// Readable
220    ///
221    ///
222    /// #### `ip4-config`
223    ///  The #NMIP4Config of the device.
224    ///
225    /// Readable
226    ///
227    ///
228    /// #### `ip4-connectivity`
229    ///  The IPv4 connectivity state of the device.
230    ///
231    /// Readable
232    ///
233    ///
234    /// #### `ip6-config`
235    ///  The IPv6 #NMIPConfig of the device.
236    ///
237    /// Readable
238    ///
239    ///
240    /// #### `ip6-connectivity`
241    ///  The IPv6 connectivity state of the device.
242    ///
243    /// Readable
244    ///
245    ///
246    /// #### `lldp-neighbors`
247    ///  The LLDP neighbors.
248    ///
249    /// Readable
250    ///
251    ///
252    /// #### `managed`
253    ///  Whether the device is managed by NetworkManager.
254    ///
255    /// Readable
256    ///
257    ///
258    /// #### `metered`
259    ///  Whether the device is metered.
260    ///
261    /// Readable
262    ///
263    ///
264    /// #### `mtu`
265    ///  The MTU of the device.
266    ///
267    /// Readable
268    ///
269    ///
270    /// #### `nm-plugin-missing`
271    ///  When [`true`] indicates that the NetworkManager plugin for the device
272    /// is not installed.
273    ///
274    /// Readable
275    ///
276    ///
277    /// #### `path`
278    ///  The device path as exposed by the udev property ID_PATH.
279    ///
280    /// The string is backslash escaped (C escaping) for invalid
281    /// characters. The escaping can be reverted with g_strcompress(),
282    /// however the result may not be valid UTF-8.
283    ///
284    /// Readable
285    ///
286    ///
287    /// #### `physical-port-id`
288    ///  The physical port ID of the device. (See
289    /// nm_device_get_physical_port_id().)
290    ///
291    /// Readable
292    ///
293    ///
294    /// #### `ports`
295    ///  The port devices of the controller device. For devices that cannot be
296    /// controllers this is likely to be always empty.
297    ///
298    /// Readable
299    ///
300    ///
301    /// #### `product`
302    ///  The product string of the device.
303    ///
304    /// Readable
305    ///
306    ///
307    /// #### `real`
308    ///  Whether the device is real or is a placeholder device that could
309    /// be created automatically by NetworkManager if one of its
310    /// #NMDevice:available-connections was activated.
311    ///
312    /// Readable
313    ///
314    ///
315    /// #### `state`
316    ///  The state of the device.
317    ///
318    /// Readable
319    ///
320    ///
321    /// #### `state-reason`
322    ///  The reason for the device state.
323    ///
324    /// Readable
325    ///
326    ///
327    /// #### `udi`
328    ///  An operating-system specific device hardware identifier; this is not
329    /// unique to a specific hardware device across reboots or hotplugs.  It
330    /// is an opaque string which for some device types (Bluetooth, Modem)
331    /// contains an identifier provided by the underlying hardware service daemon
332    /// such as Bluez or ModemManager, and clients can use this property to
333    /// request more information about the device from those services.
334    ///
335    /// Readable
336    ///
337    ///
338    /// #### `vendor`
339    ///  The vendor string of the device.
340    ///
341    /// Readable
342    /// </details>
343    /// <details><summary><h4>Object</h4></summary>
344    ///
345    ///
346    /// #### `client`
347    ///  The NMClient instance as returned by nm_object_get_client().
348    ///
349    /// When an NMObject gets removed from the NMClient cache,
350    /// the NMObject:path property stays unchanged, but this client
351    /// instance gets reset to [`None`]. You can use this property to
352    /// track removal of the object from the cache.
353    ///
354    /// Readable
355    ///
356    ///
357    /// #### `path`
358    ///  The D-Bus object path.
359    ///
360    /// The D-Bus path of an object instance never changes, even if the object
361    /// gets removed from the cache. To see whether the object is still in the
362    /// cache, check NMObject:client.
363    ///
364    /// Readable
365    /// </details>
366    ///
367    /// # Implements
368    ///
369    /// [`DeviceExt`][trait@crate::prelude::DeviceExt], [`ObjectExt`][trait@crate::prelude::ObjectExt]
370    #[doc(alias = "NMDeviceVxlan")]
371    pub struct DeviceVxlan(Object<ffi::NMDeviceVxlan, ffi::NMDeviceVxlanClass>) @extends Device, Object;
372
373    match fn {
374        type_ => || ffi::nm_device_vxlan_get_type(),
375    }
376}
377
378impl DeviceVxlan {
379            // rustdoc-stripper-ignore-next
380            /// Creates a new builder-pattern struct instance to construct [`DeviceVxlan`] objects.
381            ///
382            /// This method returns an instance of [`DeviceVxlanBuilder`](crate::builders::DeviceVxlanBuilder) which can be used to create [`DeviceVxlan`] objects.
383            pub fn builder() -> DeviceVxlanBuilder {
384                DeviceVxlanBuilder::new()
385            }
386        
387
388    ///
389    /// # Returns
390    ///
391    /// the lifetime in seconds of FDB entries learnt by the kernel
392    #[doc(alias = "nm_device_vxlan_get_ageing")]
393    #[doc(alias = "get_ageing")]
394    pub fn ageing(&self) -> u32 {
395        unsafe {
396            ffi::nm_device_vxlan_get_ageing(self.to_glib_none().0)
397        }
398    }
399
400    /// Whether the device has carrier.
401    ///
402    /// # Returns
403    ///
404    /// [`true`] if the device has carrier.
405    ///
406    /// This property is not implemented yet, and the function always returns
407    /// FALSE.
408    #[cfg(feature = "v1_42")]
409    #[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
410    #[doc(alias = "nm_device_vxlan_get_carrier")]
411    #[doc(alias = "get_carrier")]
412    #[doc(alias = "carrier")]
413    pub fn is_carrier(&self) -> bool {
414        unsafe {
415            from_glib(ffi::nm_device_vxlan_get_carrier(self.to_glib_none().0))
416        }
417    }
418
419    ///
420    /// # Returns
421    ///
422    /// the UDP destination port
423    #[doc(alias = "nm_device_vxlan_get_dst_port")]
424    #[doc(alias = "get_dst_port")]
425    #[doc(alias = "dst-port")]
426    pub fn dst_port(&self) -> u32 {
427        unsafe {
428            ffi::nm_device_vxlan_get_dst_port(self.to_glib_none().0)
429        }
430    }
431
432    ///
433    /// # Returns
434    ///
435    /// The unicast destination IP address or the multicast
436    /// IP address joined
437    #[doc(alias = "nm_device_vxlan_get_group")]
438    #[doc(alias = "get_group")]
439    pub fn group(&self) -> glib::GString {
440        unsafe {
441            from_glib_none(ffi::nm_device_vxlan_get_group(self.to_glib_none().0))
442        }
443    }
444
445    /// Gets the hardware (MAC) address of the #NMDeviceVxlan
446    ///
447    /// # Deprecated since 1.24
448    ///
449    /// Use nm_device_get_hw_address() instead.
450    ///
451    /// # Returns
452    ///
453    /// the hardware address. This is the internal string used by the
454    /// device, and must not be modified.
455    #[cfg_attr(feature = "v1_24", deprecated = "Since 1.24")]
456    #[allow(deprecated)]
457    #[doc(alias = "nm_device_vxlan_get_hw_address")]
458    #[doc(alias = "get_hw_address")]
459    pub fn hw_address(&self) -> glib::GString {
460        unsafe {
461            from_glib_none(ffi::nm_device_vxlan_get_hw_address(self.to_glib_none().0))
462        }
463    }
464
465    ///
466    /// # Returns
467    ///
468    /// the device's VXLAN ID.
469    #[doc(alias = "nm_device_vxlan_get_id")]
470    #[doc(alias = "get_id")]
471    pub fn id(&self) -> u32 {
472        unsafe {
473            ffi::nm_device_vxlan_get_id(self.to_glib_none().0)
474        }
475    }
476
477    ///
478    /// # Returns
479    ///
480    /// whether netlink LL ADDR miss notifications are generated
481    #[doc(alias = "nm_device_vxlan_get_l2miss")]
482    #[doc(alias = "get_l2miss")]
483    #[doc(alias = "l2miss")]
484    pub fn is_l2miss(&self) -> bool {
485        unsafe {
486            from_glib(ffi::nm_device_vxlan_get_l2miss(self.to_glib_none().0))
487        }
488    }
489
490    ///
491    /// # Returns
492    ///
493    /// whether netlink IP ADDR miss notifications are generated
494    #[doc(alias = "nm_device_vxlan_get_l3miss")]
495    #[doc(alias = "get_l3miss")]
496    #[doc(alias = "l3miss")]
497    pub fn is_l3miss(&self) -> bool {
498        unsafe {
499            from_glib(ffi::nm_device_vxlan_get_l3miss(self.to_glib_none().0))
500        }
501    }
502
503    ///
504    /// # Returns
505    ///
506    /// whether address learning is enabled
507    #[doc(alias = "nm_device_vxlan_get_learning")]
508    #[doc(alias = "get_learning")]
509    #[doc(alias = "learning")]
510    pub fn is_learning(&self) -> bool {
511        unsafe {
512            from_glib(ffi::nm_device_vxlan_get_learning(self.to_glib_none().0))
513        }
514    }
515
516    ///
517    /// # Returns
518    ///
519    /// the maximum number of entries that can be added to the
520    /// forwarding table
521    #[doc(alias = "nm_device_vxlan_get_limit")]
522    #[doc(alias = "get_limit")]
523    pub fn limit(&self) -> u32 {
524        unsafe {
525            ffi::nm_device_vxlan_get_limit(self.to_glib_none().0)
526        }
527    }
528
529    ///
530    /// # Returns
531    ///
532    /// the source IP address to use in outgoing packets
533    #[doc(alias = "nm_device_vxlan_get_local")]
534    #[doc(alias = "get_local")]
535    pub fn local(&self) -> glib::GString {
536        unsafe {
537            from_glib_none(ffi::nm_device_vxlan_get_local(self.to_glib_none().0))
538        }
539    }
540
541    ///
542    /// # Returns
543    ///
544    /// the device's parent device
545    #[doc(alias = "nm_device_vxlan_get_parent")]
546    #[doc(alias = "get_parent")]
547    pub fn parent(&self) -> Device {
548        unsafe {
549            from_glib_none(ffi::nm_device_vxlan_get_parent(self.to_glib_none().0))
550        }
551    }
552
553    ///
554    /// # Returns
555    ///
556    /// whether ARP proxy is turned on
557    #[doc(alias = "nm_device_vxlan_get_proxy")]
558    #[doc(alias = "get_proxy")]
559    #[doc(alias = "proxy")]
560    pub fn is_proxy(&self) -> bool {
561        unsafe {
562            from_glib(ffi::nm_device_vxlan_get_proxy(self.to_glib_none().0))
563        }
564    }
565
566    ///
567    /// # Returns
568    ///
569    /// whether route short circuit is turned on
570    #[cfg(feature = "v1_42")]
571    #[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
572    #[doc(alias = "nm_device_vxlan_get_rsc")]
573    #[doc(alias = "get_rsc")]
574    #[doc(alias = "rsc")]
575    pub fn is_rsc(&self) -> bool {
576        unsafe {
577            from_glib(ffi::nm_device_vxlan_get_rsc(self.to_glib_none().0))
578        }
579    }
580
581    ///
582    /// # Returns
583    ///
584    /// the maximum UDP source port
585    #[doc(alias = "nm_device_vxlan_get_src_port_max")]
586    #[doc(alias = "get_src_port_max")]
587    #[doc(alias = "src-port-max")]
588    pub fn src_port_max(&self) -> u32 {
589        unsafe {
590            ffi::nm_device_vxlan_get_src_port_max(self.to_glib_none().0)
591        }
592    }
593
594    ///
595    /// # Returns
596    ///
597    /// the minimum UDP source port
598    #[doc(alias = "nm_device_vxlan_get_src_port_min")]
599    #[doc(alias = "get_src_port_min")]
600    #[doc(alias = "src-port-min")]
601    pub fn src_port_min(&self) -> u32 {
602        unsafe {
603            ffi::nm_device_vxlan_get_src_port_min(self.to_glib_none().0)
604        }
605    }
606
607    ///
608    /// # Returns
609    ///
610    /// the TOS value to use in outgoing packets
611    #[doc(alias = "nm_device_vxlan_get_tos")]
612    #[doc(alias = "get_tos")]
613    pub fn tos(&self) -> u32 {
614        unsafe {
615            ffi::nm_device_vxlan_get_tos(self.to_glib_none().0)
616        }
617    }
618
619    ///
620    /// # Returns
621    ///
622    /// the time-to-live value to use in outgoing packets
623    #[doc(alias = "nm_device_vxlan_get_ttl")]
624    #[doc(alias = "get_ttl")]
625    pub fn ttl(&self) -> u32 {
626        unsafe {
627            ffi::nm_device_vxlan_get_ttl(self.to_glib_none().0)
628        }
629    }
630
631    #[cfg(not(feature = "v1_42"))]
632    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_42"))))]
633    pub fn is_carrier(&self) -> bool {
634        ObjectExt::property(self, "carrier")
635    }
636
637    #[cfg(not(feature = "v1_42"))]
638    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_42"))))]
639    pub fn is_rsc(&self) -> bool {
640        ObjectExt::property(self, "rsc")
641    }
642
643    #[cfg(feature = "v1_2")]
644    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
645    #[doc(alias = "ageing")]
646    pub fn connect_ageing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
647        unsafe extern "C" fn notify_ageing_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
648            let f: &F = &*(f as *const F);
649            f(&from_glib_borrow(this))
650        }
651        unsafe {
652            let f: Box_<F> = Box_::new(f);
653            connect_raw(self.as_ptr() as *mut _, c"notify::ageing".as_ptr() as *const _,
654                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_ageing_trampoline::<F> as *const ())), Box_::into_raw(f))
655        }
656    }
657
658    #[cfg(feature = "v1_2")]
659    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
660    #[doc(alias = "carrier")]
661    pub fn connect_carrier_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
662        unsafe extern "C" fn notify_carrier_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
663            let f: &F = &*(f as *const F);
664            f(&from_glib_borrow(this))
665        }
666        unsafe {
667            let f: Box_<F> = Box_::new(f);
668            connect_raw(self.as_ptr() as *mut _, c"notify::carrier".as_ptr() as *const _,
669                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_carrier_trampoline::<F> as *const ())), Box_::into_raw(f))
670        }
671    }
672
673    #[cfg(feature = "v1_2")]
674    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
675    #[doc(alias = "dst-port")]
676    pub fn connect_dst_port_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
677        unsafe extern "C" fn notify_dst_port_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
678            let f: &F = &*(f as *const F);
679            f(&from_glib_borrow(this))
680        }
681        unsafe {
682            let f: Box_<F> = Box_::new(f);
683            connect_raw(self.as_ptr() as *mut _, c"notify::dst-port".as_ptr() as *const _,
684                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_dst_port_trampoline::<F> as *const ())), Box_::into_raw(f))
685        }
686    }
687
688    #[cfg(feature = "v1_2")]
689    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
690    #[doc(alias = "group")]
691    pub fn connect_group_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
692        unsafe extern "C" fn notify_group_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
693            let f: &F = &*(f as *const F);
694            f(&from_glib_borrow(this))
695        }
696        unsafe {
697            let f: Box_<F> = Box_::new(f);
698            connect_raw(self.as_ptr() as *mut _, c"notify::group".as_ptr() as *const _,
699                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_group_trampoline::<F> as *const ())), Box_::into_raw(f))
700        }
701    }
702
703    #[cfg(feature = "v1_2")]
704    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
705    #[doc(alias = "id")]
706    pub fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
707        unsafe extern "C" fn notify_id_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
708            let f: &F = &*(f as *const F);
709            f(&from_glib_borrow(this))
710        }
711        unsafe {
712            let f: Box_<F> = Box_::new(f);
713            connect_raw(self.as_ptr() as *mut _, c"notify::id".as_ptr() as *const _,
714                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_id_trampoline::<F> as *const ())), Box_::into_raw(f))
715        }
716    }
717
718    #[cfg(feature = "v1_2")]
719    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
720    #[doc(alias = "l2miss")]
721    pub fn connect_l2miss_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
722        unsafe extern "C" fn notify_l2miss_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
723            let f: &F = &*(f as *const F);
724            f(&from_glib_borrow(this))
725        }
726        unsafe {
727            let f: Box_<F> = Box_::new(f);
728            connect_raw(self.as_ptr() as *mut _, c"notify::l2miss".as_ptr() as *const _,
729                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_l2miss_trampoline::<F> as *const ())), Box_::into_raw(f))
730        }
731    }
732
733    #[cfg(feature = "v1_2")]
734    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
735    #[doc(alias = "l3miss")]
736    pub fn connect_l3miss_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
737        unsafe extern "C" fn notify_l3miss_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
738            let f: &F = &*(f as *const F);
739            f(&from_glib_borrow(this))
740        }
741        unsafe {
742            let f: Box_<F> = Box_::new(f);
743            connect_raw(self.as_ptr() as *mut _, c"notify::l3miss".as_ptr() as *const _,
744                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_l3miss_trampoline::<F> as *const ())), Box_::into_raw(f))
745        }
746    }
747
748    #[cfg(feature = "v1_2")]
749    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
750    #[doc(alias = "learning")]
751    pub fn connect_learning_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
752        unsafe extern "C" fn notify_learning_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
753            let f: &F = &*(f as *const F);
754            f(&from_glib_borrow(this))
755        }
756        unsafe {
757            let f: Box_<F> = Box_::new(f);
758            connect_raw(self.as_ptr() as *mut _, c"notify::learning".as_ptr() as *const _,
759                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_learning_trampoline::<F> as *const ())), Box_::into_raw(f))
760        }
761    }
762
763    #[cfg(feature = "v1_2")]
764    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
765    #[doc(alias = "limit")]
766    pub fn connect_limit_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
767        unsafe extern "C" fn notify_limit_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
768            let f: &F = &*(f as *const F);
769            f(&from_glib_borrow(this))
770        }
771        unsafe {
772            let f: Box_<F> = Box_::new(f);
773            connect_raw(self.as_ptr() as *mut _, c"notify::limit".as_ptr() as *const _,
774                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_limit_trampoline::<F> as *const ())), Box_::into_raw(f))
775        }
776    }
777
778    #[cfg(feature = "v1_2")]
779    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
780    #[doc(alias = "local")]
781    pub fn connect_local_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
782        unsafe extern "C" fn notify_local_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
783            let f: &F = &*(f as *const F);
784            f(&from_glib_borrow(this))
785        }
786        unsafe {
787            let f: Box_<F> = Box_::new(f);
788            connect_raw(self.as_ptr() as *mut _, c"notify::local".as_ptr() as *const _,
789                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_local_trampoline::<F> as *const ())), Box_::into_raw(f))
790        }
791    }
792
793    #[cfg(feature = "v1_2")]
794    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
795    #[doc(alias = "parent")]
796    pub fn connect_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
797        unsafe extern "C" fn notify_parent_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
798            let f: &F = &*(f as *const F);
799            f(&from_glib_borrow(this))
800        }
801        unsafe {
802            let f: Box_<F> = Box_::new(f);
803            connect_raw(self.as_ptr() as *mut _, c"notify::parent".as_ptr() as *const _,
804                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_parent_trampoline::<F> as *const ())), Box_::into_raw(f))
805        }
806    }
807
808    #[cfg(feature = "v1_2")]
809    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
810    #[doc(alias = "proxy")]
811    pub fn connect_proxy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
812        unsafe extern "C" fn notify_proxy_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
813            let f: &F = &*(f as *const F);
814            f(&from_glib_borrow(this))
815        }
816        unsafe {
817            let f: Box_<F> = Box_::new(f);
818            connect_raw(self.as_ptr() as *mut _, c"notify::proxy".as_ptr() as *const _,
819                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_proxy_trampoline::<F> as *const ())), Box_::into_raw(f))
820        }
821    }
822
823    #[cfg(feature = "v1_2")]
824    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
825    #[doc(alias = "rsc")]
826    pub fn connect_rsc_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
827        unsafe extern "C" fn notify_rsc_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
828            let f: &F = &*(f as *const F);
829            f(&from_glib_borrow(this))
830        }
831        unsafe {
832            let f: Box_<F> = Box_::new(f);
833            connect_raw(self.as_ptr() as *mut _, c"notify::rsc".as_ptr() as *const _,
834                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_rsc_trampoline::<F> as *const ())), Box_::into_raw(f))
835        }
836    }
837
838    #[cfg(feature = "v1_2")]
839    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
840    #[doc(alias = "src-port-max")]
841    pub fn connect_src_port_max_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
842        unsafe extern "C" fn notify_src_port_max_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
843            let f: &F = &*(f as *const F);
844            f(&from_glib_borrow(this))
845        }
846        unsafe {
847            let f: Box_<F> = Box_::new(f);
848            connect_raw(self.as_ptr() as *mut _, c"notify::src-port-max".as_ptr() as *const _,
849                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_src_port_max_trampoline::<F> as *const ())), Box_::into_raw(f))
850        }
851    }
852
853    #[cfg(feature = "v1_2")]
854    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
855    #[doc(alias = "src-port-min")]
856    pub fn connect_src_port_min_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
857        unsafe extern "C" fn notify_src_port_min_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
858            let f: &F = &*(f as *const F);
859            f(&from_glib_borrow(this))
860        }
861        unsafe {
862            let f: Box_<F> = Box_::new(f);
863            connect_raw(self.as_ptr() as *mut _, c"notify::src-port-min".as_ptr() as *const _,
864                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_src_port_min_trampoline::<F> as *const ())), Box_::into_raw(f))
865        }
866    }
867
868    #[cfg(feature = "v1_2")]
869    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
870    #[doc(alias = "tos")]
871    pub fn connect_tos_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
872        unsafe extern "C" fn notify_tos_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
873            let f: &F = &*(f as *const F);
874            f(&from_glib_borrow(this))
875        }
876        unsafe {
877            let f: Box_<F> = Box_::new(f);
878            connect_raw(self.as_ptr() as *mut _, c"notify::tos".as_ptr() as *const _,
879                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_tos_trampoline::<F> as *const ())), Box_::into_raw(f))
880        }
881    }
882
883    #[cfg(feature = "v1_2")]
884    #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
885    #[doc(alias = "ttl")]
886    pub fn connect_ttl_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
887        unsafe extern "C" fn notify_ttl_trampoline<F: Fn(&DeviceVxlan) + 'static>(this: *mut ffi::NMDeviceVxlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
888            let f: &F = &*(f as *const F);
889            f(&from_glib_borrow(this))
890        }
891        unsafe {
892            let f: Box_<F> = Box_::new(f);
893            connect_raw(self.as_ptr() as *mut _, c"notify::ttl".as_ptr() as *const _,
894                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_ttl_trampoline::<F> as *const ())), Box_::into_raw(f))
895        }
896    }
897}
898
899// rustdoc-stripper-ignore-next
900        /// A [builder-pattern] type to construct [`DeviceVxlan`] objects.
901        ///
902        /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
903#[must_use = "The builder must be built to be used"]
904pub struct DeviceVxlanBuilder {
905            builder: glib::object::ObjectBuilder<'static, DeviceVxlan>,
906        }
907
908        impl DeviceVxlanBuilder {
909        fn new() -> Self {
910            Self { builder: glib::object::Object::builder() }
911        }
912
913                            /// Whether the device can auto-activate a connection.
914                            ///
915                            /// The property setter is a synchronous D-Bus call. This is deprecated since 1.22.
916                            pub fn autoconnect(self, autoconnect: bool) -> Self {
917                            Self { builder: self.builder.property("autoconnect", autoconnect), }
918                        }
919
920    // rustdoc-stripper-ignore-next
921    /// Build the [`DeviceVxlan`].
922    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
923    pub fn build(self) -> DeviceVxlan {
924assert_initialized_main_thread!();
925    self.builder.build() }
926}