[Kde-pim] Header for calendar items in Akonadi

Ingo Klöcker kloecker at kde.org
Sun Mar 2 21:10:43 GMT 2008


On Sunday 02 March 2008, Kevin Krammer wrote:
> On Sunday 02 March 2008, Kevin Krammer wrote:
> > On Sunday 02 March 2008, Volker Krause wrote:
> > > Hi,
> > >
> > > On Sunday 02 March 2008 16:49:56 Kevin Krammer wrote:
> > > > I think it makes sense to have an Akonadi::Item part for
> > > > calendar items which indicates the type of the incidence, e.g.
> > > > Journal, so an application which is only interested in one kind
> > > > of incidence can first just fetch the headers and only fetchs
> > > > the body for journals.
> > >
> > > I agree, an alternative solution I could think of would be using
> > > different mimetypes for the different types of incidences. This
> > > would also help with groupware servers that only allow one of
> > > these types per folder without needing any extra code.
> >
> > Interesting idea.
> > If I understand RFC 2445 [1] correctly, the MIME type can contains
> > a parameter called "component" which does exactly this,
> > e.g. "text/calendar;component=VJOURNAL"
>
> Attached is a potential patch set

> +      int indexOfSemicolon = mimetype.indexOf( QLatin1Char( ',' ) );

This does not look like a semicolon to me.

> +    int indexOfSemicolon = type.indexOf( QLatin1Char( ',' ) );

Neither does this.

> +    int indexOfSemicolon = mimetype.indexOf( QLatin1Char( ';' ) );

Here you got it right. Weird. One would think you had used 
copy&paste. ;-)


> +      i.setMimeType( QLatin1String( "text/calendar; component=" ) + 
componentName );

I don't really have anything to say when it comes to Akonadi, but IMHO 
this is plain evil. If we really want to go this way, then we should 
rename setMimeType to setContentType (because that's what it's called 
in RFC 2045) and use libkmime for creating and parsing those 
content-type strings. But, frankly, I don't think this is a good idea. 
Anyway, I'll leave it to Volker, Till, etc.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080302/b1c54d1b/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