[Kolab-devel] Kola 3 development with libkolabxml or libkolab

Christian Mollekopf mollekopf at kolabsys.com
Wed Dec 5 14:14:31 CET 2012

On Monday 03 December 2012 09.21:15 Alexander Haensch wrote:
> At the moment we are interested to readout some contacts, but writing
> them is also interesting.
> I think that should be easy to do, isn't it?
> Maybe someone can provide some simple example howto extract contacts
> with libkolabxml?

Hey Alexander,

Assuming that you have full mime-messages which you need to parse and not only 
the xml object, the only interface you can use right now is the one in:

This one uses the KDE containers, which might or might not be what you want.
Especially if you plan to use language-bindings we'd need an interface using 
the kolab containers, which hasn't been written yet, but wouldn't be a large 
amount of work.

The interface in kolabobject.h is used like this:

KCalCore::Event::Ptr event(new KCalCore::Event());
KMime::Message::Ptr msg = Kolab::KolabObjectWriter::writeEvent(event);
KCalCore::Event::Ptr readEvent = Kolab::KolabObjectReader(msg).getEvent();

and to create a KMime::Message from some raw data:

const QByteArray data = "a MIME message";
KMime::Message::Ptr msg = KMime::Message::Ptr(new KMime::Message);
msg->setContent( data );

I have to see if I can get to writing a proper interface using the Kolab 
containers soon. Patches are of course also always welcome =)


> kind regards,
> Alexander
> _______________________________________________
> Kolab-devel mailing list
> Kolab-devel at kolab.org
> https://www.intevation.de/mailman/listinfo/kolab-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.kolab.org/pipermail/devel/attachments/20121205/cbac981e/attachment.sig>

More information about the devel mailing list