[Kde-pim] How can I access to the Kadressbook, kCal and Kontact database

Kevin Krammer krammer at kde.org
Sat Oct 20 13:00:56 BST 2012


Hi again :)

On Friday, 2012-10-19, Michaƫl Parchet wrote:
> Hello,
> 
> I would like to access and custumize the kCal, Kadressbook katabase. to use
> this with my proprietary program. Have I the right to do this ?

Yes, all KDE platform libraries, including he ones for PIM related things, are 
licence under the terms of the LGPL, which allows the usage in proprietary 
applications.

Modifications to the libraries themselves, however, need to be licenced in a 
compatible way. But it is unlikely that such modifications will be needed at 
all.

> I thought understand that the database Is a mysql database. How can I
> access and customize this ?

Data access is handled through a PIM data service called Akonadi.
The client library for that is part of the KDE platform's PIM libraries.
http://api.kde.org/4.x-api/kdepimlibs-apidocs/akonadi/html/index.html

There are basically two approaches for an application:
- low level job based API, e.g. using Akonadi::CollectionFetchJob[1] for 
listing contact/calendar/email folders

- high level model/view based API, e.g. Akonadi::EntityTreeModel for 
presenting folders and data items (contacts, events, emails) in the form of a 
QAbstractItemModel for use in Qt item views.

> I need the events and the contact adressbook but to use correctly this
> database. I must to add somme custom tables and property.

Can you give an example of such a customization?

> Can I do this or should I make my oven database for my program ?

That will likely depend on your actual needs.

> I this last case, how can use both database in parallel ?

You would access your database throught the QSql API. Assuming a MySQL backed 
Akonadi setup I am quite certain that mysqld would be able to handle that 
additional connection.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20121020/f733c413/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list