summaryrefslogtreecommitdiff
path: root/libnm-glib/nm-dhcp6-config.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2012-01-20 07:52:17 -0500
committerDan Williams <dcbw@redhat.com>2012-02-03 10:33:43 -0600
commit2e48cc092c133ed3e10efcc00cf36b29c9d3efc8 (patch)
tree4cc6f765d30b63a9eff0d171bc6083c114b906f0 /libnm-glib/nm-dhcp6-config.c
parent38382770aa36b2690fbb366a649f91e38f449e7c (diff)
downloadNetworkManager-2e48cc092c133ed3e10efcc00cf36b29c9d3efc8.tar.gz
libnm-glib: simplify and genericize property declaration
Rename _nm_object_handle_properties_changed(), etc, to be about properties in general, rather than just property changes. Interpret func==NULL in NMPropertiesInfo as meaning "use _nm_object_demarshal_generic", and then reorder the fields so that you can just leave that field out in the declarations when it's NULL. Add a way to register properties that exist in D-Bus but aren't tracked by the NMObjects, and use that for NMDevice's D-Bus Ip4Address property, replacing the existing hack. Also add a few other missing properties noticed along the way.
Diffstat (limited to 'libnm-glib/nm-dhcp6-config.c')
-rw-r--r--libnm-glib/nm-dhcp6-config.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libnm-glib/nm-dhcp6-config.c b/libnm-glib/nm-dhcp6-config.c
index 00698ed54f..c282a279a9 100644
--- a/libnm-glib/nm-dhcp6-config.c
+++ b/libnm-glib/nm-dhcp6-config.c
@@ -77,17 +77,17 @@ demarshal_dhcp6_options (NMObject *object, GParamSpec *pspec, GValue *value, gpo
}
static void
-register_for_property_changed (NMDHCP6Config *config)
+register_properties (NMDHCP6Config *config)
{
NMDHCP6ConfigPrivate *priv = NM_DHCP6_CONFIG_GET_PRIVATE (config);
- const NMPropertiesChangedInfo property_changed_info[] = {
- { NM_DHCP6_CONFIG_OPTIONS, demarshal_dhcp6_options, &priv->options },
+ const NMPropertiesInfo property_info[] = {
+ { NM_DHCP6_CONFIG_OPTIONS, &priv->options, demarshal_dhcp6_options },
{ NULL },
};
- _nm_object_handle_properties_changed (NM_OBJECT (config),
- priv->proxy,
- property_changed_info);
+ _nm_object_register_properties (NM_OBJECT (config),
+ priv->proxy,
+ property_info);
}
static GObject*
@@ -115,7 +115,7 @@ constructor (GType type,
nm_object_get_path (object),
NM_DBUS_INTERFACE_DHCP6_CONFIG);
- register_for_property_changed (NM_DHCP6_CONFIG (object));
+ register_properties (NM_DHCP6_CONFIG (object));
return G_OBJECT (object);
}