1#![allow(deprecated)]
6
7use crate::{ffi,Setting,SettingSecretFlags};
8use glib::{prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
9use std::{boxed::Box as Box_};
10
11glib::wrapper! {
12 #[doc(alias = "NMSettingGsm")]
231 pub struct SettingGsm(Object<ffi::NMSettingGsm, ffi::NMSettingGsmClass>) @extends Setting;
232
233 match fn {
234 type_ => || ffi::nm_setting_gsm_get_type(),
235 }
236}
237
238impl SettingGsm {
239 #[doc(alias = "nm_setting_gsm_new")]
245 pub fn new() -> SettingGsm {
246 assert_initialized_main_thread!();
247 unsafe {
248 Setting::from_glib_full(ffi::nm_setting_gsm_new()).unsafe_cast()
249 }
250 }
251
252 pub fn builder() -> SettingGsmBuilder {
257 SettingGsmBuilder::new()
258 }
259
260
261 #[doc(alias = "nm_setting_gsm_get_apn")]
266 #[doc(alias = "get_apn")]
267 pub fn apn(&self) -> glib::GString {
268 unsafe {
269 from_glib_none(ffi::nm_setting_gsm_get_apn(self.to_glib_none().0))
270 }
271 }
272
273 #[cfg(feature = "v1_22")]
278 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
279 #[doc(alias = "nm_setting_gsm_get_auto_config")]
280 #[doc(alias = "get_auto_config")]
281 #[doc(alias = "auto-config")]
282 pub fn is_auto_config(&self) -> bool {
283 unsafe {
284 from_glib(ffi::nm_setting_gsm_get_auto_config(self.to_glib_none().0))
285 }
286 }
287
288 #[cfg(feature = "v1_2")]
293 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
294 #[doc(alias = "nm_setting_gsm_get_device_id")]
295 #[doc(alias = "get_device_id")]
296 #[doc(alias = "device-id")]
297 pub fn device_id(&self) -> glib::GString {
298 unsafe {
299 from_glib_none(ffi::nm_setting_gsm_get_device_id(self.to_glib_none().0))
300 }
301 }
302
303 #[doc(alias = "nm_setting_gsm_get_home_only")]
308 #[doc(alias = "get_home_only")]
309 #[doc(alias = "home-only")]
310 pub fn is_home_only(&self) -> bool {
311 unsafe {
312 from_glib(ffi::nm_setting_gsm_get_home_only(self.to_glib_none().0))
313 }
314 }
315
316 #[cfg(feature = "v1_44")]
321 #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))]
322 #[doc(alias = "nm_setting_gsm_get_initial_eps_apn")]
323 #[doc(alias = "get_initial_eps_apn")]
324 pub fn initial_eps_apn(&self) -> glib::GString {
325 unsafe {
326 from_glib_none(ffi::nm_setting_gsm_get_initial_eps_apn(self.to_glib_none().0))
327 }
328 }
329
330 #[cfg(feature = "v1_44")]
335 #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))]
336 #[doc(alias = "nm_setting_gsm_get_initial_eps_config")]
337 #[doc(alias = "get_initial_eps_config")]
338 pub fn is_initial_eps_config(&self) -> bool {
339 unsafe {
340 from_glib(ffi::nm_setting_gsm_get_initial_eps_config(self.to_glib_none().0))
341 }
342 }
343
344 #[cfg(feature = "v1_52")]
349 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
350 #[doc(alias = "nm_setting_gsm_get_initial_eps_noauth")]
351 #[doc(alias = "get_initial_eps_noauth")]
352 pub fn is_initial_eps_noauth(&self) -> bool {
353 unsafe {
354 from_glib(ffi::nm_setting_gsm_get_initial_eps_noauth(self.to_glib_none().0))
355 }
356 }
357
358 #[cfg(feature = "v1_52")]
363 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
364 #[doc(alias = "nm_setting_gsm_get_initial_eps_password")]
365 #[doc(alias = "get_initial_eps_password")]
366 pub fn initial_eps_password(&self) -> glib::GString {
367 unsafe {
368 from_glib_none(ffi::nm_setting_gsm_get_initial_eps_password(self.to_glib_none().0))
369 }
370 }
371
372 #[cfg(feature = "v1_52")]
377 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
378 #[doc(alias = "nm_setting_gsm_get_initial_eps_refuse_chap")]
379 #[doc(alias = "get_initial_eps_refuse_chap")]
380 pub fn is_initial_eps_refuse_chap(&self) -> bool {
381 unsafe {
382 from_glib(ffi::nm_setting_gsm_get_initial_eps_refuse_chap(self.to_glib_none().0))
383 }
384 }
385
386 #[cfg(feature = "v1_52")]
391 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
392 #[doc(alias = "nm_setting_gsm_get_initial_eps_refuse_eap")]
393 #[doc(alias = "get_initial_eps_refuse_eap")]
394 pub fn is_initial_eps_refuse_eap(&self) -> bool {
395 unsafe {
396 from_glib(ffi::nm_setting_gsm_get_initial_eps_refuse_eap(self.to_glib_none().0))
397 }
398 }
399
400 #[cfg(feature = "v1_52")]
405 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
406 #[doc(alias = "nm_setting_gsm_get_initial_eps_refuse_mschap")]
407 #[doc(alias = "get_initial_eps_refuse_mschap")]
408 pub fn is_initial_eps_refuse_mschap(&self) -> bool {
409 unsafe {
410 from_glib(ffi::nm_setting_gsm_get_initial_eps_refuse_mschap(self.to_glib_none().0))
411 }
412 }
413
414 #[cfg(feature = "v1_52")]
419 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
420 #[doc(alias = "nm_setting_gsm_get_initial_eps_refuse_mschapv2")]
421 #[doc(alias = "get_initial_eps_refuse_mschapv2")]
422 pub fn is_initial_eps_refuse_mschapv2(&self) -> bool {
423 unsafe {
424 from_glib(ffi::nm_setting_gsm_get_initial_eps_refuse_mschapv2(self.to_glib_none().0))
425 }
426 }
427
428 #[cfg(feature = "v1_52")]
433 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
434 #[doc(alias = "nm_setting_gsm_get_initial_eps_refuse_pap")]
435 #[doc(alias = "get_initial_eps_refuse_pap")]
436 pub fn is_initial_eps_refuse_pap(&self) -> bool {
437 unsafe {
438 from_glib(ffi::nm_setting_gsm_get_initial_eps_refuse_pap(self.to_glib_none().0))
439 }
440 }
441
442 #[cfg(feature = "v1_52")]
447 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
448 #[doc(alias = "nm_setting_gsm_get_initial_eps_username")]
449 #[doc(alias = "get_initial_eps_username")]
450 pub fn initial_eps_username(&self) -> glib::GString {
451 unsafe {
452 from_glib_none(ffi::nm_setting_gsm_get_initial_eps_username(self.to_glib_none().0))
453 }
454 }
455
456 #[cfg(feature = "v1_8")]
461 #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
462 #[doc(alias = "nm_setting_gsm_get_mtu")]
463 #[doc(alias = "get_mtu")]
464 pub fn mtu(&self) -> u32 {
465 unsafe {
466 ffi::nm_setting_gsm_get_mtu(self.to_glib_none().0)
467 }
468 }
469
470 #[doc(alias = "nm_setting_gsm_get_network_id")]
475 #[doc(alias = "get_network_id")]
476 #[doc(alias = "network-id")]
477 pub fn network_id(&self) -> glib::GString {
478 unsafe {
479 from_glib_none(ffi::nm_setting_gsm_get_network_id(self.to_glib_none().0))
480 }
481 }
482
483 #[cfg_attr(feature = "v1_16", deprecated = "Since 1.16")]
492 #[allow(deprecated)]
493 #[doc(alias = "nm_setting_gsm_get_number")]
494 #[doc(alias = "get_number")]
495 pub fn number(&self) -> glib::GString {
496 unsafe {
497 from_glib_none(ffi::nm_setting_gsm_get_number(self.to_glib_none().0))
498 }
499 }
500
501 #[doc(alias = "nm_setting_gsm_get_password")]
506 #[doc(alias = "get_password")]
507 pub fn password(&self) -> glib::GString {
508 unsafe {
509 from_glib_none(ffi::nm_setting_gsm_get_password(self.to_glib_none().0))
510 }
511 }
512
513 #[doc(alias = "nm_setting_gsm_get_password_flags")]
518 #[doc(alias = "get_password_flags")]
519 #[doc(alias = "password-flags")]
520 pub fn password_flags(&self) -> SettingSecretFlags {
521 unsafe {
522 from_glib(ffi::nm_setting_gsm_get_password_flags(self.to_glib_none().0))
523 }
524 }
525
526 #[doc(alias = "nm_setting_gsm_get_pin")]
531 #[doc(alias = "get_pin")]
532 pub fn pin(&self) -> glib::GString {
533 unsafe {
534 from_glib_none(ffi::nm_setting_gsm_get_pin(self.to_glib_none().0))
535 }
536 }
537
538 #[doc(alias = "nm_setting_gsm_get_pin_flags")]
543 #[doc(alias = "get_pin_flags")]
544 #[doc(alias = "pin-flags")]
545 pub fn pin_flags(&self) -> SettingSecretFlags {
546 unsafe {
547 from_glib(ffi::nm_setting_gsm_get_pin_flags(self.to_glib_none().0))
548 }
549 }
550
551 #[cfg(feature = "v1_2")]
556 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
557 #[doc(alias = "nm_setting_gsm_get_sim_id")]
558 #[doc(alias = "get_sim_id")]
559 #[doc(alias = "sim-id")]
560 pub fn sim_id(&self) -> glib::GString {
561 unsafe {
562 from_glib_none(ffi::nm_setting_gsm_get_sim_id(self.to_glib_none().0))
563 }
564 }
565
566 #[cfg(feature = "v1_2")]
571 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
572 #[doc(alias = "nm_setting_gsm_get_sim_operator_id")]
573 #[doc(alias = "get_sim_operator_id")]
574 #[doc(alias = "sim-operator-id")]
575 pub fn sim_operator_id(&self) -> glib::GString {
576 unsafe {
577 from_glib_none(ffi::nm_setting_gsm_get_sim_operator_id(self.to_glib_none().0))
578 }
579 }
580
581 #[doc(alias = "nm_setting_gsm_get_username")]
586 #[doc(alias = "get_username")]
587 pub fn username(&self) -> glib::GString {
588 unsafe {
589 from_glib_none(ffi::nm_setting_gsm_get_username(self.to_glib_none().0))
590 }
591 }
592
593 pub fn set_apn(&self, apn: Option<&str>) {
605 ObjectExt::set_property(self,"apn", apn)
606 }
607
608 #[cfg(feature = "v1_22")]
612 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
613 #[doc(alias = "auto-config")]
614 pub fn set_auto_config(&self, auto_config: bool) {
615 ObjectExt::set_property(self,"auto-config", auto_config)
616 }
617
618 #[cfg(feature = "v1_2")]
622 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
623 #[doc(alias = "device-id")]
624 pub fn set_device_id(&self, device_id: Option<&str>) {
625 ObjectExt::set_property(self,"device-id", device_id)
626 }
627
628 #[doc(alias = "home-only")]
631 pub fn set_home_only(&self, home_only: bool) {
632 ObjectExt::set_property(self,"home-only", home_only)
633 }
634
635 #[cfg(feature = "v1_44")]
639 #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))]
640 #[doc(alias = "initial-eps-bearer-apn")]
641 pub fn initial_eps_bearer_apn(&self) -> Option<glib::GString> {
642 ObjectExt::property(self, "initial-eps-bearer-apn")
643 }
644
645 #[cfg(feature = "v1_44")]
649 #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))]
650 #[doc(alias = "initial-eps-bearer-apn")]
651 pub fn set_initial_eps_bearer_apn(&self, initial_eps_bearer_apn: Option<&str>) {
652 ObjectExt::set_property(self,"initial-eps-bearer-apn", initial_eps_bearer_apn)
653 }
654
655 #[cfg(feature = "v1_44")]
659 #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))]
660 #[doc(alias = "initial-eps-bearer-configure")]
661 pub fn is_initial_eps_bearer_configure(&self) -> bool {
662 ObjectExt::property(self, "initial-eps-bearer-configure")
663 }
664
665 #[cfg(feature = "v1_44")]
669 #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))]
670 #[doc(alias = "initial-eps-bearer-configure")]
671 pub fn set_initial_eps_bearer_configure(&self, initial_eps_bearer_configure: bool) {
672 ObjectExt::set_property(self,"initial-eps-bearer-configure", initial_eps_bearer_configure)
673 }
674
675 #[cfg(feature = "v1_52")]
681 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
682 #[doc(alias = "initial-eps-bearer-noauth")]
683 pub fn is_initial_eps_bearer_noauth(&self) -> bool {
684 ObjectExt::property(self, "initial-eps-bearer-noauth")
685 }
686
687 #[cfg(feature = "v1_52")]
693 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
694 #[doc(alias = "initial-eps-bearer-noauth")]
695 pub fn set_initial_eps_bearer_noauth(&self, initial_eps_bearer_noauth: bool) {
696 ObjectExt::set_property(self,"initial-eps-bearer-noauth", initial_eps_bearer_noauth)
697 }
698
699 #[cfg(feature = "v1_52")]
703 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
704 #[doc(alias = "initial-eps-bearer-password")]
705 pub fn initial_eps_bearer_password(&self) -> Option<glib::GString> {
706 ObjectExt::property(self, "initial-eps-bearer-password")
707 }
708
709 #[cfg(feature = "v1_52")]
713 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
714 #[doc(alias = "initial-eps-bearer-password")]
715 pub fn set_initial_eps_bearer_password(&self, initial_eps_bearer_password: Option<&str>) {
716 ObjectExt::set_property(self,"initial-eps-bearer-password", initial_eps_bearer_password)
717 }
718
719 #[cfg(feature = "v1_52")]
721 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
722 #[doc(alias = "initial-eps-bearer-password-flags")]
723 pub fn initial_eps_bearer_password_flags(&self) -> SettingSecretFlags {
724 ObjectExt::property(self, "initial-eps-bearer-password-flags")
725 }
726
727 #[cfg(feature = "v1_52")]
729 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
730 #[doc(alias = "initial-eps-bearer-password-flags")]
731 pub fn set_initial_eps_bearer_password_flags(&self, initial_eps_bearer_password_flags: SettingSecretFlags) {
732 ObjectExt::set_property(self,"initial-eps-bearer-password-flags", initial_eps_bearer_password_flags)
733 }
734
735 #[cfg(feature = "v1_52")]
738 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
739 #[doc(alias = "initial-eps-bearer-refuse-chap")]
740 pub fn is_initial_eps_bearer_refuse_chap(&self) -> bool {
741 ObjectExt::property(self, "initial-eps-bearer-refuse-chap")
742 }
743
744 #[cfg(feature = "v1_52")]
747 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
748 #[doc(alias = "initial-eps-bearer-refuse-chap")]
749 pub fn set_initial_eps_bearer_refuse_chap(&self, initial_eps_bearer_refuse_chap: bool) {
750 ObjectExt::set_property(self,"initial-eps-bearer-refuse-chap", initial_eps_bearer_refuse_chap)
751 }
752
753 #[cfg(feature = "v1_52")]
756 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
757 #[doc(alias = "initial-eps-bearer-refuse-eap")]
758 pub fn is_initial_eps_bearer_refuse_eap(&self) -> bool {
759 ObjectExt::property(self, "initial-eps-bearer-refuse-eap")
760 }
761
762 #[cfg(feature = "v1_52")]
765 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
766 #[doc(alias = "initial-eps-bearer-refuse-eap")]
767 pub fn set_initial_eps_bearer_refuse_eap(&self, initial_eps_bearer_refuse_eap: bool) {
768 ObjectExt::set_property(self,"initial-eps-bearer-refuse-eap", initial_eps_bearer_refuse_eap)
769 }
770
771 #[cfg(feature = "v1_52")]
774 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
775 #[doc(alias = "initial-eps-bearer-refuse-mschap")]
776 pub fn is_initial_eps_bearer_refuse_mschap(&self) -> bool {
777 ObjectExt::property(self, "initial-eps-bearer-refuse-mschap")
778 }
779
780 #[cfg(feature = "v1_52")]
783 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
784 #[doc(alias = "initial-eps-bearer-refuse-mschap")]
785 pub fn set_initial_eps_bearer_refuse_mschap(&self, initial_eps_bearer_refuse_mschap: bool) {
786 ObjectExt::set_property(self,"initial-eps-bearer-refuse-mschap", initial_eps_bearer_refuse_mschap)
787 }
788
789 #[cfg(feature = "v1_52")]
792 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
793 #[doc(alias = "initial-eps-bearer-refuse-mschapv2")]
794 pub fn is_initial_eps_bearer_refuse_mschapv2(&self) -> bool {
795 ObjectExt::property(self, "initial-eps-bearer-refuse-mschapv2")
796 }
797
798 #[cfg(feature = "v1_52")]
801 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
802 #[doc(alias = "initial-eps-bearer-refuse-mschapv2")]
803 pub fn set_initial_eps_bearer_refuse_mschapv2(&self, initial_eps_bearer_refuse_mschapv2: bool) {
804 ObjectExt::set_property(self,"initial-eps-bearer-refuse-mschapv2", initial_eps_bearer_refuse_mschapv2)
805 }
806
807 #[cfg(feature = "v1_52")]
810 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
811 #[doc(alias = "initial-eps-bearer-refuse-pap")]
812 pub fn is_initial_eps_bearer_refuse_pap(&self) -> bool {
813 ObjectExt::property(self, "initial-eps-bearer-refuse-pap")
814 }
815
816 #[cfg(feature = "v1_52")]
819 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
820 #[doc(alias = "initial-eps-bearer-refuse-pap")]
821 pub fn set_initial_eps_bearer_refuse_pap(&self, initial_eps_bearer_refuse_pap: bool) {
822 ObjectExt::set_property(self,"initial-eps-bearer-refuse-pap", initial_eps_bearer_refuse_pap)
823 }
824
825 #[cfg(feature = "v1_52")]
829 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
830 #[doc(alias = "initial-eps-bearer-username")]
831 pub fn initial_eps_bearer_username(&self) -> Option<glib::GString> {
832 ObjectExt::property(self, "initial-eps-bearer-username")
833 }
834
835 #[cfg(feature = "v1_52")]
839 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
840 #[doc(alias = "initial-eps-bearer-username")]
841 pub fn set_initial_eps_bearer_username(&self, initial_eps_bearer_username: Option<&str>) {
842 ObjectExt::set_property(self,"initial-eps-bearer-username", initial_eps_bearer_username)
843 }
844
845 #[cfg(feature = "v1_8")]
848 #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
849 pub fn set_mtu(&self, mtu: u32) {
850 ObjectExt::set_property(self,"mtu", mtu)
851 }
852
853 #[doc(alias = "network-id")]
859 pub fn set_network_id(&self, network_id: Option<&str>) {
860 ObjectExt::set_property(self,"network-id", network_id)
861 }
862
863 #[cfg_attr(feature = "v1_16", deprecated = "Since 1.16")]
870 pub fn set_number(&self, number: Option<&str>) {
871 ObjectExt::set_property(self,"number", number)
872 }
873
874 pub fn set_password(&self, password: Option<&str>) {
878 ObjectExt::set_property(self,"password", password)
879 }
880
881 #[doc(alias = "password-flags")]
883 pub fn set_password_flags(&self, password_flags: SettingSecretFlags) {
884 ObjectExt::set_property(self,"password-flags", password_flags)
885 }
886
887 pub fn set_pin(&self, pin: Option<&str>) {
891 ObjectExt::set_property(self,"pin", pin)
892 }
893
894 #[doc(alias = "pin-flags")]
896 pub fn set_pin_flags(&self, pin_flags: SettingSecretFlags) {
897 ObjectExt::set_property(self,"pin-flags", pin_flags)
898 }
899
900 #[cfg(feature = "v1_2")]
905 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
906 #[doc(alias = "sim-id")]
907 pub fn set_sim_id(&self, sim_id: Option<&str>) {
908 ObjectExt::set_property(self,"sim-id", sim_id)
909 }
910
911 #[cfg(feature = "v1_2")]
917 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
918 #[doc(alias = "sim-operator-id")]
919 pub fn set_sim_operator_id(&self, sim_operator_id: Option<&str>) {
920 ObjectExt::set_property(self,"sim-operator-id", sim_operator_id)
921 }
922
923 pub fn set_username(&self, username: Option<&str>) {
927 ObjectExt::set_property(self,"username", username)
928 }
929
930 #[doc(alias = "apn")]
931 pub fn connect_apn_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
932 unsafe extern "C" fn notify_apn_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
933 let f: &F = &*(f as *const F);
934 f(&from_glib_borrow(this))
935 }
936 unsafe {
937 let f: Box_<F> = Box_::new(f);
938 connect_raw(self.as_ptr() as *mut _, c"notify::apn".as_ptr() as *const _,
939 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_apn_trampoline::<F> as *const ())), Box_::into_raw(f))
940 }
941 }
942
943 #[cfg(feature = "v1_22")]
944 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
945 #[doc(alias = "auto-config")]
946 pub fn connect_auto_config_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
947 unsafe extern "C" fn notify_auto_config_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
948 let f: &F = &*(f as *const F);
949 f(&from_glib_borrow(this))
950 }
951 unsafe {
952 let f: Box_<F> = Box_::new(f);
953 connect_raw(self.as_ptr() as *mut _, c"notify::auto-config".as_ptr() as *const _,
954 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_auto_config_trampoline::<F> as *const ())), Box_::into_raw(f))
955 }
956 }
957
958 #[cfg(feature = "v1_2")]
959 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
960 #[doc(alias = "device-id")]
961 pub fn connect_device_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
962 unsafe extern "C" fn notify_device_id_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
963 let f: &F = &*(f as *const F);
964 f(&from_glib_borrow(this))
965 }
966 unsafe {
967 let f: Box_<F> = Box_::new(f);
968 connect_raw(self.as_ptr() as *mut _, c"notify::device-id".as_ptr() as *const _,
969 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_device_id_trampoline::<F> as *const ())), Box_::into_raw(f))
970 }
971 }
972
973 #[doc(alias = "home-only")]
974 pub fn connect_home_only_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
975 unsafe extern "C" fn notify_home_only_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
976 let f: &F = &*(f as *const F);
977 f(&from_glib_borrow(this))
978 }
979 unsafe {
980 let f: Box_<F> = Box_::new(f);
981 connect_raw(self.as_ptr() as *mut _, c"notify::home-only".as_ptr() as *const _,
982 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_home_only_trampoline::<F> as *const ())), Box_::into_raw(f))
983 }
984 }
985
986 #[cfg(feature = "v1_44")]
987 #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))]
988 #[doc(alias = "initial-eps-bearer-apn")]
989 pub fn connect_initial_eps_bearer_apn_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
990 unsafe extern "C" fn notify_initial_eps_bearer_apn_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
991 let f: &F = &*(f as *const F);
992 f(&from_glib_borrow(this))
993 }
994 unsafe {
995 let f: Box_<F> = Box_::new(f);
996 connect_raw(self.as_ptr() as *mut _, c"notify::initial-eps-bearer-apn".as_ptr() as *const _,
997 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_initial_eps_bearer_apn_trampoline::<F> as *const ())), Box_::into_raw(f))
998 }
999 }
1000
1001 #[cfg(feature = "v1_44")]
1002 #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))]
1003 #[doc(alias = "initial-eps-bearer-configure")]
1004 pub fn connect_initial_eps_bearer_configure_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1005 unsafe extern "C" fn notify_initial_eps_bearer_configure_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1006 let f: &F = &*(f as *const F);
1007 f(&from_glib_borrow(this))
1008 }
1009 unsafe {
1010 let f: Box_<F> = Box_::new(f);
1011 connect_raw(self.as_ptr() as *mut _, c"notify::initial-eps-bearer-configure".as_ptr() as *const _,
1012 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_initial_eps_bearer_configure_trampoline::<F> as *const ())), Box_::into_raw(f))
1013 }
1014 }
1015
1016 #[cfg(feature = "v1_52")]
1017 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1018 #[doc(alias = "initial-eps-bearer-noauth")]
1019 pub fn connect_initial_eps_bearer_noauth_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1020 unsafe extern "C" fn notify_initial_eps_bearer_noauth_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1021 let f: &F = &*(f as *const F);
1022 f(&from_glib_borrow(this))
1023 }
1024 unsafe {
1025 let f: Box_<F> = Box_::new(f);
1026 connect_raw(self.as_ptr() as *mut _, c"notify::initial-eps-bearer-noauth".as_ptr() as *const _,
1027 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_initial_eps_bearer_noauth_trampoline::<F> as *const ())), Box_::into_raw(f))
1028 }
1029 }
1030
1031 #[cfg(feature = "v1_52")]
1032 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1033 #[doc(alias = "initial-eps-bearer-password")]
1034 pub fn connect_initial_eps_bearer_password_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1035 unsafe extern "C" fn notify_initial_eps_bearer_password_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1036 let f: &F = &*(f as *const F);
1037 f(&from_glib_borrow(this))
1038 }
1039 unsafe {
1040 let f: Box_<F> = Box_::new(f);
1041 connect_raw(self.as_ptr() as *mut _, c"notify::initial-eps-bearer-password".as_ptr() as *const _,
1042 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_initial_eps_bearer_password_trampoline::<F> as *const ())), Box_::into_raw(f))
1043 }
1044 }
1045
1046 #[cfg(feature = "v1_52")]
1047 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1048 #[doc(alias = "initial-eps-bearer-password-flags")]
1049 pub fn connect_initial_eps_bearer_password_flags_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1050 unsafe extern "C" fn notify_initial_eps_bearer_password_flags_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1051 let f: &F = &*(f as *const F);
1052 f(&from_glib_borrow(this))
1053 }
1054 unsafe {
1055 let f: Box_<F> = Box_::new(f);
1056 connect_raw(self.as_ptr() as *mut _, c"notify::initial-eps-bearer-password-flags".as_ptr() as *const _,
1057 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_initial_eps_bearer_password_flags_trampoline::<F> as *const ())), Box_::into_raw(f))
1058 }
1059 }
1060
1061 #[cfg(feature = "v1_52")]
1062 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1063 #[doc(alias = "initial-eps-bearer-refuse-chap")]
1064 pub fn connect_initial_eps_bearer_refuse_chap_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1065 unsafe extern "C" fn notify_initial_eps_bearer_refuse_chap_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1066 let f: &F = &*(f as *const F);
1067 f(&from_glib_borrow(this))
1068 }
1069 unsafe {
1070 let f: Box_<F> = Box_::new(f);
1071 connect_raw(self.as_ptr() as *mut _, c"notify::initial-eps-bearer-refuse-chap".as_ptr() as *const _,
1072 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_initial_eps_bearer_refuse_chap_trampoline::<F> as *const ())), Box_::into_raw(f))
1073 }
1074 }
1075
1076 #[cfg(feature = "v1_52")]
1077 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1078 #[doc(alias = "initial-eps-bearer-refuse-eap")]
1079 pub fn connect_initial_eps_bearer_refuse_eap_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1080 unsafe extern "C" fn notify_initial_eps_bearer_refuse_eap_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1081 let f: &F = &*(f as *const F);
1082 f(&from_glib_borrow(this))
1083 }
1084 unsafe {
1085 let f: Box_<F> = Box_::new(f);
1086 connect_raw(self.as_ptr() as *mut _, c"notify::initial-eps-bearer-refuse-eap".as_ptr() as *const _,
1087 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_initial_eps_bearer_refuse_eap_trampoline::<F> as *const ())), Box_::into_raw(f))
1088 }
1089 }
1090
1091 #[cfg(feature = "v1_52")]
1092 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1093 #[doc(alias = "initial-eps-bearer-refuse-mschap")]
1094 pub fn connect_initial_eps_bearer_refuse_mschap_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1095 unsafe extern "C" fn notify_initial_eps_bearer_refuse_mschap_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1096 let f: &F = &*(f as *const F);
1097 f(&from_glib_borrow(this))
1098 }
1099 unsafe {
1100 let f: Box_<F> = Box_::new(f);
1101 connect_raw(self.as_ptr() as *mut _, c"notify::initial-eps-bearer-refuse-mschap".as_ptr() as *const _,
1102 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_initial_eps_bearer_refuse_mschap_trampoline::<F> as *const ())), Box_::into_raw(f))
1103 }
1104 }
1105
1106 #[cfg(feature = "v1_52")]
1107 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1108 #[doc(alias = "initial-eps-bearer-refuse-mschapv2")]
1109 pub fn connect_initial_eps_bearer_refuse_mschapv2_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1110 unsafe extern "C" fn notify_initial_eps_bearer_refuse_mschapv2_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1111 let f: &F = &*(f as *const F);
1112 f(&from_glib_borrow(this))
1113 }
1114 unsafe {
1115 let f: Box_<F> = Box_::new(f);
1116 connect_raw(self.as_ptr() as *mut _, c"notify::initial-eps-bearer-refuse-mschapv2".as_ptr() as *const _,
1117 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_initial_eps_bearer_refuse_mschapv2_trampoline::<F> as *const ())), Box_::into_raw(f))
1118 }
1119 }
1120
1121 #[cfg(feature = "v1_52")]
1122 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1123 #[doc(alias = "initial-eps-bearer-refuse-pap")]
1124 pub fn connect_initial_eps_bearer_refuse_pap_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1125 unsafe extern "C" fn notify_initial_eps_bearer_refuse_pap_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1126 let f: &F = &*(f as *const F);
1127 f(&from_glib_borrow(this))
1128 }
1129 unsafe {
1130 let f: Box_<F> = Box_::new(f);
1131 connect_raw(self.as_ptr() as *mut _, c"notify::initial-eps-bearer-refuse-pap".as_ptr() as *const _,
1132 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_initial_eps_bearer_refuse_pap_trampoline::<F> as *const ())), Box_::into_raw(f))
1133 }
1134 }
1135
1136 #[cfg(feature = "v1_52")]
1137 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1138 #[doc(alias = "initial-eps-bearer-username")]
1139 pub fn connect_initial_eps_bearer_username_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1140 unsafe extern "C" fn notify_initial_eps_bearer_username_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1141 let f: &F = &*(f as *const F);
1142 f(&from_glib_borrow(this))
1143 }
1144 unsafe {
1145 let f: Box_<F> = Box_::new(f);
1146 connect_raw(self.as_ptr() as *mut _, c"notify::initial-eps-bearer-username".as_ptr() as *const _,
1147 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_initial_eps_bearer_username_trampoline::<F> as *const ())), Box_::into_raw(f))
1148 }
1149 }
1150
1151 #[cfg(feature = "v1_8")]
1152 #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
1153 #[doc(alias = "mtu")]
1154 pub fn connect_mtu_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1155 unsafe extern "C" fn notify_mtu_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1156 let f: &F = &*(f as *const F);
1157 f(&from_glib_borrow(this))
1158 }
1159 unsafe {
1160 let f: Box_<F> = Box_::new(f);
1161 connect_raw(self.as_ptr() as *mut _, c"notify::mtu".as_ptr() as *const _,
1162 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_mtu_trampoline::<F> as *const ())), Box_::into_raw(f))
1163 }
1164 }
1165
1166 #[doc(alias = "network-id")]
1167 pub fn connect_network_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1168 unsafe extern "C" fn notify_network_id_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1169 let f: &F = &*(f as *const F);
1170 f(&from_glib_borrow(this))
1171 }
1172 unsafe {
1173 let f: Box_<F> = Box_::new(f);
1174 connect_raw(self.as_ptr() as *mut _, c"notify::network-id".as_ptr() as *const _,
1175 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_network_id_trampoline::<F> as *const ())), Box_::into_raw(f))
1176 }
1177 }
1178
1179 #[cfg_attr(feature = "v1_16", deprecated = "Since 1.16")]
1180 #[doc(alias = "number")]
1181 pub fn connect_number_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1182 unsafe extern "C" fn notify_number_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1183 let f: &F = &*(f as *const F);
1184 f(&from_glib_borrow(this))
1185 }
1186 unsafe {
1187 let f: Box_<F> = Box_::new(f);
1188 connect_raw(self.as_ptr() as *mut _, c"notify::number".as_ptr() as *const _,
1189 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_number_trampoline::<F> as *const ())), Box_::into_raw(f))
1190 }
1191 }
1192
1193 #[doc(alias = "password")]
1194 pub fn connect_password_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1195 unsafe extern "C" fn notify_password_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1196 let f: &F = &*(f as *const F);
1197 f(&from_glib_borrow(this))
1198 }
1199 unsafe {
1200 let f: Box_<F> = Box_::new(f);
1201 connect_raw(self.as_ptr() as *mut _, c"notify::password".as_ptr() as *const _,
1202 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_password_trampoline::<F> as *const ())), Box_::into_raw(f))
1203 }
1204 }
1205
1206 #[doc(alias = "password-flags")]
1207 pub fn connect_password_flags_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1208 unsafe extern "C" fn notify_password_flags_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1209 let f: &F = &*(f as *const F);
1210 f(&from_glib_borrow(this))
1211 }
1212 unsafe {
1213 let f: Box_<F> = Box_::new(f);
1214 connect_raw(self.as_ptr() as *mut _, c"notify::password-flags".as_ptr() as *const _,
1215 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_password_flags_trampoline::<F> as *const ())), Box_::into_raw(f))
1216 }
1217 }
1218
1219 #[doc(alias = "pin")]
1220 pub fn connect_pin_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1221 unsafe extern "C" fn notify_pin_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1222 let f: &F = &*(f as *const F);
1223 f(&from_glib_borrow(this))
1224 }
1225 unsafe {
1226 let f: Box_<F> = Box_::new(f);
1227 connect_raw(self.as_ptr() as *mut _, c"notify::pin".as_ptr() as *const _,
1228 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_pin_trampoline::<F> as *const ())), Box_::into_raw(f))
1229 }
1230 }
1231
1232 #[doc(alias = "pin-flags")]
1233 pub fn connect_pin_flags_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1234 unsafe extern "C" fn notify_pin_flags_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1235 let f: &F = &*(f as *const F);
1236 f(&from_glib_borrow(this))
1237 }
1238 unsafe {
1239 let f: Box_<F> = Box_::new(f);
1240 connect_raw(self.as_ptr() as *mut _, c"notify::pin-flags".as_ptr() as *const _,
1241 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_pin_flags_trampoline::<F> as *const ())), Box_::into_raw(f))
1242 }
1243 }
1244
1245 #[cfg(feature = "v1_2")]
1246 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1247 #[doc(alias = "sim-id")]
1248 pub fn connect_sim_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1249 unsafe extern "C" fn notify_sim_id_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1250 let f: &F = &*(f as *const F);
1251 f(&from_glib_borrow(this))
1252 }
1253 unsafe {
1254 let f: Box_<F> = Box_::new(f);
1255 connect_raw(self.as_ptr() as *mut _, c"notify::sim-id".as_ptr() as *const _,
1256 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_sim_id_trampoline::<F> as *const ())), Box_::into_raw(f))
1257 }
1258 }
1259
1260 #[cfg(feature = "v1_2")]
1261 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1262 #[doc(alias = "sim-operator-id")]
1263 pub fn connect_sim_operator_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1264 unsafe extern "C" fn notify_sim_operator_id_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1265 let f: &F = &*(f as *const F);
1266 f(&from_glib_borrow(this))
1267 }
1268 unsafe {
1269 let f: Box_<F> = Box_::new(f);
1270 connect_raw(self.as_ptr() as *mut _, c"notify::sim-operator-id".as_ptr() as *const _,
1271 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_sim_operator_id_trampoline::<F> as *const ())), Box_::into_raw(f))
1272 }
1273 }
1274
1275 #[doc(alias = "username")]
1276 pub fn connect_username_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1277 unsafe extern "C" fn notify_username_trampoline<F: Fn(&SettingGsm) + 'static>(this: *mut ffi::NMSettingGsm, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1278 let f: &F = &*(f as *const F);
1279 f(&from_glib_borrow(this))
1280 }
1281 unsafe {
1282 let f: Box_<F> = Box_::new(f);
1283 connect_raw(self.as_ptr() as *mut _, c"notify::username".as_ptr() as *const _,
1284 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_username_trampoline::<F> as *const ())), Box_::into_raw(f))
1285 }
1286 }
1287}
1288
1289impl Default for SettingGsm {
1290 fn default() -> Self {
1291 Self::new()
1292 }
1293 }
1294
1295#[must_use = "The builder must be built to be used"]
1300pub struct SettingGsmBuilder {
1301 builder: glib::object::ObjectBuilder<'static, SettingGsm>,
1302 }
1303
1304 impl SettingGsmBuilder {
1305 fn new() -> Self {
1306 Self { builder: glib::object::Object::builder() }
1307 }
1308
1309 pub fn apn(self, apn: impl Into<glib::GString>) -> Self {
1321 Self { builder: self.builder.property("apn", apn.into()), }
1322 }
1323
1324 #[cfg(feature = "v1_22")]
1328 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
1329 pub fn auto_config(self, auto_config: bool) -> Self {
1330 Self { builder: self.builder.property("auto-config", auto_config), }
1331 }
1332
1333 #[cfg(feature = "v1_2")]
1337 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1338 pub fn device_id(self, device_id: impl Into<glib::GString>) -> Self {
1339 Self { builder: self.builder.property("device-id", device_id.into()), }
1340 }
1341
1342 pub fn home_only(self, home_only: bool) -> Self {
1345 Self { builder: self.builder.property("home-only", home_only), }
1346 }
1347
1348 #[cfg(feature = "v1_44")]
1352 #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))]
1353 pub fn initial_eps_bearer_apn(self, initial_eps_bearer_apn: impl Into<glib::GString>) -> Self {
1354 Self { builder: self.builder.property("initial-eps-bearer-apn", initial_eps_bearer_apn.into()), }
1355 }
1356
1357 #[cfg(feature = "v1_44")]
1361 #[cfg_attr(docsrs, doc(cfg(feature = "v1_44")))]
1362 pub fn initial_eps_bearer_configure(self, initial_eps_bearer_configure: bool) -> Self {
1363 Self { builder: self.builder.property("initial-eps-bearer-configure", initial_eps_bearer_configure), }
1364 }
1365
1366 #[cfg(feature = "v1_52")]
1372 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1373 pub fn initial_eps_bearer_noauth(self, initial_eps_bearer_noauth: bool) -> Self {
1374 Self { builder: self.builder.property("initial-eps-bearer-noauth", initial_eps_bearer_noauth), }
1375 }
1376
1377 #[cfg(feature = "v1_52")]
1381 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1382 pub fn initial_eps_bearer_password(self, initial_eps_bearer_password: impl Into<glib::GString>) -> Self {
1383 Self { builder: self.builder.property("initial-eps-bearer-password", initial_eps_bearer_password.into()), }
1384 }
1385
1386 #[cfg(feature = "v1_52")]
1388 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1389 pub fn initial_eps_bearer_password_flags(self, initial_eps_bearer_password_flags: SettingSecretFlags) -> Self {
1390 Self { builder: self.builder.property("initial-eps-bearer-password-flags", initial_eps_bearer_password_flags), }
1391 }
1392
1393 #[cfg(feature = "v1_52")]
1396 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1397 pub fn initial_eps_bearer_refuse_chap(self, initial_eps_bearer_refuse_chap: bool) -> Self {
1398 Self { builder: self.builder.property("initial-eps-bearer-refuse-chap", initial_eps_bearer_refuse_chap), }
1399 }
1400
1401 #[cfg(feature = "v1_52")]
1404 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1405 pub fn initial_eps_bearer_refuse_eap(self, initial_eps_bearer_refuse_eap: bool) -> Self {
1406 Self { builder: self.builder.property("initial-eps-bearer-refuse-eap", initial_eps_bearer_refuse_eap), }
1407 }
1408
1409 #[cfg(feature = "v1_52")]
1412 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1413 pub fn initial_eps_bearer_refuse_mschap(self, initial_eps_bearer_refuse_mschap: bool) -> Self {
1414 Self { builder: self.builder.property("initial-eps-bearer-refuse-mschap", initial_eps_bearer_refuse_mschap), }
1415 }
1416
1417 #[cfg(feature = "v1_52")]
1420 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1421 pub fn initial_eps_bearer_refuse_mschapv2(self, initial_eps_bearer_refuse_mschapv2: bool) -> Self {
1422 Self { builder: self.builder.property("initial-eps-bearer-refuse-mschapv2", initial_eps_bearer_refuse_mschapv2), }
1423 }
1424
1425 #[cfg(feature = "v1_52")]
1428 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1429 pub fn initial_eps_bearer_refuse_pap(self, initial_eps_bearer_refuse_pap: bool) -> Self {
1430 Self { builder: self.builder.property("initial-eps-bearer-refuse-pap", initial_eps_bearer_refuse_pap), }
1431 }
1432
1433 #[cfg(feature = "v1_52")]
1437 #[cfg_attr(docsrs, doc(cfg(feature = "v1_52")))]
1438 pub fn initial_eps_bearer_username(self, initial_eps_bearer_username: impl Into<glib::GString>) -> Self {
1439 Self { builder: self.builder.property("initial-eps-bearer-username", initial_eps_bearer_username.into()), }
1440 }
1441
1442 #[cfg(feature = "v1_8")]
1445 #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
1446 pub fn mtu(self, mtu: u32) -> Self {
1447 Self { builder: self.builder.property("mtu", mtu), }
1448 }
1449
1450 pub fn network_id(self, network_id: impl Into<glib::GString>) -> Self {
1456 Self { builder: self.builder.property("network-id", network_id.into()), }
1457 }
1458
1459 #[cfg_attr(feature = "v1_16", deprecated = "Since 1.16")]
1463 pub fn number(self, number: impl Into<glib::GString>) -> Self {
1464 Self { builder: self.builder.property("number", number.into()), }
1465 }
1466
1467 pub fn password(self, password: impl Into<glib::GString>) -> Self {
1471 Self { builder: self.builder.property("password", password.into()), }
1472 }
1473
1474 pub fn password_flags(self, password_flags: SettingSecretFlags) -> Self {
1476 Self { builder: self.builder.property("password-flags", password_flags), }
1477 }
1478
1479 pub fn pin(self, pin: impl Into<glib::GString>) -> Self {
1483 Self { builder: self.builder.property("pin", pin.into()), }
1484 }
1485
1486 pub fn pin_flags(self, pin_flags: SettingSecretFlags) -> Self {
1488 Self { builder: self.builder.property("pin-flags", pin_flags), }
1489 }
1490
1491 #[cfg(feature = "v1_2")]
1496 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1497 pub fn sim_id(self, sim_id: impl Into<glib::GString>) -> Self {
1498 Self { builder: self.builder.property("sim-id", sim_id.into()), }
1499 }
1500
1501 #[cfg(feature = "v1_2")]
1507 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1508 pub fn sim_operator_id(self, sim_operator_id: impl Into<glib::GString>) -> Self {
1509 Self { builder: self.builder.property("sim-operator-id", sim_operator_id.into()), }
1510 }
1511
1512 pub fn username(self, username: impl Into<glib::GString>) -> Self {
1516 Self { builder: self.builder.property("username", username.into()), }
1517 }
1518
1519 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
1522 pub fn build(self) -> SettingGsm {
1523assert_initialized_main_thread!();
1524 self.builder.build() }
1525}