libnm-glib: allow manual processing of properties changed events

Mostly for handling the GetAll response.
This commit is contained in:
Dan Williams 2011-02-16 11:09:30 -06:00
parent ccfc034a0d
commit c17721b360
2 changed files with 12 additions and 4 deletions

View file

@ -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);

View file

@ -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