[Bug 31997] New: let contact list channels' AddMembers/RemoveMembers methods fail
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Nov 30 14:17:15 CET 2010
https://bugs.freedesktop.org/show_bug.cgi?id=31997
Summary: let contact list channels' AddMembers/RemoveMembers
methods fail
Product: Telepathy
Version: 0.11
Platform: Other
URL: http://git.collabora.co.uk/?p=user/smcv/telepathy-glib
-smcv.git;a=shortlog;h=refs/heads/async-contact-list
OS/Version: All
Status: ASSIGNED
Severity: normal
Priority: medium
Component: tp-glib
AssignedTo: simon.mcvittie at collabora.co.uk
ReportedBy: simon.mcvittie at collabora.co.uk
QAContact: telepathy-bugs at lists.freedesktop.org
Blocks: 19902
In the ContactList channels implemented by TpBaseContactList, any asynchronous
errors reported by the concrete subclass are silently ignored (the
Conn.I.ContactList/Conn.I.ContactGroups methods would report them, though).
This is a side-effect of using TpGroupMixin, which can't report success/errors
asynchronously, combined with having purely asynchronous virtual methods for
the concrete subclasses to implement.
To port Haze to TpBaseContactList, RemoveMembers on a Group needs to be able to
fail, to prevent removing a contact from the fallback group (_("Buddies")) if
it's their only group. In my current work-in-progress branch, tests fail,
because removing the contact is silently prevented, but RemoveMembers()
"succeeds".
There are two ways we could fix this:
* Override AddMembers, RemoveMembers and RemoveMembersWithReason in the
internal ContactList channels; make them succeed/fail asynchronously. This
breaks the Gabble tests, which expect these methods to succeed immediately
unless there's an obvious problem like a bad handle.
* Add a synchronous "check addition"/"check removal" virtual method which can
raise an error synchronously, and call that before calling the async one. This
would mean that implementations can fail, but only synchronously.
I think I prefer the first of these approaches, even though it changes
observable behaviour in Gabble and requires tests to be relaxed a bit. If any
other CMs already use TpBaseContactList, they'll probably need to make similar
changes.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the telepathy-bugs
mailing list