[Bug 37359] TpChannel: high level API to invite a contact

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jul 13 16:16:57 CEST 2011


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

--- Comment #5 from Xavier Claessens <xclaesse at gmail.com> 2011-07-13 07:16:57 PDT ---
EmpathyTpChat has an interesting API to call AddMembers in the case the channel
has GROUP iface, and fallback to request a new channel with conference
interface to upgrade the channel.

I'm suggesting this API:

void tp_channel_invite_contacts_async (TpChannel *self,
    guint n_contacts,
    TpContact * const *contacts,
    const gchar *message,
    gboolean handle_channel,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean tp_channel_invite_contacts_finish (TpChannel *self,
    GAsyncResult *result,
    TpChannel **new_channel,
    GError **error);

In the case self has GROUP iface, it will just do a AddMembers. handle_channel
boolean is ignored and new_channel out arg is set to NULL (or set to self?)

In the case self does not have GROUP iface, it will do
tp_account_channel_request_create_and_observe/handle_channel_async (depending
on the handle_channel flag) and the new_channel out arg will be set to the new
TpChannel that has conference with contacts invited.


I think this API would be convenient, but does not look so nice because we have
2 asymetric cases. Also TpChannel does not know its TpAccount to create its
TpAccountChannelRequest...

Opinions, ideas?

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