+++ This bug was initially created as a clone of Bug #27670 +++ Summary says it all. I'm not sure what API you'd want for it...
Bug #27676 is the GLib equivalent.
16:47 < wjt> andrunko: hey, i just spoke to barisione irl 16:47 < wjt> andrunko: he thinks what he'd like is: 16:48 < wjt> • a feature which calls GetContactInfo (or uses the corresponding contact attribute, if one is added), and listens for change notification 16:48 < wjt> • a method to explicitly request the latest info 16:49 < wjt> the point being that then the application can safely turn on the ContactInfo feature and get vCards opportunistically on XMPP, without risking causing lots of network traffic 16:49 < wjt> and then once every few months, they can refresh ... 16:50 < smcv> for the method to explicitly request the latest info, presumably we want both PendingContactInfo *Tp::Contact::requestContactInfo(), and void Tp::Connection::refreshContactInfo(SET<Tp::Contact>) for some suitable type SET?
Description of changes: - Added FeatureInfo to Tp::Contact that will use the contact-attribute ContactInfo/info to retrieve the cached info and connect to ContactInfoChanged. - Added Tp::Contact::refreshInfo to force information refresh (depends on FeatureInfo to be enabled cause the update is signalled using ContactInfoChanged which is only handled when FeatureInfo is enabled). - Added Tp::Contact::requestInfo to request a info without using FeatureInfo. There is no change notification if FeatureInfo is not enabled) - Patched contacts-conn example cm to support the ContactInfo iface (will file a bug against tp-glib to merge it once this is approved) - Used the modified version of contacts-conn to write the tests Note that I used info to represent ContactInfo as it's already inside Contact, so Contact::contactInfo is redundant. The same is used for ContactCapabilities where we just use capabilities for the names. Info is too generic, maybe we want to change it to VCard or something like this.
Reviewed, looks good.
Merged upstream. It will be in next relase (0.3.3)
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.