* @statematchtype: An #AtspiCollectionMatchType specifying how to interpret
* @states.
* @attributes: (element-type gchar* gchar*): A #GHashTable specifying
- * attributes to match.
+ * attributes to match. To specify multiple attribute values,
+ * separate each value with a :: If an attribute value contains a :,
+ * then it can be escaped by preceding it with a \. A backslash can
+ * likewise be escaped by inserting a double backslash.
* @attributematchtype: An #AtspiCollectionMatchType specifying how to
* interpret @attributes.
* @interfaces: (element-type gchar*): An array of interfaces to match, or
AtspiMatchRule *rule = g_object_new (ATSPI_TYPE_MATCH_RULE, NULL);
int i;
- if (!rule)
- return NULL;
-
if (states)
rule->states = g_object_ref (states);
rule->statematchtype = statematchtype;
if (!dbus_message_iter_open_container (&iter_struct, DBUS_TYPE_ARRAY, "{ss}",
&iter_dict))
return FALSE;
- g_hash_table_foreach (rule->attributes, append_entry, &iter_dict);
+ if (rule->attributes)
+ g_hash_table_foreach (rule->attributes, append_entry, &iter_dict);
dbus_message_iter_close_container (&iter_struct, &iter_dict);
dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_INT32, &d_attributematchtype);