[Bug 29090] Add support to filter accounts by RequestableChannelClasses

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Aug 7 17:18:44 CEST 2010


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

--- Comment #5 from Olli Salli <ollisal at gmail.com> 2010-08-07 08:18:44 PDT ---
Agreed with Andre on IRC that actually the best way might be to define a
AccountFilter interface, with subclasses AccountPropertyFilter and
AccountCapabilitiesFilter. This allows applications (and us in the future) to
implement arbitrary additional filters, and is architecturally cleaner. For
convenience, filterAccounts overloads taking property variant maps
(constructing the equivalent AccountPropertyFilter) and RCCLists (constructs
the CapsFilter) should be provided.

Thinking about it overnight, for future extensibility into filtering Contacts,
I think we should after all make it template class Filter<typename T>, with one
method virtual bool matches(SharedPtr<T>) (and obviously the virtual
destructor). Then, once we have propertified Contact and added
ConnectionCapabilities *Account::capabilities() const, which does the logic for
using the capabilities transparently from the connected connection or the
manager file, we can implement PropertyFilter<T> : public Filter<T>,
GenericCapabilityFilter<T> : public Filter<T>, AccountCapabilityFilter : public
GenericCapabilityFilter<Account> and ContactCapabilityFilter : public
GenericCapabilityFilter<Contact>. This would allow analogous filtering of
contacts by presence, supported channel types, etc quite neatly!

The KDE telepathy project would benefit from doing this contact filtering work
as well - they're implementing filtering contact models on their own already.

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