Bug 29527

Summary: TpContact: being able to ask for extra TpConnection features
Product: Telepathy Reporter: Guillaume Desmottes <guillaume.desmottes>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED INVALID QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Guillaume Desmottes 2010-08-12 03:46:07 UTC
The TpConnection returned by tp_contact_get_connection() doesn't have any feature guaranteed to be prepared. I'd like to have API when requesting TpContacts saying "please prepare these features on the TpConnection". So the rest of Empathy wouldn't have to care doing extra async calls later, then can just use the objects when it's needed. (For example they could use the TpCapabilities object of the connection to check RCC).

Once TpContact (and/or TpConnection) will have gained an account property (bug #29417) it could be useful to have the same kind of things for the TpAccount features.

Maybe that's something we should keep in mind if when redesigning the contact request API to make it more binding friendly (bug #27687).
Comment 1 Simon McVittie 2010-08-12 06:31:02 UTC
(In reply to comment #0)
> The TpConnection returned by tp_contact_get_connection() doesn't have any
> feature guaranteed to be prepared.

This seems backwards: you obtained the contact from a connection in the first place. I don't think it makes sense to have TpContact directly manipulating TpConnection features.

Having a TpConnection method to make TpContact objects, add TpConnection features, and not return until both have happened might make more sense, although I expect this to be made somewhat unnecessary by TP_CONNECTION_FEATURE_CONTACT_LIST (which will imply making at least basic TpContact objects for everyone on the contact list - Bug #26205).
Comment 2 Guillaume Desmottes 2010-08-12 06:51:27 UTC
Yeah you're right, that's a crap idea.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.