[Bug 26205] High-level API for ContactLists

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jun 2 16:29:12 CEST 2011


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

--- Comment #9 from Xavier Claessens <xclaesse at gmail.com> 2011-06-02 07:29:11 PDT ---
(In reply to comment #7)
> 1) a feature on TpConnection telling to create TpContact for all known
> contacts, with a method to get them all, and a signal telling those
> added/removed.

This is now done, I've called this all_known_contacts which is the name used in
tpqt4. I'm open to better naming. I'm using GList as container, this is not
really consistent with other APIs, maybe I should have pairs of (guint
n_contacts, TpContact * const *contacts) ?

> 2) a way to define on TpConnection the features we want to be prepared on all
> known contacts before exposing them.

This is done, but I'm not really happy with my API for it. ATM, I have a setter
that must be called before preparing the ALL_KNOWN_CONTACTS feature:

void tp_connection_set_desired_contact_features (TpConnection *self,
    guint n_features, const TpContactFeature *features);

I'm thinking about replacing that, by a specialized version of
tp_proxy_prepare_async() just for connections:

tp_connection_prepare_async (TpConnection self,
    const GQuark *features,
    guint n_contact_features, const TpContactFeature *contact_features,
    GAsyncReadyCallback callback, gpointer user_data);

Calling that if ALL_KNOWN_CONTACTS is already prepared, would upgrade contacts.


Known issue: TpContact refs its connection, and
connection->priv->all_known_contacts refs the contacts => ref cycle and nothing
gets freed. I don't know how to fix this, suggestions?

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