summary refs log tree commit diff
path: root/src/libnm-core-impl/nm-setting-cdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnm-core-impl/nm-setting-cdma.c')
-rw-r--r--src/libnm-core-impl/nm-setting-cdma.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/libnm-core-impl/nm-setting-cdma.c b/src/libnm-core-impl/nm-setting-cdma.c
index c32af6b7..b497cf14 100644
--- a/src/libnm-core-impl/nm-setting-cdma.c
+++ b/src/libnm-core-impl/nm-setting-cdma.c
@@ -42,20 +42,18 @@ typedef struct {
  * CDMA-based Mobile Broadband Settings
  */
 struct _NMSettingCdma {
-    NMSetting parent;
-    /* In the past, this struct was public API. Preserve ABI! */
+    NMSetting            parent;
+    NMSettingCdmaPrivate _priv;
 };
 
 struct _NMSettingCdmaClass {
     NMSettingClass parent;
-    /* In the past, this struct was public API. Preserve ABI! */
-    gpointer padding[4];
 };
 
 G_DEFINE_TYPE(NMSettingCdma, nm_setting_cdma, NM_TYPE_SETTING)
 
 #define NM_SETTING_CDMA_GET_PRIVATE(o) \
-    (G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_CDMA, NMSettingCdmaPrivate))
+    _NM_GET_PRIVATE(o, NMSettingCdma, NM_IS_SETTING_CDMA, NMSetting)
 
 /*****************************************************************************/
 
@@ -218,8 +216,6 @@ nm_setting_cdma_class_init(NMSettingCdmaClass *klass)
     NMSettingClass *setting_class       = NM_SETTING_CLASS(klass);
     GArray         *properties_override = _nm_sett_info_property_override_create_array();
 
-    g_type_class_add_private(klass, sizeof(NMSettingCdmaPrivate));
-
     object_class->get_property = _nm_setting_property_get_property_direct;
     object_class->set_property = _nm_setting_property_set_property_direct;
 
@@ -240,7 +236,8 @@ nm_setting_cdma_class_init(NMSettingCdmaClass *klass)
                                               PROP_NUMBER,
                                               NM_SETTING_PARAM_NONE,
                                               NMSettingCdmaPrivate,
-                                              number);
+                                              number,
+                                              .direct_string_allow_empty = TRUE);
 
     /**
      * NMSettingCdma:username:
@@ -255,7 +252,8 @@ nm_setting_cdma_class_init(NMSettingCdmaClass *klass)
                                               PROP_USERNAME,
                                               NM_SETTING_PARAM_NONE,
                                               NMSettingCdmaPrivate,
-                                              username);
+                                              username,
+                                              .direct_string_allow_empty = TRUE);
 
     /**
      * NMSettingCdma:password:
@@ -270,7 +268,8 @@ nm_setting_cdma_class_init(NMSettingCdmaClass *klass)
                                               PROP_PASSWORD,
                                               NM_SETTING_PARAM_SECRET,
                                               NMSettingCdmaPrivate,
-                                              password);
+                                              password,
+                                              .direct_string_allow_empty = TRUE);
 
     /**
      * NMSettingCdma:password-flags:
@@ -309,5 +308,5 @@ nm_setting_cdma_class_init(NMSettingCdmaClass *klass)
                              NM_META_SETTING_TYPE_CDMA,
                              NULL,
                              properties_override,
-                             NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
+                             G_STRUCT_OFFSET(NMSettingCdma, _priv));
 }