static void notify (GObject *object, GParamSpec *pspec) { PropertiesChangedInfo *info; GValue *value; /* Ignore properties that shouldn't be exported */ if (pspec->flags & NM_PROPERTY_PARAM_NO_EXPORT) return; info = (PropertiesChangedInfo *) g_object_get_data (object, NM_DBUS_PROPERTY_CHANGED); if (!info) { info = properties_changed_info_new (); g_object_set_data_full (object, NM_DBUS_PROPERTY_CHANGED, info, properties_changed_info_destroy); info->signal_id = g_signal_lookup ("properties-changed", G_OBJECT_TYPE (object)); g_assert (info->signal_id); } value = g_slice_new0 (GValue); g_value_init (value, pspec->value_type); g_object_get_property (object, pspec->name, value); g_hash_table_insert (info->hash, uscore_to_wincaps (pspec->name), value); if (!info->idle_id) info->idle_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, properties_changed, object, idle_id_reset); }
static PropertiesChangedInfo * get_properties_changed_info (GObject *object) { PropertiesChangedInfo *info = NULL; info = (PropertiesChangedInfo *) g_object_get_data (object, MM_DBUS_PROPERTY_CHANGED); if (!info) { info = properties_changed_info_new (); g_object_set_data_full (object, MM_DBUS_PROPERTY_CHANGED, info, properties_changed_info_destroy); info->signal_id = g_signal_lookup (PC_SIGNAL_NAME, G_OBJECT_TYPE (object)); g_assert (info->signal_id); } g_assert (info); return info; }