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

Christian Mollekopf mollekopf at kolabsys.com
Sat Jan 5 19:27:22 CET 2013


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
> > 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/20130105/b357fc73/attachment.sig>


More information about the devel mailing list