[Bug 30874] GetContactAttributesByID: GetContactAttributes but from identifiers instead of handles
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue May 8 19:24:29 CEST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=30874
--- Comment #7 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2012-05-08 10:24:29 PDT ---
+ * @id: A strings representing the desired contact by its
+ * identifier in the IM protocol (XMPP JIDs, SIP URIs, MSN Passports,
+ * AOL screen-names etc.)
Grammar: A string representing ... (an XMPP JID, SIP URI, MSN Passport, AOL
screen-name etc.)
+ * Create a #TpContact object and make asynchronous method call to
"any asynchronous method calls necessary to" or something
+TpContact *
+tp_connection_get_contact_by_id_finish (TpConnection *self,
+ GAsyncResult *result,
+ GError **error)
I wonder whether this should be _dup_ not _get_, since it returns a ref...
Since you've only added GetContactByID just now, I'd like a fallback path via
RequestHandles and GetContactAttributes if it raises NotImplemented (or
anything other than InvalidHandle, really), so that it can be guaranteed to
work on any Contacts CM[1].
+ ContactFeatureFlags minimal_feature_flags = 0xFFFFFFFF;
Should be (ContactFeatureFlags) 0xFFFFFFFFU, really. Or just make it a guint
and G_MAXUINT.
+ * @contacts: (element-type TelepathyGLib.Contact) (transfer container) (out)
(allow-none):
+ * a location to set a #GPtrArray of upgraded #TpContact, or %NULL.
I'd prefer it if this returned the GPtrArray in the usual way, rather than
outputting it through an out parameter.
+contacts_ready_cb (GObject *object,
In the example, I think this deserves a more appropriate (i.e. singular) name.
+ die_if (error, "tp_connection_get_contact_by_id_async()");
This leaks... I think the solution is to not use die_if there.
> _by_id_async() needs REQUEST iface on the connection, so the unit test
CONTACTS, surely?
+ * CMs. by_id and by_handle and used only be TpTextChannel and are needed for
Do you mean "are used only by"? If not, then I don't know what this means.
+_TP_DEPRECATED_IN_UNRELEASED
void tp_connection_get_contacts_by_handle (TpConnection *self,
I'm not sure that deprecating this immediately necessarily makes sense. If a
client has obtained a handle from an extended (domain-specific) interface
(perhaps a rubbish one, like Renaming), what's it meant to do with it? The
answer in this branch seems to be "do GetContactAttributes yourself", and I
don't think that's the answer we want.
[1] No, implementing it in the contacts mixin isn't sufficient to guarantee
this, even if we assume that every CM uses tp-glib; consider a situation where
you upgraded telepathy-glib and re-ran Empathy, but Gabble is still running
with the old telepathy-glib.
--
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