+insert_property_checked (GDBusProxy *proxy,
+ gchar *property_name,
+ GVariant *value)
+{
+ if (proxy->priv->expected_interface != NULL)
+ {
+ const GDBusPropertyInfo *info;
+
+ info = g_dbus_interface_info_lookup_property (proxy->priv->expected_interface, property_name);
+ /* Ignore unknown properties */
+ if (info == NULL)
+ goto invalid;
+
+ /* Ignore properties with the wrong type */
+ if (g_strcmp0 (info->signature, g_variant_get_type_string (value)) != 0)
+ goto invalid;
+ }
+
+ g_hash_table_insert (proxy->priv->properties,
+ property_name, /* adopts string */
+ value); /* adopts value */
+
+ return;
+
+ invalid:
+ g_variant_unref (value);
+ g_free (property_name);
+}
+
+static void