[Kde-pim] [PATCH] Support for RemoteRevision property

Thomas McGuire mcguire at kde.org
Fri Feb 19 12:58:55 GMT 2010


Hi,

On Wednesday 17 February 2010 16:06:17 Tobias Koenig wrote:
> during the implementation of the Open-Xchange and DAV resources
> we came across the problem, that each Item and Collection needs
> some property where the resource can store additional revision information.
> 
> The first idea was to use the remoteId property for this purpose, however
> a changing remoteId property will confuse the collectionsync algorithm
> and causes unnecessary remove/add actions on modification.
> 
> The second idea was to use a custom attribute, however custom attributes
> are not delivered as payload for the parameter of
> ResourceBase::itemRemoved(), so if your resource needs the revision to
> delete the item in the backend, you are lost.
> 
> Therefor we came up with the idea of an additional property (named
> remoteRevision) that is part of every item/collection related
> communication with the server, like 'id', 'remoteId' and 'rev' are.
> 
> Attached are the two patches for the server and libakonadi that implements
> handling of this property. I checked the functionality by adapting the DAV
> resource to make use of the new property and let the resource work in a
> patched environment, worked without problems so far. Unfortunately I
> couldn't check whether some tests broke, because the tests refuse to run
> here at all (independent of my patch ;)).
> 
> Can I commit to trunk?

Ok from my side, but of course Volker has the last word.
I can misuse this to implement "delete on server when deleting locally" for 
POP3 :)

Some API comments:
- instead of remoteRevision, can we use something more generic? like 
"theAttributeThatIsAlsoSentForItemRemovedNotifications()"?
- change QString to QByteArray, as not all resources want a plain text string 
for this
- @since 4.5 :)

It is a bad hack though, as the comments also indicate.
In the long term, I'd like to see the notification system be rewritten so that 
is uses the local socket session, which would solve this problem and also bug 
203287.

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