Integrating TP-Logger with KDE

Mateu Batle mateu.batle at collabora.co.uk
Thu Mar 3 08:03:57 CET 2011


Hi Stefano,

here are some things I have added to the TODO:

* Use base class QGlib::Object for glib wrapper objects (Entity, Event,
LogManager)
* Convert to telepathy logger 0.2.4 API (now it is based on 0.1)

* Create LogManager class instead of having all classes query classes
scattered
* Port to cmake (might be needed to do codegen for example)
* Use codegen from Qtgstreamer project to generate needed code for QGlib
* Port to Tp::PendingOperation subclasses or similar for async ops
* Use error reporting mechanism in Tp::PendingOperation
* Change guard headers to something like _QTpLogger_entity_h_HEADER_GUARD_
* Do not use tabs in source code
* In general rename tpl-name.h to name.h, although access point header
is provided through already created headers like Entity, Query, etc.
* Implement access to Clear log functionality, the gdbus bindings for
Clear log operations will be released soon on telepathy-logger

I was looking into the first item, but realized old telepathy-logger api
was being used (and there is API breakage), so checking that now.
It would be great to share the workload.

also some answers below:

On 03/02/2011 10:51 AM, Stefano Sanfilippo wrote:
> In data mercoledì 2 marzo 2011 05:09:42, Mateu Batle ha scritto:
>
> Hi Mateu, currently I'm working on that module.
>
>> 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
> Please report any suggestion or wish. Providing patches would be great.
>
>>  * I think we could try to migrate to use QtGlib.
> Fine :) Apart from QGError, what else could be migrated?
>  
Basically all glib types included in the binding should be done as C++
classes derived from QGlib::Object or subclasses,
and use the API in QGlib to make the binding easier.

>>  * Current Query class needs some improvements:
>>     - destructor should be virtual
> Done.
>
>>     - Error reporting should not be done through exceptions as George
>> already mentioned.
> The critical exeption throwing has been restricted to tpl-query-callback-
> template.h . I'm striving to find a decent c++ friendly error raising 
> mechanism. For now, I've commented out exceptions throwing.

The way to do it would be just use Tp::PendingOperation (or similar)
error reporting mechanism.
No exceptions are required.

>>     - 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).
>> In summary, what we need is basically an async job class. So I would use
>> something similar to Tp::PendingOperation, or KJob. 
> Working on it right now.
>
>>   * Source files need to be move to a subdir preferably. And create
>> common project directory structure.
> Done.
>
>>   * 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.
> Done. Although there are two issues: 
>    +  tpl_log_manager_get_filtered_messages_finish is documented as compiling  
> a GList of TpEntry, while a TpEntryText would be expected... typo, or 
> something I miss?
>    + the GList type compiled by tpl_log_manager_get_chats_finish is not 
> documented.
>  
>>   * Use tp-qt4 debug
> Great :) 
>  
>> 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.
> Just provide sketches and ideas, and I'll expand the API.
>  
> Cheers,
>
> --SKS (esseks)
> _______________________________________________
> KDE-Telepathy mailing list
> KDE-Telepathy at kde.org
> https://mail.kde.org/mailman/listinfo/kde-telepathy


-- 
Mateu Batle
Software Engineer / Team Leader
Collabora Ltd.



More information about the KDE-Telepathy mailing list