diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-05-16 09:54:12 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-05-16 09:54:12 +0100 |
commit | e44f08c22e15bad0ec0448876582777cd1ae28b6 (patch) | |
tree | 32bf3ee7c79a30e79920211e304413f76718c997 | |
parent | 42360d0d279037ca3e3c1bc9f5c8692ff3252da9 (diff) | |
parent | 3a3ee21b251b121ce9e0c5159f27e13902cc3500 (diff) |
Merge remote-tracking branch 'upstream/telepathy-glib-0.14' into telepathy-glib-0.14
-rw-r--r-- | m4/tp-linker-flag.m4 | 2 | ||||
-rw-r--r-- | telepathy-glib/group-mixin.c | 42 | ||||
-rw-r--r-- | tests/dbus/group-mixin.c | 14 |
3 files changed, 29 insertions, 29 deletions
diff --git a/m4/tp-linker-flag.m4 b/m4/tp-linker-flag.m4 index 23eb41ad..8fd35068 100644 --- a/m4/tp-linker-flag.m4 +++ b/m4/tp-linker-flag.m4 @@ -22,7 +22,7 @@ AC_DEFUN([TP_LINKER_FLAG], save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $1" - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], []), [flag_ok=yes], [flag_ok=no]) + AC_COMPILE_IFELSE(AC_LANG_SOURCE([]), [flag_ok=yes], [flag_ok=no]) LDFLAGS="$save_LDFLAGS" diff --git a/telepathy-glib/group-mixin.c b/telepathy-glib/group-mixin.c index 8120b98b..e2123e75 100644 --- a/telepathy-glib/group-mixin.c +++ b/telepathy-glib/group-mixin.c @@ -1390,7 +1390,7 @@ local_pending_remove (TpGroupMixin *mixin, static void -add_members_in_array (GHashTable *member_ids, +add_members_in_array (GHashTable *contact_ids, TpHandleRepoIface *repo, const GArray *handles) { @@ -1401,61 +1401,61 @@ add_members_in_array (GHashTable *member_ids, TpHandle handle = g_array_index (handles, TpHandle, i); const gchar *id = tp_handle_inspect (repo, handle); - g_hash_table_insert (member_ids, GUINT_TO_POINTER (handle), (gchar *) id); + g_hash_table_insert (contact_ids, GUINT_TO_POINTER (handle), (gchar *) id); } } static gboolean -maybe_add_member_ids (TpGroupMixin *mixin, +maybe_add_contact_ids (TpGroupMixin *mixin, const GArray *add, const GArray *local_pending, const GArray *remote_pending, TpHandle actor, GHashTable *details) { - GHashTable *member_ids; + GHashTable *contact_ids; /* If the library user had its own ideas about which members' IDs to include * in the change details, we'll leave that intact. */ - if (tp_asv_lookup (details, "member-ids") != NULL) + if (tp_asv_lookup (details, "contact-ids") != NULL) return FALSE; /* The library user didn't include the new members' IDs in details; let's add * the IDs of the handles being added to the group (but not removed, as per * the spec) and of the actor. */ - member_ids = g_hash_table_new (NULL, NULL); + contact_ids = g_hash_table_new (NULL, NULL); - add_members_in_array (member_ids, mixin->handle_repo, add); - add_members_in_array (member_ids, mixin->handle_repo, local_pending); - add_members_in_array (member_ids, mixin->handle_repo, remote_pending); + add_members_in_array (contact_ids, mixin->handle_repo, add); + add_members_in_array (contact_ids, mixin->handle_repo, local_pending); + add_members_in_array (contact_ids, mixin->handle_repo, remote_pending); if (actor != 0) { const gchar *id = tp_handle_inspect (mixin->handle_repo, actor); - g_hash_table_insert (member_ids, GUINT_TO_POINTER (actor), (gchar *) id); + g_hash_table_insert (contact_ids, GUINT_TO_POINTER (actor), (gchar *) id); } - g_hash_table_insert (details, "member-ids", + g_hash_table_insert (details, "contact-ids", tp_g_value_slice_new_take_boxed (TP_HASH_TYPE_HANDLE_IDENTIFIER_MAP, - member_ids)); + contact_ids)); return TRUE; } static void -remove_member_ids (GHashTable *details) +remove_contact_ids (GHashTable *details) { - GValue *member_ids_v = g_hash_table_lookup (details, "member-ids"); + GValue *contact_ids_v = g_hash_table_lookup (details, "contact-ids"); - g_assert (member_ids_v != NULL); - g_hash_table_steal (details, "member-ids"); + g_assert (contact_ids_v != NULL); + g_hash_table_steal (details, "contact-ids"); - tp_g_value_slice_free (member_ids_v); + tp_g_value_slice_free (contact_ids_v); } @@ -1472,7 +1472,7 @@ emit_members_changed_signals (GObject *channel, { TpGroupMixin *mixin = TP_GROUP_MIXIN (channel); GHashTable *details_ = (GHashTable *) details; /* Cast the pain away! */ - gboolean added_member_ids; + gboolean added_contact_ids; if (DEBUGGING) { @@ -1502,7 +1502,7 @@ emit_members_changed_signals (GObject *channel, g_free (remote_str); } - added_member_ids = maybe_add_member_ids (mixin, add, local_pending, + added_contact_ids = maybe_add_contact_ids (mixin, add, local_pending, remote_pending, actor, details_); tp_svc_channel_interface_group_emit_members_changed (channel, message, @@ -1525,8 +1525,8 @@ emit_members_changed_signals (GObject *channel, } } - if (added_member_ids) - remove_member_ids (details_); + if (added_contact_ids) + remove_contact_ids (details_); } diff --git a/tests/dbus/group-mixin.c b/tests/dbus/group-mixin.c index 558be19f..51153be6 100644 --- a/tests/dbus/group-mixin.c +++ b/tests/dbus/group-mixin.c @@ -195,8 +195,7 @@ static void details_contains_ids_for (const GHashTable *details, TpHandle *hs) { - const GValue *member_ids_v; - GHashTable *member_ids; + GHashTable *contact_ids; const gchar *id; guint n = 0; TpHandle *h; @@ -204,19 +203,20 @@ details_contains_ids_for (const GHashTable *details, if (details == NULL) return; - member_ids_v = tp_asv_lookup (details, "member-ids"); - member_ids = g_value_get_boxed (member_ids_v); + contact_ids = tp_asv_get_boxed (details, "contact-ids", + TP_HASH_TYPE_HANDLE_IDENTIFIER_MAP); + g_assert (contact_ids != NULL); for (h = hs; *h != 0; h++) { n++; - id = g_hash_table_lookup (member_ids, GUINT_TO_POINTER (*h)); + id = g_hash_table_lookup (contact_ids, GUINT_TO_POINTER (*h)); MYASSERT (id != NULL, ": id for %u in map", *h); g_assert_cmpstr (id, ==, tp_handle_inspect (contact_repo, *h)); } - MYASSERT (g_hash_table_size (member_ids) == n, ": %u member IDs", n); + MYASSERT (g_hash_table_size (contact_ids) == n, ": %u contact IDs", n); } static void @@ -360,7 +360,7 @@ camel_removed (const GArray *added, TpHandle h; /* camel2 is the actor. camel shouldn't be in the ids, because they were * removed and the spec says that you can leave those out, and we want - * tp-glib's automatic construction of member-ids to work in the #ubuntu + * tp-glib's automatic construction of contact-ids to work in the #ubuntu * case. */ TpHandle hs[] = { camel2, 0 }; |