[Bug 27511] Need API to represent capabilities
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Apr 13 17:10:13 CEST 2010
https://bugs.freedesktop.org/show_bug.cgi?id=27511
Simon McVittie <simon.mcvittie at collabora.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Status Whiteboard| |review-
Keywords|patch |
AssignedTo|telepathy-bugs at lists.freede |guillaume.desmottes at collabo
|sktop.org |ra.co.uk
--- Comment #4 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-04-13 08:10:13 PDT ---
Please assign things you're actively working on to yourself; telepathy-bugs is
now the QA contact for everything, so it'll remain in the loop.
Code
====
> +tp_capabilities_is_specific_to_contact
Perhaps this would be better as some concept of "source" with three values?
* from the connection
* for a contact, but guessed from the connection's caps
* for a contact, from ContactCapabilities
and in future (Bug #20774) also:
* for a Protocol
(In telepathy-qt4 the class hierarchy provides most of this.)
I'm not sure whether ...supports_text_chats() is the best name we can have for
a function about 1-1 chats, but I can't immediately think of anything better.
> +static gboolean
> +supports_text_channel (TpCapabilities *self,
> + TpHandleType exported_handle_type)
Do you mean "expected" rather than "exported"?
I think this helper function could usefully take the channel type as a
parameter too, and be called supports_simple_channel() or something.
> + fixed = g_value_get_boxed (g_value_array_get_nth (arr, 0));
[add blank line]
> + if (g_hash_table_size (fixed) != 2)
> + continue;
I'd prefer a blank line where indicated, and the same for if (!valid).
Tests
=====
> +++ b/tests/capabilities.c
I'd prefer new tests to use GTest (g_test_add() etc.), and use the g_assert_foo
family (particularly g_assert_cmpuint and friends) in preference to MYASSERT().
> + g_value_init (&class, TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS);
I'd prefer tp_value_array_build() rather than messing about with temporary
GValues.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list