[sync] Deleting attributes on the client

Jan Schneider jan at horde.org
Thu Apr 3 10:15:37 UTC 2008


Zitat von Gunnar Wrobel <p at rdus.de>:

> Hi!
>
> I'm currently testing SyncML support with Horde CVS HEAD based on a
> Kolab backend (IMAP based data storage). The SyncML part is based on
> SQL though. Clients are a Blackberry and a Nokia 6120c.
>
> In general both work fine wich is nice :) But I'm unable to delete
> attributes on either of the clients (e.g. removing an e-mail address
> or a phone number in an already synchronized addressbook entry on the
> client). The data remains present on the server after removing the
> attribute and synchronizing.
>
> This seems to come down to a problem with data exchange via
> vCard/iCalendar. I'm not certain how things are supposed to work.
>
> Both clients will send vCard/iCalendar data wich contains only
> attributes that actually have a value on the client. So if I delete an
> attribute in a vCard it won't be mentioned in the update message from
> the client.
>
> As te vCard has been exchanged between client and server before Turba
> will fetch the old entry and overwrite any attributes provided by the
> client on this addressbook entry.
>
> As I deleted the attribute the change will be missed by the server.
>
> Turba will delete an attribute if the attribute is provided with an
> empty string as value. Is this the intended behaviour? Meaning that
> the client update must indicate removal of an attribute by sending the
> attribute with an empty value?
>
> As the clients don't do that I would need to use a client specific
> converter but that would be fine. I'm just wondering whether that is
> the intended mode of action. In fact using vCards/iCalendars as method
> of data exchange seems somewhat limited in that context. But that
> would be a SyncML limitation then.

This is a very special problem limited to Turba. The problem is, that  
both could happen: we have attributes in Turba that are not supported  
by vCard or the sync client, or we have vCard attributes that are not  
supported by Turba.

If we simply overwrite the contacts in Turba with the updated contact  
from the client, all special attributes from the Turba contact would  
disappear. This is obviously not what we want.

I'm not sure how to deal with that. Maybe we could try to determine  
the vCard attributes that would have been supported by Turba and  
overwrite those unconditionally. But this seems fragile, since it  
would still delete attributes from Turba that are supported by vCard,  
but not by the client.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the sync mailing list