nm_rs/auto/
active_connection.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,ActiveConnectionState,Device,DhcpConfig,IPConfig,Object,RemoteConnection};
8#[cfg(feature = "v1_8")]
9#[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
10use crate::{ActiveConnectionStateReason};
11#[cfg(feature = "v1_10")]
12#[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
13use crate::{ActivationStateFlags};
14use glib::{object::ObjectType as _,prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
15use std::{boxed::Box as Box_};
16
17glib::wrapper! {
18    ///
19    ///
20    /// ## Properties
21    ///
22    ///
23    /// #### `connection`
24    ///  The connection that this is an active instance of.
25    ///
26    /// Readable
27    ///
28    ///
29    /// #### `controller`
30    ///  The controller device if one exists. This replaces the deprecated
31    /// "master" property.
32    ///
33    /// Readable
34    ///
35    ///
36    /// #### `default`
37    ///  Whether the active connection is the default IPv4 one.
38    ///
39    /// Readable
40    ///
41    ///
42    /// #### `default6`
43    ///  Whether the active connection is the default IPv6 one.
44    ///
45    /// Readable
46    ///
47    ///
48    /// #### `devices`
49    ///  The devices of the active connection.
50    ///
51    /// Readable
52    ///
53    ///
54    /// #### `dhcp4-config`
55    ///  The IPv4 #NMDhcpConfig of the connection.
56    ///
57    /// Readable
58    ///
59    ///
60    /// #### `dhcp6-config`
61    ///  The IPv6 #NMDhcpConfig of the connection.
62    ///
63    /// Readable
64    ///
65    ///
66    /// #### `id`
67    ///  The active connection's ID
68    ///
69    /// Readable
70    ///
71    ///
72    /// #### `ip4-config`
73    ///  The IPv4 #NMIPConfig of the connection.
74    ///
75    /// Readable
76    ///
77    ///
78    /// #### `ip6-config`
79    ///  The IPv6 #NMIPConfig of the connection.
80    ///
81    /// Readable
82    ///
83    ///
84    /// #### `master`
85    ///  The controller device if one exists. Replaced by the "controller" property.
86    ///
87    /// Readable
88    ///
89    ///
90    /// #### `specific-object-path`
91    ///  The path to the "specific object" of the active connection; see
92    /// nm_active_connection_get_specific_object_path() for more details.
93    ///
94    /// Readable
95    ///
96    ///
97    /// #### `state`
98    ///  The state of the active connection.
99    ///
100    /// Readable
101    ///
102    ///
103    /// #### `state-flags`
104    ///  The state flags of the active connection.
105    ///
106    /// Readable
107    ///
108    ///
109    /// #### `type`
110    ///  The active connection's type
111    ///
112    /// Readable
113    ///
114    ///
115    /// #### `uuid`
116    ///  The active connection's UUID
117    ///
118    /// Readable
119    ///
120    ///
121    /// #### `vpn`
122    ///  Whether the active connection is a VPN connection.
123    ///
124    /// Readable
125    /// <details><summary><h4>Object</h4></summary>
126    ///
127    ///
128    /// #### `client`
129    ///  The NMClient instance as returned by nm_object_get_client().
130    ///
131    /// When an NMObject gets removed from the NMClient cache,
132    /// the NMObject:path property stays unchanged, but this client
133    /// instance gets reset to [`None`]. You can use this property to
134    /// track removal of the object from the cache.
135    ///
136    /// Readable
137    ///
138    ///
139    /// #### `path`
140    ///  The D-Bus object path.
141    ///
142    /// The D-Bus path of an object instance never changes, even if the object
143    /// gets removed from the cache. To see whether the object is still in the
144    /// cache, check NMObject:client.
145    ///
146    /// Readable
147    /// </details>
148    ///
149    /// ## Signals
150    ///
151    ///
152    /// #### `state-changed`
153    ///
154    ///
155    /// # Implements
156    ///
157    /// [`ActiveConnectionExt`][trait@crate::prelude::ActiveConnectionExt], [`ObjectExt`][trait@crate::prelude::ObjectExt]
158    #[doc(alias = "NMActiveConnection")]
159    pub struct ActiveConnection(Object<ffi::NMActiveConnection, ffi::NMActiveConnectionClass>) @extends Object;
160
161    match fn {
162        type_ => || ffi::nm_active_connection_get_type(),
163    }
164}
165
166impl ActiveConnection {
167        pub const NONE: Option<&'static ActiveConnection> = None;
168    
169}
170
171/// Trait containing all [`struct@ActiveConnection`] methods.
172///
173/// # Implementors
174///
175/// [`ActiveConnection`][struct@crate::ActiveConnection], [`VpnConnection`][struct@crate::VpnConnection]
176pub trait ActiveConnectionExt: IsA<ActiveConnection> + 'static {
177    /// Gets the #NMRemoteConnection associated with @self.
178    ///
179    /// # Returns
180    ///
181    /// the #NMRemoteConnection which this
182    /// #NMActiveConnection is an active instance of.
183    #[doc(alias = "nm_active_connection_get_connection")]
184    #[doc(alias = "get_connection")]
185    fn connection(&self) -> RemoteConnection {
186        unsafe {
187            from_glib_none(ffi::nm_active_connection_get_connection(self.as_ref().to_glib_none().0))
188        }
189    }
190
191    /// Gets the #NMConnection's type.
192    ///
193    /// # Returns
194    ///
195    /// the type of the #NMConnection that backs the #NMActiveConnection.
196    /// This is the internal string used by the connection, and must not be modified.
197    #[doc(alias = "nm_active_connection_get_connection_type")]
198    #[doc(alias = "get_connection_type")]
199    fn connection_type(&self) -> glib::GString {
200        unsafe {
201            from_glib_none(ffi::nm_active_connection_get_connection_type(self.as_ref().to_glib_none().0))
202        }
203    }
204
205    //#[cfg(feature = "v1_44")]
206    //#[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))]
207    //#[doc(alias = "nm_active_connection_get_controller")]
208    //#[doc(alias = "get_controller")]
209    //fn controller(&self) -> /*Unimplemented*/Option<Basic: Pointer> {
210    //    unsafe { TODO: call ffi:nm_active_connection_get_controller() }
211    //}
212
213    /// Whether the active connection is the default IPv4 one (that is, is used for
214    /// the default IPv4 route and DNS information).
215    ///
216    /// # Returns
217    ///
218    /// [`true`] if the active connection is the default IPv4 connection
219    #[doc(alias = "nm_active_connection_get_default")]
220    #[doc(alias = "get_default")]
221    #[doc(alias = "default")]
222    fn is_default(&self) -> bool {
223        unsafe {
224            from_glib(ffi::nm_active_connection_get_default(self.as_ref().to_glib_none().0))
225        }
226    }
227
228    /// Whether the active connection is the default IPv6 one (that is, is used for
229    /// the default IPv6 route and DNS information).
230    ///
231    /// # Returns
232    ///
233    /// [`true`] if the active connection is the default IPv6 connection
234    #[doc(alias = "nm_active_connection_get_default6")]
235    #[doc(alias = "get_default6")]
236    #[doc(alias = "default6")]
237    fn is_default6(&self) -> bool {
238        unsafe {
239            from_glib(ffi::nm_active_connection_get_default6(self.as_ref().to_glib_none().0))
240        }
241    }
242
243    /// Gets the #NMDevices used for the active connections.
244    ///
245    /// # Returns
246    ///
247    /// the #GPtrArray containing #NMDevices.
248    /// This is the internal copy used by the connection, and must not be modified.
249    #[doc(alias = "nm_active_connection_get_devices")]
250    #[doc(alias = "get_devices")]
251    fn devices(&self) -> Vec<Device> {
252        unsafe {
253            FromGlibPtrContainer::from_glib_none(ffi::nm_active_connection_get_devices(self.as_ref().to_glib_none().0))
254        }
255    }
256
257    /// Gets the current IPv4 #NMDhcpConfig (if any) associated with the
258    /// #NMActiveConnection.
259    ///
260    /// # Returns
261    ///
262    /// the IPv4 #NMDhcpConfig, or [`None`] if the connection
263    ///   does not use DHCP, or is not in the [`ActiveConnectionState::Activated`][crate::ActiveConnectionState::Activated]
264    ///   state.
265    #[doc(alias = "nm_active_connection_get_dhcp4_config")]
266    #[doc(alias = "get_dhcp4_config")]
267    #[doc(alias = "dhcp4-config")]
268    fn dhcp4_config(&self) -> DhcpConfig {
269        unsafe {
270            from_glib_none(ffi::nm_active_connection_get_dhcp4_config(self.as_ref().to_glib_none().0))
271        }
272    }
273
274    /// Gets the current IPv6 #NMDhcpConfig (if any) associated with the
275    /// #NMActiveConnection.
276    ///
277    /// # Returns
278    ///
279    /// the IPv6 #NMDhcpConfig, or [`None`] if the connection
280    ///   does not use DHCPv6, or is not in the [`ActiveConnectionState::Activated`][crate::ActiveConnectionState::Activated]
281    ///   state.
282    #[doc(alias = "nm_active_connection_get_dhcp6_config")]
283    #[doc(alias = "get_dhcp6_config")]
284    #[doc(alias = "dhcp6-config")]
285    fn dhcp6_config(&self) -> DhcpConfig {
286        unsafe {
287            from_glib_none(ffi::nm_active_connection_get_dhcp6_config(self.as_ref().to_glib_none().0))
288        }
289    }
290
291    /// Gets the #NMConnection's ID.
292    ///
293    /// # Returns
294    ///
295    /// the ID of the #NMConnection that backs the #NMActiveConnection.
296    /// This is the internal string used by the connection, and must not be modified.
297    #[doc(alias = "nm_active_connection_get_id")]
298    #[doc(alias = "get_id")]
299    fn id(&self) -> glib::GString {
300        unsafe {
301            from_glib_none(ffi::nm_active_connection_get_id(self.as_ref().to_glib_none().0))
302        }
303    }
304
305    /// Gets the current IPv4 #NMIPConfig associated with the #NMActiveConnection.
306    ///
307    /// # Returns
308    ///
309    /// the IPv4 #NMIPConfig, or [`None`] if the connection is
310    ///   not in the [`ActiveConnectionState::Activated`][crate::ActiveConnectionState::Activated] state.
311    #[doc(alias = "nm_active_connection_get_ip4_config")]
312    #[doc(alias = "get_ip4_config")]
313    #[doc(alias = "ip4-config")]
314    fn ip4_config(&self) -> IPConfig {
315        unsafe {
316            from_glib_none(ffi::nm_active_connection_get_ip4_config(self.as_ref().to_glib_none().0))
317        }
318    }
319
320    /// Gets the current IPv6 #NMIPConfig associated with the #NMActiveConnection.
321    ///
322    /// # Returns
323    ///
324    /// the IPv6 #NMIPConfig, or [`None`] if the connection is
325    ///   not in the [`ActiveConnectionState::Activated`][crate::ActiveConnectionState::Activated] state.
326    #[doc(alias = "nm_active_connection_get_ip6_config")]
327    #[doc(alias = "get_ip6_config")]
328    #[doc(alias = "ip6-config")]
329    fn ip6_config(&self) -> IPConfig {
330        unsafe {
331            from_glib_none(ffi::nm_active_connection_get_ip6_config(self.as_ref().to_glib_none().0))
332        }
333    }
334
335    //#[cfg_attr(feature = "v1_44", deprecated = "Since 1.44")]
336    //#[allow(deprecated)]
337    //#[doc(alias = "nm_active_connection_get_master")]
338    //#[doc(alias = "get_master")]
339    //fn master(&self) -> /*Unimplemented*/Option<Basic: Pointer> {
340    //    unsafe { TODO: call ffi:nm_active_connection_get_master() }
341    //}
342
343    /// Gets the path of the "specific object" used at activation.
344    ///
345    /// Currently, there is no single method that will allow you to automatically turn
346    /// this into an appropriate #NMObject; you need to know what kind of object it
347    /// is based on other information. (Eg, if @self corresponds to a Wi-Fi
348    /// connection, then the specific object will be an #NMAccessPoint, and you can
349    /// resolve it with nm_device_wifi_get_access_point_by_path().)
350    ///
351    /// # Returns
352    ///
353    /// the specific object's D-Bus path. This is the internal string used
354    /// by the connection, and must not be modified.
355    #[doc(alias = "nm_active_connection_get_specific_object_path")]
356    #[doc(alias = "get_specific_object_path")]
357    #[doc(alias = "specific-object-path")]
358    fn specific_object_path(&self) -> glib::GString {
359        unsafe {
360            from_glib_none(ffi::nm_active_connection_get_specific_object_path(self.as_ref().to_glib_none().0))
361        }
362    }
363
364    /// Gets the active connection's state.
365    ///
366    /// # Returns
367    ///
368    /// the state
369    #[doc(alias = "nm_active_connection_get_state")]
370    #[doc(alias = "get_state")]
371    fn state(&self) -> ActiveConnectionState {
372        unsafe {
373            from_glib(ffi::nm_active_connection_get_state(self.as_ref().to_glib_none().0))
374        }
375    }
376
377    /// Gets the active connection's state flags.
378    ///
379    /// # Returns
380    ///
381    /// the state flags
382    #[cfg(feature = "v1_10")]
383    #[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
384    #[doc(alias = "nm_active_connection_get_state_flags")]
385    #[doc(alias = "get_state_flags")]
386    #[doc(alias = "state-flags")]
387    fn state_flags(&self) -> ActivationStateFlags {
388        unsafe {
389            from_glib(ffi::nm_active_connection_get_state_flags(self.as_ref().to_glib_none().0))
390        }
391    }
392
393    /// Gets the reason for active connection's state.
394    ///
395    /// # Returns
396    ///
397    /// the reason
398    #[cfg(feature = "v1_8")]
399    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
400    #[doc(alias = "nm_active_connection_get_state_reason")]
401    #[doc(alias = "get_state_reason")]
402    fn state_reason(&self) -> ActiveConnectionStateReason {
403        unsafe {
404            from_glib(ffi::nm_active_connection_get_state_reason(self.as_ref().to_glib_none().0))
405        }
406    }
407
408    /// Gets the #NMConnection's UUID.
409    ///
410    /// # Returns
411    ///
412    /// the UUID of the #NMConnection that backs the #NMActiveConnection.
413    /// This is the internal string used by the connection, and must not be modified.
414    #[doc(alias = "nm_active_connection_get_uuid")]
415    #[doc(alias = "get_uuid")]
416    fn uuid(&self) -> glib::GString {
417        unsafe {
418            from_glib_none(ffi::nm_active_connection_get_uuid(self.as_ref().to_glib_none().0))
419        }
420    }
421
422    /// Whether the active connection is a VPN connection.
423    ///
424    /// # Returns
425    ///
426    /// [`true`] if the active connection is a VPN connection
427    #[doc(alias = "nm_active_connection_get_vpn")]
428    #[doc(alias = "get_vpn")]
429    #[doc(alias = "vpn")]
430    fn is_vpn(&self) -> bool {
431        unsafe {
432            from_glib(ffi::nm_active_connection_get_vpn(self.as_ref().to_glib_none().0))
433        }
434    }
435
436    /// The active connection's type
437    #[doc(alias = "type")]
438    fn type_(&self) -> Option<glib::GString> {
439        ObjectExt::property(self.as_ref(), "type")
440    }
441
442    /// ## `state`
443    /// the new state number (#NMActiveConnectionState)
444    /// ## `reason`
445    /// the state change reason (#NMActiveConnectionStateReason)
446    #[doc(alias = "state-changed")]
447    fn connect_state_changed<F: Fn(&Self, u32, u32) + 'static>(&self, f: F) -> SignalHandlerId {
448        unsafe extern "C" fn state_changed_trampoline<P: IsA<ActiveConnection>, F: Fn(&P, u32, u32) + 'static>(this: *mut ffi::NMActiveConnection, state: std::ffi::c_uint, reason: std::ffi::c_uint, f: glib::ffi::gpointer) {
449            let f: &F = &*(f as *const F);
450            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref(), state, reason)
451        }
452        unsafe {
453            let f: Box_<F> = Box_::new(f);
454            connect_raw(self.as_ptr() as *mut _, c"state-changed".as_ptr() as *const _,
455                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(state_changed_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
456        }
457    }
458
459    #[doc(alias = "connection")]
460    fn connect_connection_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
461        unsafe extern "C" fn notify_connection_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
462            let f: &F = &*(f as *const F);
463            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
464        }
465        unsafe {
466            let f: Box_<F> = Box_::new(f);
467            connect_raw(self.as_ptr() as *mut _, c"notify::connection".as_ptr() as *const _,
468                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_connection_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
469        }
470    }
471
472    #[cfg(feature = "v1_44")]
473    #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))]
474    #[doc(alias = "controller")]
475    fn connect_controller_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
476        unsafe extern "C" fn notify_controller_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
477            let f: &F = &*(f as *const F);
478            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
479        }
480        unsafe {
481            let f: Box_<F> = Box_::new(f);
482            connect_raw(self.as_ptr() as *mut _, c"notify::controller".as_ptr() as *const _,
483                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_controller_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
484        }
485    }
486
487    #[doc(alias = "default")]
488    fn connect_default_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
489        unsafe extern "C" fn notify_default_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
490            let f: &F = &*(f as *const F);
491            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
492        }
493        unsafe {
494            let f: Box_<F> = Box_::new(f);
495            connect_raw(self.as_ptr() as *mut _, c"notify::default".as_ptr() as *const _,
496                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_default_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
497        }
498    }
499
500    #[doc(alias = "default6")]
501    fn connect_default6_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
502        unsafe extern "C" fn notify_default6_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
503            let f: &F = &*(f as *const F);
504            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
505        }
506        unsafe {
507            let f: Box_<F> = Box_::new(f);
508            connect_raw(self.as_ptr() as *mut _, c"notify::default6".as_ptr() as *const _,
509                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_default6_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
510        }
511    }
512
513    #[doc(alias = "devices")]
514    fn connect_devices_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
515        unsafe extern "C" fn notify_devices_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
516            let f: &F = &*(f as *const F);
517            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
518        }
519        unsafe {
520            let f: Box_<F> = Box_::new(f);
521            connect_raw(self.as_ptr() as *mut _, c"notify::devices".as_ptr() as *const _,
522                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_devices_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
523        }
524    }
525
526    #[doc(alias = "dhcp4-config")]
527    fn connect_dhcp4_config_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
528        unsafe extern "C" fn notify_dhcp4_config_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
529            let f: &F = &*(f as *const F);
530            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
531        }
532        unsafe {
533            let f: Box_<F> = Box_::new(f);
534            connect_raw(self.as_ptr() as *mut _, c"notify::dhcp4-config".as_ptr() as *const _,
535                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_dhcp4_config_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
536        }
537    }
538
539    #[doc(alias = "dhcp6-config")]
540    fn connect_dhcp6_config_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
541        unsafe extern "C" fn notify_dhcp6_config_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
542            let f: &F = &*(f as *const F);
543            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
544        }
545        unsafe {
546            let f: Box_<F> = Box_::new(f);
547            connect_raw(self.as_ptr() as *mut _, c"notify::dhcp6-config".as_ptr() as *const _,
548                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_dhcp6_config_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
549        }
550    }
551
552    #[doc(alias = "id")]
553    fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
554        unsafe extern "C" fn notify_id_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
555            let f: &F = &*(f as *const F);
556            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
557        }
558        unsafe {
559            let f: Box_<F> = Box_::new(f);
560            connect_raw(self.as_ptr() as *mut _, c"notify::id".as_ptr() as *const _,
561                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_id_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
562        }
563    }
564
565    #[doc(alias = "ip4-config")]
566    fn connect_ip4_config_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
567        unsafe extern "C" fn notify_ip4_config_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
568            let f: &F = &*(f as *const F);
569            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
570        }
571        unsafe {
572            let f: Box_<F> = Box_::new(f);
573            connect_raw(self.as_ptr() as *mut _, c"notify::ip4-config".as_ptr() as *const _,
574                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_ip4_config_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
575        }
576    }
577
578    #[doc(alias = "ip6-config")]
579    fn connect_ip6_config_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
580        unsafe extern "C" fn notify_ip6_config_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
581            let f: &F = &*(f as *const F);
582            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
583        }
584        unsafe {
585            let f: Box_<F> = Box_::new(f);
586            connect_raw(self.as_ptr() as *mut _, c"notify::ip6-config".as_ptr() as *const _,
587                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_ip6_config_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
588        }
589    }
590
591    #[cfg_attr(feature = "v1_44", deprecated = "Since 1.44")]
592    #[doc(alias = "master")]
593    fn connect_master_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
594        unsafe extern "C" fn notify_master_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
595            let f: &F = &*(f as *const F);
596            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
597        }
598        unsafe {
599            let f: Box_<F> = Box_::new(f);
600            connect_raw(self.as_ptr() as *mut _, c"notify::master".as_ptr() as *const _,
601                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_master_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
602        }
603    }
604
605    #[doc(alias = "specific-object-path")]
606    fn connect_specific_object_path_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
607        unsafe extern "C" fn notify_specific_object_path_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
608            let f: &F = &*(f as *const F);
609            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
610        }
611        unsafe {
612            let f: Box_<F> = Box_::new(f);
613            connect_raw(self.as_ptr() as *mut _, c"notify::specific-object-path".as_ptr() as *const _,
614                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_specific_object_path_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
615        }
616    }
617
618    #[doc(alias = "state")]
619    fn connect_state_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
620        unsafe extern "C" fn notify_state_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
621            let f: &F = &*(f as *const F);
622            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
623        }
624        unsafe {
625            let f: Box_<F> = Box_::new(f);
626            connect_raw(self.as_ptr() as *mut _, c"notify::state".as_ptr() as *const _,
627                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_state_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
628        }
629    }
630
631    #[cfg(feature = "v1_10")]
632    #[cfg_attr(docsrs, doc(cfg(feature = "v1_10")))]
633    #[doc(alias = "state-flags")]
634    fn connect_state_flags_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
635        unsafe extern "C" fn notify_state_flags_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
636            let f: &F = &*(f as *const F);
637            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
638        }
639        unsafe {
640            let f: Box_<F> = Box_::new(f);
641            connect_raw(self.as_ptr() as *mut _, c"notify::state-flags".as_ptr() as *const _,
642                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_state_flags_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
643        }
644    }
645
646    #[doc(alias = "type")]
647    fn connect_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
648        unsafe extern "C" fn notify_type_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
649            let f: &F = &*(f as *const F);
650            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
651        }
652        unsafe {
653            let f: Box_<F> = Box_::new(f);
654            connect_raw(self.as_ptr() as *mut _, c"notify::type".as_ptr() as *const _,
655                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_type_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
656        }
657    }
658
659    #[doc(alias = "uuid")]
660    fn connect_uuid_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
661        unsafe extern "C" fn notify_uuid_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
662            let f: &F = &*(f as *const F);
663            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
664        }
665        unsafe {
666            let f: Box_<F> = Box_::new(f);
667            connect_raw(self.as_ptr() as *mut _, c"notify::uuid".as_ptr() as *const _,
668                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_uuid_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
669        }
670    }
671
672    #[doc(alias = "vpn")]
673    fn connect_vpn_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
674        unsafe extern "C" fn notify_vpn_trampoline<P: IsA<ActiveConnection>, F: Fn(&P) + 'static>(this: *mut ffi::NMActiveConnection, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
675            let f: &F = &*(f as *const F);
676            f(ActiveConnection::from_glib_borrow(this).unsafe_cast_ref())
677        }
678        unsafe {
679            let f: Box_<F> = Box_::new(f);
680            connect_raw(self.as_ptr() as *mut _, c"notify::vpn".as_ptr() as *const _,
681                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_vpn_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
682        }
683    }
684}
685
686impl<O: IsA<ActiveConnection>> ActiveConnectionExt for O {}