Integrating TP-Logger with KDE

Mateu Batle mateu.batle at collabora.co.uk
Wed Mar 2 05:09:42 CET 2011


Hi all,

I'm very interested in the tp logger project. I need a qt binding for tp
logger for another project real soon,
so it would be great to reuse this stuff as starting point, and not
re-implement from scratch. I could provide patches

I've been reviewing code and checking the mailing list comments. I agree
with George Kiagiadakis comments.
I have some additional comments:

 * I think we could try to migrate to use QtGlib.

 * Current Query class needs some improvements:
    - destructor should be virtual
    - Error reporting should not be done through exceptions as George
already mentioned.
    - The reporting of query results could lead to some ambiguity if
query objects are reused in several queries. I would prefer to avoid
that by not making reusable (like a KJob / Tp::PendingOperation).
    - Maybe we should follow the HACKING guide from some project like
qt-tp4 regarding naming, privates classes, etc.

In summary, what we need is basically an async job class. So I would use
something similar to Tp::PendingOperation, or KJob. Although I don't
want to add KDE dependency, it might be fine for me to add tp-qt4
dependency (but not really mandatory). IMHO it is good to use same
conventions as tp-qt4, since clients using this logger API will probably
be using and familiar with tp-qt4 already.

  * Source files need to be move to a subdir preferably. And create
common project directory structure.

  * Naming of same classes, for example Correspondant, I would just keep
using the same name as the underlying library which is Entity. It makes
everything easier.

  * Use tp-qt4 debug

FYI, at the moment it is just binding the glib tp-logger API, but there
is also some additional functionality for clearing logs and managing
favorite contacts that is available just through DBUS API at the moment,
but glib bindings will be provided soon in tp-logger. I'm interested
specially in the clearing functionality.

Apart of these straightforward qt bindings, I also think it would be
interesting to implement some qt models around the searching and log
access data. The purpose of these would be to provide a standard Qt way
to access the information which is more high level and easier to use. I
am also interested in making them efficient, it could do on-demand
request of the model data. Qt models are very interesting, specially if
you want to do QML stuff.

As an example of the models, you can check ConversationModel in
tp-qt4-yell as example:

http://git.collabora.co.uk/?p=telepathy-qt4-yell.git;a=blob;f=TelepathyQt4Yell/Models/conversation-model.h;h=2a2e6e91b7c94fb331a7adbdd0f0f045810044d0;hb=HEAD

cheers
  Mat


More information about the KDE-Telepathy mailing list