[Bug 26205] High-level API for ContactLists
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Feb 15 11:58:45 CET 2011
https://bugs.freedesktop.org/show_bug.cgi?id=26205
--- Comment #1 from Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> 2011-02-15 02:58:45 PST ---
So, I wrote a small Telepathy bot in Python this week-end and the lake of high
level API to access to the contact list made me cry.
We should have something like:
Feature
-------
TP_CONNECTION_FEATURE_CONTACT_LIST (which depends on
TP_CONNECTION_FEATURE_CONNECTED and TP_IFACE_CHANNEL_TYPE_CONTACT_LIST).
Methods
-------
void tp_connection_contact_list_get_contacts_async (TpConnection *self,
guint n_features,
const TpContactFeature *features,
GAsyncReadyCallback callback,
gpointer user_data);
Or should we use a GArray instead?
gboolean tp_connection_contact_list_get_contacts_finish (TpConnection *self,
GAsyncResult *result,
GList **contacts,
GError **error);
with @contacts containing TpContact objects having all the features prepared.
void tp_connection_contact_list_request_subscription_async (TpConnection *self,
guint n_ids,
const gchar * const *ids,
const gchar *message,
GAsyncReadyCallback callback,
gpointer user_data);
Do we want an handle variant ?
void tp_connection_contact_list_authorize_publication_async (TpConnection
*self,
GList *contacts,
GAsyncReadyCallback callback,
gpointer user_data);
With @contacts containing TpContact objects.
Same signature for _remove_contacts_async(), _unsubscribe_async() and
_unpublish_async().
I didn't mention the _finish() functions when they are trivial.
Signal
------
TpConnection::contact-list-changed (GList *added, GList *removed);
with both being list of TpContact. Or a GArray?
I'm wondering if we should just signals addition/removal of contacts and
ignore subscribe, publish and publish-request attributes changes are they are
already announced on TpContact.
Properties
----------
TpConnnection:contact-list-persists (gboolean)
TpConnnection:contact-list-can-be-changed (gboolean)
TpConnnection:contact-list-request-uses-message (gboolean)
+ the obvious _get_() accessors.
--
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