[Bug 24107] support Statuses on TpConnection

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jun 22 12:24:39 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=24107

--- Comment #18 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-06-22 03:24:38 PDT ---
Review of attachment 36094:
 --> (https://bugs.freedesktop.org/review?bug=24107&attachment=36094)

::: docs/reference/telepathy-glib-sections.txt
@@ +2871,3 @@
+TP_TYPE_STATUS_SPEC
+TpStatusSpec
+tp_status_spec_new

You deleted tp_status_spec_new from the public header, so it shouldn't be
documented.

::: telepathy-glib/connection.c
@@ +504,3 @@
+
+  value = g_hash_table_lookup (properties, "Statuses");
+  statuses = g_value_get_boxed (value);

If either value or statuses is NULL, this will critical. We shouldn't critical
on malformed D-Bus messages, so there should be a check and a "goto finally".

In fact, this should be a single call to tp_asv_get_boxed (properties,
THE_TYPE_OF_STATUSES); if the result is NULL, goto finally.

@@ +1385,3 @@
+   *
+   * Type: GLib.HashTable<utf8,StatusSpec>
+   * Transfer: container

Will this fail to build with g-i 0.6.14, or just not work? If it'll just not
work, we can merge this branch without bumping the dependency, IMO.

Do you mean TelepathyGLib.StatusSpec, or will this "just work" as-is?

::: tests/dbus/self-presence.c
@@ +31,3 @@
+  tp_connection_set_self_presence_finish (client_conn, result, &error);
+
+  MYASSERT_SAME_STRING (g_quark_to_string (error->domain),

g_assert_cmpstr (., ==, .) in new tests, please.

This should really be g_assert_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE)
or whatever it is.

@@ +130,3 @@
+
+  status_spec = g_hash_table_lookup (statuses, "available");
+  MYASSERT (status_spec != NULL, "");

Please use g_assert, g_assert_cmpuint, g_assert_cmpstr in new code. I haven't
systematically replaced MYASSERT with g_assert yet, but only because some of
the tests rely on MYASSERT always evaluating its argument.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list