Re: Kola 3 development with libkolabxml or libkolab

Christian Mollekopf <[email protected]>
Newsgroups gmane.comp.kde.devel.kolab
Organization Kolab Systems AG
Message-ID <1557778.TFIsHgVy56__8455.78341181881$1354713299$gmane$org@myhost2>
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:
libkolab/kolabformat/kolabobject.h

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());
event->setSummary("summary");
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 );
msg->parse();


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 =)

Cheers,
Christian

> kind regards,
> Alexander
> 
> _______________________________________________
> Kolab-devel mailing list
> [email protected]
> https://www.intevation.de/mailman/listinfo/kolab-devel

_______________________________________________
Kolab-devel mailing list
[email protected]
https://www.intevation.de/mailman/listinfo/kolab-devel
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEABECAAYFAlC/SLcACgkQF4TVOOpldACN7wCgz1Rk0izO/1myXVZl4VaedL4q
y6IAoJsf9bGPp5LFcRRCflegtIJMyAjI
=6xE4
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.