Review Request: Add Telepathy capabilities to tp-contactlist, and enable removing/adding contacts from/to a group
George Goldberg
grundleborg at googlemail.com
Sun Mar 28 15:25:45 CEST 2010
> On 2010-03-28 13:04:33, George Goldberg wrote:
> > /trunk/playground/network/telepathy-contactlist/telepathy-handler.h, line 46
> > <http://reviewboard.kde.org/r/3415/diff/1/?file=21740#file21740line46>
> >
> > I'm assuming this, and the two methods below, are the basic public API that people would generally use out of TelepathyHandler and TelepathyAccountProxy classes.
> >
> > Why not have the method parameters be even simpler: we just need:
> >
> > removeContactFromGroup(const QString &group, const Nepomuk::PersonContact contact)
> >
> > An overload with QList<Nepomuk::PersonContact> might be nice too, as well as overloads for changing an entire meta-contact by doing Nepomuk::PimoPerson and QList<Nepomuk::PimoPerson>.
> >
> > What do you reckon?
>
> Dario Freddi wrote:
> You assumed correctly.
>
> Ok for passing a single contact and adding overloads, I fully agree.
>
> I am just a bit concerned about passing just a PersonContact or a PimoPerson - even if the idea is nice, is it possible to retrieve the source account resource (to be clear, what is in the current implementation accountURI) from a PersonContact? If this is possible, I definitely agree as well.
Yes, it is possible. In the case of the PersonContact, you would:
- Get a list of all it's child IM Accounts (The way the system currently works, it will only have one, but we should future proof it by doing the next steps for all it's IM Accounts).
* Look to see if they have an "isBuddyOf" property to another IMAccount.
* If they do, check if that IMAccount has a TelepathyIdentifier.
* If it does, then it is the source Telepathy account, and the TelepathyIdentifier can be used to construct the Tp::Account.
For a PIMO:Person, there is just one extra level. Before the steps above, you would need to get all the groundingOccurrences that are NCO:PersonContacts, and then perform the above steps on each of them.
- George
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3415/#review4712
-----------------------------------------------------------
On 2010-03-28 12:30:50, Dario Freddi wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3415/
> -----------------------------------------------------------
>
> (Updated 2010-03-28 12:30:50)
>
>
> Review request for telepathy and George Goldberg.
>
>
> Summary
> -------
>
> This patch adds two new classes (already ready to be librarized) for creating a Nepomuk->Telepathy bridge, making it very easy to retrieve Telepathy objects out of Nepomuk resources. Performance overhead looks trascurable.
>
> By using this new class, contactlist is now able to add/remove people from a group.
>
> Error handling is still missing, but I wanted an heads up before I go on and implement all the rest.
>
> Also, how are we going to handle metacontacts in this particular regard? My take is to move/remove all contacts to/out of a group, and eventually creating a group for those accounts who still don't have a group named as such in case of addition.
>
> Beware: until t-i-d will be able to catch these changes and update nepomuk accordingly, this is probably going to screw up your nepomuk DB when moving contacts around groups.
>
>
> Diffs
> -----
>
> /trunk/playground/network/telepathy-contactlist/CMakeLists.txt 1107773
> /trunk/playground/network/telepathy-contactlist/contact-item.h 1107996
> /trunk/playground/network/telepathy-contactlist/contact-item.cpp 1107996
> /trunk/playground/network/telepathy-contactlist/main-widget.h 1107996
> /trunk/playground/network/telepathy-contactlist/main-widget.cpp 1107996
> /trunk/playground/network/telepathy-contactlist/main-widget.ui 1107667
> /trunk/playground/network/telepathy-contactlist/telepathy-account-proxy.h PRE-CREATION
> /trunk/playground/network/telepathy-contactlist/telepathy-account-proxy.cpp PRE-CREATION
> /trunk/playground/network/telepathy-contactlist/telepathy-handler.h PRE-CREATION
> /trunk/playground/network/telepathy-contactlist/telepathy-handler.cpp PRE-CREATION
>
> Diff: http://reviewboard.kde.org/r/3415/diff
>
>
> Testing
> -------
>
> Works, empathy recognizes the changes correctly.
>
>
> Thanks,
>
> Dario
>
>
More information about the KDE-Telepathy
mailing list