[Kde-pim] Header for calendar items in Akonadi
Volker Krause
vkrause at kde.org
Fri Mar 7 20:24:24 GMT 2008
On Sunday 02 March 2008 22:25:36 Kevin Krammer wrote:
> On Sunday 02 March 2008, Ingo Klöcker wrote:
> > On Sunday 02 March 2008, Kevin Krammer wrote:
> > > 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.
>
> Oh, boy!
>
> > > + int indexOfSemicolon = mimetype.indexOf( QLatin1Char( ';' ) );
> >
> > Here you got it right. Weird. One would think you had used
> > copy&paste. ;-)
>
> In which case it would be wrong here as well :)
>
> At least the very descriptive variable name made it easy to spot ;)
>
> > > + 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.
>
> Right. I sounded like a good idea but the consequences are not quite pretty
> or at least if implemented this way.
>
> Anyway, I am not committing any of this, it is meant to show how different
> approaches would look like so we get a better base for discussions.
Sorry for the delay. As just discussed on IRC with Kevin, I agree with Ingo
and don't really like this approach. It only has minimal advantages over the
item part approach and makes the mime type handling much more complex since
it's now incompatible with KDE/Qt.
The IMHO cleanest approach would be using separate mimetypes for all subtypes
(ie. text/event, text/task, text/journal, etc. (or whatever they may look
like with correct namespacing)). This would mean everything we have now that
requires a specific type would just work without any changes. However, I'm
not sure what compatibility issues that would cause with text/calendar using
applications.
Btw. IIRC knotes uses currently journal entries, giving text/calendar yet
another possible content.
regards
Volker
-------------- 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/20080307/a84fc289/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