Summary: | TpChannel: high level API to invite a contact | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Guillaume Desmottes <guillaume.desmottes> |
Component: | tp-glib | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED MOVED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | enhancement | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
URL: | http://cgit.collabora.com/git/user/xclaesse/telepathy-glib.git/log/?h=channel-invite | ||
Whiteboard: | EmpathyTpChat | ||
i915 platform: | i915 features: |
Description
Guillaume Desmottes
2011-05-19 04:50:05 UTC
Would be good to have an equivalent for RemoveMembers() as well. We could have _join_async() well adding ourself (to accept an invitation for example). Note that my contact-list branch adds _async() wrappers for Group iface methods: http://cgit.collabora.com/git/user/xclaesse/telepathy-glib.git/log/?h=contact-list Invite a contact just just a AddMembers, right? tp_channel(_group?)_invite_contact_async() would just be a 1 contact helper around tp_channel_group_add_members_async(), which could indeed be nice. tp_channel(_group?)_join_async() would be an even nicer helper around tp_channel_group_add_members_async() that adds the channel's self handle. (In reply to comment #2) > We could have _join_async() well adding ourself (to accept an invitation for > example). That part is already fixed with tp_channel_join_async() 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? For the record, here is a branch with _invite_contacts and _remove_contacts to wrap AddMembers and RemoveMembers. The patch appears to have vanished from cgit. Is this still wanted? -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-glib/issues/65. |
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.