[Bug 71508] [1.0] simplify TpPresenceMixin

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 28 08:45:12 PDT 2014


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

--- Comment #8 from Xavier Claessens <xclaesse at gmail.com> ---
I think we can get one step further and remove
tp_presence_status_spec_get_id(). That whole index stuff has always been weird
for me. I don't think it is required any more now that TpPresenceStatus refs
its TpPresenceStatusSpec.

I don't know how other CMs implement that, but looking at our fake
contacts-conn.c, it has 2 hashtables:


presence_statuses: TpHandle -> index of a TpPresenceStatusSpec
presence_messages: TpHandle -> message string

Merging those is exactly what TpPresenceStatus is made for. It would only have
one table TpHandle->TpPresenceStatus.

Similarly tp_tests_contacts_connection_change_presences() takes an index and a
message which is exactly the same as taking a single TpPresenceStatus.

I think CMs can keep a index->spec mapping to make it easier, but that's an
internal implementation detail that should not leak into telepathy-glib API,
IMHO.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the telepathy-bugs mailing list