From c17721b3609711884228189a035cd9855dfdcdca Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 16 Feb 2011 11:09:30 -0600 Subject: [PATCH] libnm-glib: allow manual processing of properties changed events Mostly for handling the GetAll response. --- libnm-glib/nm-object-private.h | 8 +++++--- libnm-glib/nm-object.c | 8 +++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/libnm-glib/nm-object-private.h b/libnm-glib/nm-object-private.h index 03dd6db7f2..4410df22d6 100644 --- a/libnm-glib/nm-object-private.h +++ b/libnm-glib/nm-object-private.h @@ -37,9 +37,11 @@ typedef struct { } NMPropertiesChangedInfo; -void _nm_object_handle_properties_changed (NMObject *object, - DBusGProxy *proxy, - const NMPropertiesChangedInfo *info); +void _nm_object_handle_properties_changed (NMObject *object, + DBusGProxy *proxy, + const NMPropertiesChangedInfo *info); + +void _nm_object_process_properties_changed (NMObject *self, GHashTable *properties); gboolean _nm_object_demarshal_generic (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field); diff --git a/libnm-glib/nm-object.c b/libnm-glib/nm-object.c index 757dc6d2ed..8540ccca33 100644 --- a/libnm-glib/nm-object.c +++ b/libnm-glib/nm-object.c @@ -369,12 +369,18 @@ out: g_free (prop_name); } +void +_nm_object_process_properties_changed (NMObject *self, GHashTable *properties) +{ + g_hash_table_foreach (properties, handle_property_changed, self); +} + static void properties_changed_proxy (DBusGProxy *proxy, GHashTable *properties, gpointer user_data) { - g_hash_table_foreach (properties, handle_property_changed, user_data); + _nm_object_process_properties_changed (NM_OBJECT (user_data), properties); } void