[Kde-pim] How to update the akonadi storage format of KABC::ContactGroup?

Volker Krause vkrause at kde.org
Sat May 18 10:00:37 BST 2013


On Friday 17 May 2013 16:51:23 Christian Mollekopf wrote:
> The only solution I could find is making a ContactGroup2, which should
> replace ContactGroup for KDE5, maps onto vcard, uses uid's only for
> references and is supported by the vcard serializer.
> 
> I'll then port the kolabproxy to ContactGroup2 as well as all relevant
> applications in kdepim (kaddressbook, addresseeautocompletion, ...), so
> they'll support both ContactGroup and ContactGroup2.

You might want to check how the migration from KCal to KCalCore was done. They 
have the same serialization format, so not sure this is fully applicable, but 
we added payload conversion support for this back then (ie. you can ask for 
both an KCal and KCalCore payload, and it translates via the corresponding 
serializers if necessary).

regards,
Volker

> On Thursday 16 May 2013 23.17:49 Christian Mollekopf wrote:
> > Hey,
> > 
> > I want to replace the serialization format of KABC::ContactGroups, which
> > is
> > currently a custom xml format, with vcard, as it is also used for
> > contacts.
> > 
> > The primary reason as mentioned in the other thread is that I want to
> > switch contact references from akonadi item id's to UID's.
> > 
> > As it seems to be difficult to do that with the current format, it's
> > probably going to be cleaner if all contacts are migrated to the new
> > format, and in the process it's easy to resolve all akonadi item id's to
> > UIDs.
> > 
> > What I don't understand though is how such a migration would look like.
> > 
> > I can extend KABC::ContactGroup with the necessary methods while
> > maintaining binary compatibility, and I can extend the vcard serializer
> > to support KABC::ContactGroups. But how would I migrate i.e. a Kolab
> > Resource to the new format, and can I somehow drop support for the old
> > format before KDE5? Because otherwise it's going to be a bit of a mess
> > anyways as we have to support links by akonadi item id and by UID...
> > 
> > If we can migrate all uses of KABC::ContactGroup, we can assume afterwards
> > that all serialized groups contain UID's as references instead of akonadi
> > item id's resulting in clean code.
> > 
> > Cheers,
> > Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20130518/9db5a29b/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