[Bug 49370] New: [next] rethink TpContact creation
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed May 2 11:52:11 CEST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=49370
Bug #: 49370
Summary: [next] rethink TpContact creation
Classification: Unclassified
Product: Telepathy
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: tp-glib
AssignedTo: telepathy-bugs at lists.freedesktop.org
ReportedBy: xclaesse at gmail.com
QAContact: telepathy-bugs at lists.freedesktop.org
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