[Bug 35341] Use Connection.Interface.ContactBlocking in Tp::ContactManager

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Apr 19 16:54:46 CEST 2011


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

--- Comment #10 from George Kiagiadakis <kiagiadakis.george at gmail.com> 2011-04-19 07:54:45 PDT ---
I have updated again my branch to address Olli's comments.

Notes:

1) The test now depends on Will's telepathy-glib branch here:
http://git.collabora.co.uk/gitweb/?p=user/wjt/telepathy-glib.git;a=shortlog;h=refs/heads/blocking

I will update the tp-glib version requirement as soon as a new tp-glib version
with this branch included has been released.

2) I have also tested the code path used with the old deny lists by locally
reverting commit f736a0398a826afef0442c597681de4bfb194c0f (contactlist2 cm:
Implement the ContactBlocking interface) and it works the same as the new code
path (the test passes). Unfortunately I don't know of any better way to test
the old code path (except from building the CM and the test twice, with some
preprocessor directive to control if ContactBlocking will be enabled... should
I do that?)

3) I am not so sure about the allKnownContacts() changes. To me, the method
name implies that it contains *every* contact ever known to tp-qt4. Anyway,
leaving that aside, I added some code that makes sure blocked contacts never
appear in allKnownContacts(), however, I am not sure if re-adding unblocked
contacts to allKnownContacts is the right thing to do. For example, in the
test, blocktest1 at example.com and blocktest2 at example.com, which are both *not*
in the contact list are blocked and no changes happen to allKnownContacts();
but if I unblock them, they will be added to allKnownContacts() and that
doesn't feel right.

4) I am wondering whether we should fake the signature of
ContactManager::blockContacts() and Contact::block() in the documentation to
make it less confusing for the users. i.e. let doxygen believe that we have:

TELEPATHY_QT4_DEPRECATED PendingOperation *blockContacts(
    const QList<ContactPtr> &contacts, bool value);
PendingOperation *blockContacts(
    const QList<ContactPtr> &contacts);

instead of:

PendingOperation *blockContacts(
    const QList<ContactPtr> &contacts, bool value = true);

what do you think?

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