static GValue * empathy_plist_parse_dict (xmlNode *a_node) { xmlNode *cur_node = a_node->children; GHashTable *dict; dict = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) tp_g_value_slice_free); while (cur_node) { if (xmlIsBlankNode (cur_node)) { cur_node = cur_node->next; } else { cur_node = empathy_plist_parse_one_dict_entry (cur_node, dict); } } return tp_g_value_slice_new_take_boxed (G_TYPE_HASH_TABLE, dict); }
static void conn_location_fill_contact_attributes (GObject *obj, const GArray *contacts, GHashTable *attributes_hash) { GabbleConnection *self = GABBLE_CONNECTION (obj); guint i; for (i = 0; i < contacts->len; i++) { TpHandle handle = g_array_index (contacts, TpHandle, i); GHashTable *location = get_cached_location (self, handle); if (location != NULL) { GValue *val = tp_g_value_slice_new_take_boxed ( TP_HASH_TYPE_STRING_VARIANT_MAP, location); tp_contacts_mixin_set_contact_attribute (attributes_hash, handle, TP_IFACE_CONNECTION_INTERFACE_LOCATION"/location", val); } } }