Re: Kola 3 development with libkolabxml or libkolab

Christian Mollekopf <[email protected]>
Newsgroups gmane.comp.kde.devel.kolab
Organization Kolab Systems AG
Message-ID <2337614.4qWkegPYzc__5829.41747638888$1357410474$gmane$org@myhost2>
Hey,

The Kolab::MimeObject interface in current master of libkolab provides 
read/write support of Kolab-Object MIME messages through the Kolab Containers.
Bindings are currently available for PHP only, but Python will follow soon.

I'd suggest using this interface over handling the MIME message yourself or 
using KolabObject with the KDE containers (unless that is what you finally 
need).

Cheers,
Christian

On Wednesday 05 December 2012 14.14:31 Christian Mollekopf wrote:
> 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)

iEYEABECAAYFAlDocIoACgkQF4TVOOpldAAqqQCfXE+8zOrY3alyzLVIfuqVp2Ig
HMcAoLOMyx5PhRVwy3XrQSaeMX+x7Bh5
=EQGz
-----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.