1use crate::{ffi,Setting};
7use glib::{prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
8use std::{boxed::Box as Box_};
9
10glib::wrapper! {
11 #[doc(alias = "NMSettingPpp")]
158 pub struct SettingPpp(Object<ffi::NMSettingPpp, ffi::NMSettingPppClass>) @extends Setting;
159
160 match fn {
161 type_ => || ffi::nm_setting_ppp_get_type(),
162 }
163}
164
165impl SettingPpp {
166 #[doc(alias = "nm_setting_ppp_new")]
172 pub fn new() -> SettingPpp {
173 assert_initialized_main_thread!();
174 unsafe {
175 Setting::from_glib_full(ffi::nm_setting_ppp_new()).unsafe_cast()
176 }
177 }
178
179 pub fn builder() -> SettingPppBuilder {
184 SettingPppBuilder::new()
185 }
186
187
188 #[doc(alias = "nm_setting_ppp_get_baud")]
193 #[doc(alias = "get_baud")]
194 pub fn baud(&self) -> u32 {
195 unsafe {
196 ffi::nm_setting_ppp_get_baud(self.to_glib_none().0)
197 }
198 }
199
200 #[doc(alias = "nm_setting_ppp_get_crtscts")]
205 #[doc(alias = "get_crtscts")]
206 #[doc(alias = "crtscts")]
207 pub fn is_crtscts(&self) -> bool {
208 unsafe {
209 from_glib(ffi::nm_setting_ppp_get_crtscts(self.to_glib_none().0))
210 }
211 }
212
213 #[doc(alias = "nm_setting_ppp_get_lcp_echo_failure")]
218 #[doc(alias = "get_lcp_echo_failure")]
219 #[doc(alias = "lcp-echo-failure")]
220 pub fn lcp_echo_failure(&self) -> u32 {
221 unsafe {
222 ffi::nm_setting_ppp_get_lcp_echo_failure(self.to_glib_none().0)
223 }
224 }
225
226 #[doc(alias = "nm_setting_ppp_get_lcp_echo_interval")]
231 #[doc(alias = "get_lcp_echo_interval")]
232 #[doc(alias = "lcp-echo-interval")]
233 pub fn lcp_echo_interval(&self) -> u32 {
234 unsafe {
235 ffi::nm_setting_ppp_get_lcp_echo_interval(self.to_glib_none().0)
236 }
237 }
238
239 #[doc(alias = "nm_setting_ppp_get_mppe_stateful")]
244 #[doc(alias = "get_mppe_stateful")]
245 #[doc(alias = "mppe-stateful")]
246 pub fn is_mppe_stateful(&self) -> bool {
247 unsafe {
248 from_glib(ffi::nm_setting_ppp_get_mppe_stateful(self.to_glib_none().0))
249 }
250 }
251
252 #[doc(alias = "nm_setting_ppp_get_mru")]
257 #[doc(alias = "get_mru")]
258 pub fn mru(&self) -> u32 {
259 unsafe {
260 ffi::nm_setting_ppp_get_mru(self.to_glib_none().0)
261 }
262 }
263
264 #[doc(alias = "nm_setting_ppp_get_mtu")]
269 #[doc(alias = "get_mtu")]
270 pub fn mtu(&self) -> u32 {
271 unsafe {
272 ffi::nm_setting_ppp_get_mtu(self.to_glib_none().0)
273 }
274 }
275
276 #[doc(alias = "nm_setting_ppp_get_no_vj_comp")]
281 #[doc(alias = "get_no_vj_comp")]
282 #[doc(alias = "no-vj-comp")]
283 pub fn is_no_vj_comp(&self) -> bool {
284 unsafe {
285 from_glib(ffi::nm_setting_ppp_get_no_vj_comp(self.to_glib_none().0))
286 }
287 }
288
289 #[doc(alias = "nm_setting_ppp_get_noauth")]
294 #[doc(alias = "get_noauth")]
295 #[doc(alias = "noauth")]
296 pub fn is_noauth(&self) -> bool {
297 unsafe {
298 from_glib(ffi::nm_setting_ppp_get_noauth(self.to_glib_none().0))
299 }
300 }
301
302 #[doc(alias = "nm_setting_ppp_get_nobsdcomp")]
307 #[doc(alias = "get_nobsdcomp")]
308 #[doc(alias = "nobsdcomp")]
309 pub fn is_nobsdcomp(&self) -> bool {
310 unsafe {
311 from_glib(ffi::nm_setting_ppp_get_nobsdcomp(self.to_glib_none().0))
312 }
313 }
314
315 #[doc(alias = "nm_setting_ppp_get_nodeflate")]
320 #[doc(alias = "get_nodeflate")]
321 #[doc(alias = "nodeflate")]
322 pub fn is_nodeflate(&self) -> bool {
323 unsafe {
324 from_glib(ffi::nm_setting_ppp_get_nodeflate(self.to_glib_none().0))
325 }
326 }
327
328 #[doc(alias = "nm_setting_ppp_get_refuse_chap")]
333 #[doc(alias = "get_refuse_chap")]
334 #[doc(alias = "refuse-chap")]
335 pub fn is_refuse_chap(&self) -> bool {
336 unsafe {
337 from_glib(ffi::nm_setting_ppp_get_refuse_chap(self.to_glib_none().0))
338 }
339 }
340
341 #[doc(alias = "nm_setting_ppp_get_refuse_eap")]
346 #[doc(alias = "get_refuse_eap")]
347 #[doc(alias = "refuse-eap")]
348 pub fn is_refuse_eap(&self) -> bool {
349 unsafe {
350 from_glib(ffi::nm_setting_ppp_get_refuse_eap(self.to_glib_none().0))
351 }
352 }
353
354 #[doc(alias = "nm_setting_ppp_get_refuse_mschap")]
359 #[doc(alias = "get_refuse_mschap")]
360 #[doc(alias = "refuse-mschap")]
361 pub fn is_refuse_mschap(&self) -> bool {
362 unsafe {
363 from_glib(ffi::nm_setting_ppp_get_refuse_mschap(self.to_glib_none().0))
364 }
365 }
366
367 #[doc(alias = "nm_setting_ppp_get_refuse_mschapv2")]
372 #[doc(alias = "get_refuse_mschapv2")]
373 #[doc(alias = "refuse-mschapv2")]
374 pub fn is_refuse_mschapv2(&self) -> bool {
375 unsafe {
376 from_glib(ffi::nm_setting_ppp_get_refuse_mschapv2(self.to_glib_none().0))
377 }
378 }
379
380 #[doc(alias = "nm_setting_ppp_get_refuse_pap")]
385 #[doc(alias = "get_refuse_pap")]
386 #[doc(alias = "refuse-pap")]
387 pub fn is_refuse_pap(&self) -> bool {
388 unsafe {
389 from_glib(ffi::nm_setting_ppp_get_refuse_pap(self.to_glib_none().0))
390 }
391 }
392
393 #[doc(alias = "nm_setting_ppp_get_require_mppe")]
398 #[doc(alias = "get_require_mppe")]
399 #[doc(alias = "require-mppe")]
400 pub fn requires_mppe(&self) -> bool {
401 unsafe {
402 from_glib(ffi::nm_setting_ppp_get_require_mppe(self.to_glib_none().0))
403 }
404 }
405
406 #[doc(alias = "nm_setting_ppp_get_require_mppe_128")]
411 #[doc(alias = "get_require_mppe_128")]
412 #[doc(alias = "require-mppe-128")]
413 pub fn requires_mppe_128(&self) -> bool {
414 unsafe {
415 from_glib(ffi::nm_setting_ppp_get_require_mppe_128(self.to_glib_none().0))
416 }
417 }
418
419 pub fn set_baud(&self, baud: u32) {
423 ObjectExt::set_property(self,"baud", baud)
424 }
425
426 pub fn set_crtscts(&self, crtscts: bool) {
430 ObjectExt::set_property(self,"crtscts", crtscts)
431 }
432
433 #[doc(alias = "lcp-echo-failure")]
438 pub fn set_lcp_echo_failure(&self, lcp_echo_failure: u32) {
439 ObjectExt::set_property(self,"lcp-echo-failure", lcp_echo_failure)
440 }
441
442 #[doc(alias = "lcp-echo-interval")]
447 pub fn set_lcp_echo_interval(&self, lcp_echo_interval: u32) {
448 ObjectExt::set_property(self,"lcp-echo-interval", lcp_echo_interval)
449 }
450
451 #[doc(alias = "mppe-stateful")]
454 pub fn set_mppe_stateful(&self, mppe_stateful: bool) {
455 ObjectExt::set_property(self,"mppe-stateful", mppe_stateful)
456 }
457
458 pub fn set_mru(&self, mru: u32) {
462 ObjectExt::set_property(self,"mru", mru)
463 }
464
465 pub fn set_mtu(&self, mtu: u32) {
468 ObjectExt::set_property(self,"mtu", mtu)
469 }
470
471 #[doc(alias = "no-vj-comp")]
473 pub fn set_no_vj_comp(&self, no_vj_comp: bool) {
474 ObjectExt::set_property(self,"no-vj-comp", no_vj_comp)
475 }
476
477 pub fn set_noauth(&self, noauth: bool) {
481 ObjectExt::set_property(self,"noauth", noauth)
482 }
483
484 pub fn set_nobsdcomp(&self, nobsdcomp: bool) {
486 ObjectExt::set_property(self,"nobsdcomp", nobsdcomp)
487 }
488
489 pub fn set_nodeflate(&self, nodeflate: bool) {
491 ObjectExt::set_property(self,"nodeflate", nodeflate)
492 }
493
494 #[doc(alias = "refuse-chap")]
496 pub fn set_refuse_chap(&self, refuse_chap: bool) {
497 ObjectExt::set_property(self,"refuse-chap", refuse_chap)
498 }
499
500 #[doc(alias = "refuse-eap")]
502 pub fn set_refuse_eap(&self, refuse_eap: bool) {
503 ObjectExt::set_property(self,"refuse-eap", refuse_eap)
504 }
505
506 #[doc(alias = "refuse-mschap")]
508 pub fn set_refuse_mschap(&self, refuse_mschap: bool) {
509 ObjectExt::set_property(self,"refuse-mschap", refuse_mschap)
510 }
511
512 #[doc(alias = "refuse-mschapv2")]
514 pub fn set_refuse_mschapv2(&self, refuse_mschapv2: bool) {
515 ObjectExt::set_property(self,"refuse-mschapv2", refuse_mschapv2)
516 }
517
518 #[doc(alias = "refuse-pap")]
520 pub fn set_refuse_pap(&self, refuse_pap: bool) {
521 ObjectExt::set_property(self,"refuse-pap", refuse_pap)
522 }
523
524 #[doc(alias = "require-mppe")]
529 pub fn set_require_mppe(&self, require_mppe: bool) {
530 ObjectExt::set_property(self,"require-mppe", require_mppe)
531 }
532
533 #[doc(alias = "require-mppe-128")]
537 pub fn set_require_mppe_128(&self, require_mppe_128: bool) {
538 ObjectExt::set_property(self,"require-mppe-128", require_mppe_128)
539 }
540
541 #[doc(alias = "baud")]
542 pub fn connect_baud_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
543 unsafe extern "C" fn notify_baud_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
544 let f: &F = &*(f as *const F);
545 f(&from_glib_borrow(this))
546 }
547 unsafe {
548 let f: Box_<F> = Box_::new(f);
549 connect_raw(self.as_ptr() as *mut _, c"notify::baud".as_ptr() as *const _,
550 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_baud_trampoline::<F> as *const ())), Box_::into_raw(f))
551 }
552 }
553
554 #[doc(alias = "crtscts")]
555 pub fn connect_crtscts_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
556 unsafe extern "C" fn notify_crtscts_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
557 let f: &F = &*(f as *const F);
558 f(&from_glib_borrow(this))
559 }
560 unsafe {
561 let f: Box_<F> = Box_::new(f);
562 connect_raw(self.as_ptr() as *mut _, c"notify::crtscts".as_ptr() as *const _,
563 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_crtscts_trampoline::<F> as *const ())), Box_::into_raw(f))
564 }
565 }
566
567 #[doc(alias = "lcp-echo-failure")]
568 pub fn connect_lcp_echo_failure_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
569 unsafe extern "C" fn notify_lcp_echo_failure_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
570 let f: &F = &*(f as *const F);
571 f(&from_glib_borrow(this))
572 }
573 unsafe {
574 let f: Box_<F> = Box_::new(f);
575 connect_raw(self.as_ptr() as *mut _, c"notify::lcp-echo-failure".as_ptr() as *const _,
576 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_lcp_echo_failure_trampoline::<F> as *const ())), Box_::into_raw(f))
577 }
578 }
579
580 #[doc(alias = "lcp-echo-interval")]
581 pub fn connect_lcp_echo_interval_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
582 unsafe extern "C" fn notify_lcp_echo_interval_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
583 let f: &F = &*(f as *const F);
584 f(&from_glib_borrow(this))
585 }
586 unsafe {
587 let f: Box_<F> = Box_::new(f);
588 connect_raw(self.as_ptr() as *mut _, c"notify::lcp-echo-interval".as_ptr() as *const _,
589 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_lcp_echo_interval_trampoline::<F> as *const ())), Box_::into_raw(f))
590 }
591 }
592
593 #[doc(alias = "mppe-stateful")]
594 pub fn connect_mppe_stateful_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
595 unsafe extern "C" fn notify_mppe_stateful_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
596 let f: &F = &*(f as *const F);
597 f(&from_glib_borrow(this))
598 }
599 unsafe {
600 let f: Box_<F> = Box_::new(f);
601 connect_raw(self.as_ptr() as *mut _, c"notify::mppe-stateful".as_ptr() as *const _,
602 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_mppe_stateful_trampoline::<F> as *const ())), Box_::into_raw(f))
603 }
604 }
605
606 #[doc(alias = "mru")]
607 pub fn connect_mru_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
608 unsafe extern "C" fn notify_mru_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
609 let f: &F = &*(f as *const F);
610 f(&from_glib_borrow(this))
611 }
612 unsafe {
613 let f: Box_<F> = Box_::new(f);
614 connect_raw(self.as_ptr() as *mut _, c"notify::mru".as_ptr() as *const _,
615 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_mru_trampoline::<F> as *const ())), Box_::into_raw(f))
616 }
617 }
618
619 #[doc(alias = "mtu")]
620 pub fn connect_mtu_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
621 unsafe extern "C" fn notify_mtu_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
622 let f: &F = &*(f as *const F);
623 f(&from_glib_borrow(this))
624 }
625 unsafe {
626 let f: Box_<F> = Box_::new(f);
627 connect_raw(self.as_ptr() as *mut _, c"notify::mtu".as_ptr() as *const _,
628 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_mtu_trampoline::<F> as *const ())), Box_::into_raw(f))
629 }
630 }
631
632 #[doc(alias = "no-vj-comp")]
633 pub fn connect_no_vj_comp_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
634 unsafe extern "C" fn notify_no_vj_comp_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
635 let f: &F = &*(f as *const F);
636 f(&from_glib_borrow(this))
637 }
638 unsafe {
639 let f: Box_<F> = Box_::new(f);
640 connect_raw(self.as_ptr() as *mut _, c"notify::no-vj-comp".as_ptr() as *const _,
641 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_no_vj_comp_trampoline::<F> as *const ())), Box_::into_raw(f))
642 }
643 }
644
645 #[doc(alias = "noauth")]
646 pub fn connect_noauth_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
647 unsafe extern "C" fn notify_noauth_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _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::noauth".as_ptr() as *const _,
654 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_noauth_trampoline::<F> as *const ())), Box_::into_raw(f))
655 }
656 }
657
658 #[doc(alias = "nobsdcomp")]
659 pub fn connect_nobsdcomp_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
660 unsafe extern "C" fn notify_nobsdcomp_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
661 let f: &F = &*(f as *const F);
662 f(&from_glib_borrow(this))
663 }
664 unsafe {
665 let f: Box_<F> = Box_::new(f);
666 connect_raw(self.as_ptr() as *mut _, c"notify::nobsdcomp".as_ptr() as *const _,
667 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_nobsdcomp_trampoline::<F> as *const ())), Box_::into_raw(f))
668 }
669 }
670
671 #[doc(alias = "nodeflate")]
672 pub fn connect_nodeflate_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
673 unsafe extern "C" fn notify_nodeflate_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
674 let f: &F = &*(f as *const F);
675 f(&from_glib_borrow(this))
676 }
677 unsafe {
678 let f: Box_<F> = Box_::new(f);
679 connect_raw(self.as_ptr() as *mut _, c"notify::nodeflate".as_ptr() as *const _,
680 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_nodeflate_trampoline::<F> as *const ())), Box_::into_raw(f))
681 }
682 }
683
684 #[doc(alias = "refuse-chap")]
685 pub fn connect_refuse_chap_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
686 unsafe extern "C" fn notify_refuse_chap_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
687 let f: &F = &*(f as *const F);
688 f(&from_glib_borrow(this))
689 }
690 unsafe {
691 let f: Box_<F> = Box_::new(f);
692 connect_raw(self.as_ptr() as *mut _, c"notify::refuse-chap".as_ptr() as *const _,
693 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_refuse_chap_trampoline::<F> as *const ())), Box_::into_raw(f))
694 }
695 }
696
697 #[doc(alias = "refuse-eap")]
698 pub fn connect_refuse_eap_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
699 unsafe extern "C" fn notify_refuse_eap_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
700 let f: &F = &*(f as *const F);
701 f(&from_glib_borrow(this))
702 }
703 unsafe {
704 let f: Box_<F> = Box_::new(f);
705 connect_raw(self.as_ptr() as *mut _, c"notify::refuse-eap".as_ptr() as *const _,
706 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_refuse_eap_trampoline::<F> as *const ())), Box_::into_raw(f))
707 }
708 }
709
710 #[doc(alias = "refuse-mschap")]
711 pub fn connect_refuse_mschap_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
712 unsafe extern "C" fn notify_refuse_mschap_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
713 let f: &F = &*(f as *const F);
714 f(&from_glib_borrow(this))
715 }
716 unsafe {
717 let f: Box_<F> = Box_::new(f);
718 connect_raw(self.as_ptr() as *mut _, c"notify::refuse-mschap".as_ptr() as *const _,
719 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_refuse_mschap_trampoline::<F> as *const ())), Box_::into_raw(f))
720 }
721 }
722
723 #[doc(alias = "refuse-mschapv2")]
724 pub fn connect_refuse_mschapv2_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
725 unsafe extern "C" fn notify_refuse_mschapv2_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
726 let f: &F = &*(f as *const F);
727 f(&from_glib_borrow(this))
728 }
729 unsafe {
730 let f: Box_<F> = Box_::new(f);
731 connect_raw(self.as_ptr() as *mut _, c"notify::refuse-mschapv2".as_ptr() as *const _,
732 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_refuse_mschapv2_trampoline::<F> as *const ())), Box_::into_raw(f))
733 }
734 }
735
736 #[doc(alias = "refuse-pap")]
737 pub fn connect_refuse_pap_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
738 unsafe extern "C" fn notify_refuse_pap_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
739 let f: &F = &*(f as *const F);
740 f(&from_glib_borrow(this))
741 }
742 unsafe {
743 let f: Box_<F> = Box_::new(f);
744 connect_raw(self.as_ptr() as *mut _, c"notify::refuse-pap".as_ptr() as *const _,
745 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_refuse_pap_trampoline::<F> as *const ())), Box_::into_raw(f))
746 }
747 }
748
749 #[doc(alias = "require-mppe")]
750 pub fn connect_require_mppe_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
751 unsafe extern "C" fn notify_require_mppe_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
752 let f: &F = &*(f as *const F);
753 f(&from_glib_borrow(this))
754 }
755 unsafe {
756 let f: Box_<F> = Box_::new(f);
757 connect_raw(self.as_ptr() as *mut _, c"notify::require-mppe".as_ptr() as *const _,
758 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_require_mppe_trampoline::<F> as *const ())), Box_::into_raw(f))
759 }
760 }
761
762 #[doc(alias = "require-mppe-128")]
763 pub fn connect_require_mppe_128_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
764 unsafe extern "C" fn notify_require_mppe_128_trampoline<F: Fn(&SettingPpp) + 'static>(this: *mut ffi::NMSettingPpp, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
765 let f: &F = &*(f as *const F);
766 f(&from_glib_borrow(this))
767 }
768 unsafe {
769 let f: Box_<F> = Box_::new(f);
770 connect_raw(self.as_ptr() as *mut _, c"notify::require-mppe-128".as_ptr() as *const _,
771 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_require_mppe_128_trampoline::<F> as *const ())), Box_::into_raw(f))
772 }
773 }
774}
775
776impl Default for SettingPpp {
777 fn default() -> Self {
778 Self::new()
779 }
780 }
781
782#[must_use = "The builder must be built to be used"]
787pub struct SettingPppBuilder {
788 builder: glib::object::ObjectBuilder<'static, SettingPpp>,
789 }
790
791 impl SettingPppBuilder {
792 fn new() -> Self {
793 Self { builder: glib::object::Object::builder() }
794 }
795
796 pub fn baud(self, baud: u32) -> Self {
800 Self { builder: self.builder.property("baud", baud), }
801 }
802
803 pub fn crtscts(self, crtscts: bool) -> Self {
807 Self { builder: self.builder.property("crtscts", crtscts), }
808 }
809
810 pub fn lcp_echo_failure(self, lcp_echo_failure: u32) -> Self {
815 Self { builder: self.builder.property("lcp-echo-failure", lcp_echo_failure), }
816 }
817
818 pub fn lcp_echo_interval(self, lcp_echo_interval: u32) -> Self {
823 Self { builder: self.builder.property("lcp-echo-interval", lcp_echo_interval), }
824 }
825
826 pub fn mppe_stateful(self, mppe_stateful: bool) -> Self {
829 Self { builder: self.builder.property("mppe-stateful", mppe_stateful), }
830 }
831
832 pub fn mru(self, mru: u32) -> Self {
836 Self { builder: self.builder.property("mru", mru), }
837 }
838
839 pub fn mtu(self, mtu: u32) -> Self {
842 Self { builder: self.builder.property("mtu", mtu), }
843 }
844
845 pub fn no_vj_comp(self, no_vj_comp: bool) -> Self {
847 Self { builder: self.builder.property("no-vj-comp", no_vj_comp), }
848 }
849
850 pub fn noauth(self, noauth: bool) -> Self {
854 Self { builder: self.builder.property("noauth", noauth), }
855 }
856
857 pub fn nobsdcomp(self, nobsdcomp: bool) -> Self {
859 Self { builder: self.builder.property("nobsdcomp", nobsdcomp), }
860 }
861
862 pub fn nodeflate(self, nodeflate: bool) -> Self {
864 Self { builder: self.builder.property("nodeflate", nodeflate), }
865 }
866
867 pub fn refuse_chap(self, refuse_chap: bool) -> Self {
869 Self { builder: self.builder.property("refuse-chap", refuse_chap), }
870 }
871
872 pub fn refuse_eap(self, refuse_eap: bool) -> Self {
874 Self { builder: self.builder.property("refuse-eap", refuse_eap), }
875 }
876
877 pub fn refuse_mschap(self, refuse_mschap: bool) -> Self {
879 Self { builder: self.builder.property("refuse-mschap", refuse_mschap), }
880 }
881
882 pub fn refuse_mschapv2(self, refuse_mschapv2: bool) -> Self {
884 Self { builder: self.builder.property("refuse-mschapv2", refuse_mschapv2), }
885 }
886
887 pub fn refuse_pap(self, refuse_pap: bool) -> Self {
889 Self { builder: self.builder.property("refuse-pap", refuse_pap), }
890 }
891
892 pub fn require_mppe(self, require_mppe: bool) -> Self {
897 Self { builder: self.builder.property("require-mppe", require_mppe), }
898 }
899
900 pub fn require_mppe_128(self, require_mppe_128: bool) -> Self {
904 Self { builder: self.builder.property("require-mppe-128", require_mppe_128), }
905 }
906
907 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
910 pub fn build(self) -> SettingPpp {
911assert_initialized_main_thread!();
912 self.builder.build() }
913}