summaryrefslogtreecommitdiff
path: root/libnm-core/nm-setting-ip6-config.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-07-29 09:22:07 -0400
committerDan Winship <danw@gnome.org>2014-09-04 09:20:10 -0400
commitca9938f458521b24b262be79a6f86a89f6d630a6 (patch)
tree2e1a057c45f5dc10ce3eaccd9f8b439daef8dcb3 /libnm-core/nm-setting-ip6-config.c
parent99e1699d8971f7cb5787989eed301ecb7f2eb863 (diff)
downloadNetworkManager-ca9938f458521b24b262be79a6f86a89f6d630a6.tar.gz
libnm-core: drop NMParamSpecSpecialized, add nm_property_compare()
NMParamSpecSpecialized existed basically to provide a version of GParamSpecBoxed that could compare dbus-glib-valued properties correctly. However, g_param_values_cmp() was only used by NM directly in one place (NMSetting's compare_property()), and we don't actually need to indirect through GParamSpec there; we could just call NMParamSpecSpecialized's value-comparison function directly. So, change all NMParamSpecSpecialized properties to GParamSpecBoxed, rename the _gvalues_compare() function it used to "nm_property_compare()", and use that from NMSetting. (g_param_values_cmp() also gets used internally by g_param_value_defaults(), but all NMParamSpecSpecialized properties have a default value of NULL, so GParamSpecBoxed's pointer-equality check will do the job just fine there.)
Diffstat (limited to 'libnm-core/nm-setting-ip6-config.c')
-rw-r--r--libnm-core/nm-setting-ip6-config.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/libnm-core/nm-setting-ip6-config.c b/libnm-core/nm-setting-ip6-config.c
index 90ebd4e182..46cc538fba 100644
--- a/libnm-core/nm-setting-ip6-config.c
+++ b/libnm-core/nm-setting-ip6-config.c
@@ -24,7 +24,6 @@
#include <glib/gi18n.h>
#include "nm-setting-ip6-config.h"
-#include "nm-param-spec-specialized.h"
#include "nm-utils.h"
#include "nm-dbus-glib-types.h"
#include "nm-glib-compat.h"
@@ -1047,10 +1046,10 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *setting_class)
**/
g_object_class_install_property
(object_class, PROP_DNS,
- _nm_param_spec_specialized (NM_SETTING_IP6_CONFIG_DNS, "", "",
- DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UCHAR,
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS));
+ g_param_spec_boxed (NM_SETTING_IP6_CONFIG_DNS, "", "",
+ DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UCHAR,
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
/**
* NMSettingIP6Config:dns-search:
@@ -1063,10 +1062,10 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *setting_class)
**/
g_object_class_install_property
(object_class, PROP_DNS_SEARCH,
- _nm_param_spec_specialized (NM_SETTING_IP6_CONFIG_DNS_SEARCH, "", "",
- DBUS_TYPE_G_LIST_OF_STRING,
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS));
+ g_param_spec_boxed (NM_SETTING_IP6_CONFIG_DNS_SEARCH, "", "",
+ DBUS_TYPE_G_LIST_OF_STRING,
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
/**
* NMSettingIP6Config:addresses:
@@ -1084,11 +1083,11 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *setting_class)
**/
g_object_class_install_property
(object_class, PROP_ADDRESSES,
- _nm_param_spec_specialized (NM_SETTING_IP6_CONFIG_ADDRESSES, "", "",
- DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS,
- G_PARAM_READWRITE |
- NM_SETTING_PARAM_INFERRABLE |
- G_PARAM_STATIC_STRINGS));
+ g_param_spec_boxed (NM_SETTING_IP6_CONFIG_ADDRESSES, "", "",
+ DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS,
+ G_PARAM_READWRITE |
+ NM_SETTING_PARAM_INFERRABLE |
+ G_PARAM_STATIC_STRINGS));
/**
* NMSettingIP6Config:routes:
@@ -1104,11 +1103,11 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *setting_class)
**/
g_object_class_install_property
(object_class, PROP_ROUTES,
- _nm_param_spec_specialized (NM_SETTING_IP6_CONFIG_ROUTES, "", "",
- DBUS_TYPE_G_ARRAY_OF_IP6_ROUTE,
- G_PARAM_READWRITE |
- NM_SETTING_PARAM_INFERRABLE |
- G_PARAM_STATIC_STRINGS));
+ g_param_spec_boxed (NM_SETTING_IP6_CONFIG_ROUTES, "", "",
+ DBUS_TYPE_G_ARRAY_OF_IP6_ROUTE,
+ G_PARAM_READWRITE |
+ NM_SETTING_PARAM_INFERRABLE |
+ G_PARAM_STATIC_STRINGS));
/**
* NMSettingIP6Config:ignore-auto-routes: