[Bug 27687] new GIO-style async methods for requesting TpContacts

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed May 2 06:33:32 CEST 2012


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

--- Comment #13 from Xavier Claessens <xclaesse at gmail.com> 2012-05-02 04:33:32 UTC ---
Note that lots of this bug changed since then:
 - We have TpSimpleClientFactory to define the features we want
 - We have immortal handles and spec gives handle+id pairs ~everywhere
 - high-level objects already gives prepared TpContact objects instead of
TpHandle.

Bug #49370 is a dup, but with a more modern description IMO:


Atm, to get a TpContact we have those functions:

tp_connection_get_contacts_by_handle():
 - I think CONTACT TpHandle must totally disappear from our API, and this
function should be killed. I think in general high-level APIs should expose
TpContact objects. At least spec should always give handle+id and so the
recommended way to get a TpContact is tp_client_factory_ensure_contact() +
eventually upgrade. Note that 'next' already make immortal handles mandatory.

tp_connection_get_contacts_by_id():
 - It should be proper _async().
 - Should use GetContactAttributesByID (bug #30874) for massive simplification
and single round-trip.

tp_connection_upgrade_contacts():
 - It should be proper _async().

tp_connection_dup_contact_if_possible():
 - Since we are making immortal handles mandatory, it is always possible to dup
a contact with handle+id. In that case just use
tp_client_factory_ensure_contact()
 - As said above, if you don't have id+handle, you should just never get a
TpContact.
 - IIRC there are legitimate uses internally, when the spec gives only an
handle but we are supposed to already have the TpContact (like removed members
in group). So I suggest keeping some form of this but internal only.

One thing I would like is to ensure that at any moment, even internally, a
TpContact has both id+handle. Making those 2 construct-only mandatory
properties.

-- 
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