diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index 9a7f74db5a..b64b4709b1 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -322,12 +322,6 @@ guint _nm_setting_gendata_get_all (NMSetting *setting, const char *const**out_names, GVariant *const**out_values); -gboolean _nm_setting_gendata_reset_from_hash (NMSetting *setting, - GHashTable *new); - -void _nm_setting_gendata_to_gvalue (NMSetting *setting, - GValue *value); - GVariant *nm_setting_gendata_get (NMSetting *setting, const char *name); diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c index c215b5cb58..ad050ee47b 100644 --- a/libnm-core/nm-setting.c +++ b/libnm-core/nm-setting.c @@ -2524,71 +2524,6 @@ nm_setting_gendata_get_all_names (NMSetting *setting, return names; } -void -_nm_setting_gendata_to_gvalue (NMSetting *setting, - GValue *value) -{ - GenData *gendata; - GHashTable *new; - const char *key; - GVariant *val; - GHashTableIter iter; - - nm_assert (NM_IS_SETTING (setting)); - nm_assert (value); - nm_assert (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_HASH_TABLE)); - - new = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref); - - gendata = _gendata_hash (setting, FALSE); - if (gendata) { - g_hash_table_iter_init (&iter, gendata->hash); - while (g_hash_table_iter_next (&iter, (gpointer *) &key, (gpointer *) &val)) - g_hash_table_insert (new, g_strdup (key), g_variant_ref (val)); - } - - g_value_take_boxed (value, new); -} - -gboolean -_nm_setting_gendata_reset_from_hash (NMSetting *setting, - GHashTable *new) -{ - GenData *gendata; - GHashTableIter iter; - const char *key; - GVariant *val; - guint num; - - nm_assert (NM_IS_SETTING (setting)); - nm_assert (new); - - num = new ? g_hash_table_size (new) : 0; - - gendata = _gendata_hash (setting, num > 0); - - if (num == 0) { - if ( !gendata - || g_hash_table_size (gendata->hash) == 0) - return FALSE; - - g_hash_table_remove_all (gendata->hash); - _nm_setting_gendata_notify (setting, TRUE); - return TRUE; - } - - /* let's not bother to find out whether the new hash has any different - * content the current gendata. Just replace it. */ - g_hash_table_remove_all (gendata->hash); - if (num > 0) { - g_hash_table_iter_init (&iter, new); - while (g_hash_table_iter_next (&iter, (gpointer *) &key, (gpointer *) &val)) - g_hash_table_insert (gendata->hash, g_strdup (key), g_variant_ref (val)); - } - _nm_setting_gendata_notify (setting, TRUE); - return TRUE; -} - gboolean nm_setting_gendata_get_uint32 (NMSetting *setting, const char *optname,