« Return to Thread: [trunk] [API] dropped osync_plugin_info_get_configdir (#1083)

Re: [trunk] [API] dropped osync_plugin_info_get_configdir (#1083)

by Daniel Gollub-2 :: Rate this Message:

Reply to Author | View in Thread

On Wednesday 01 April 2009 01:52:16 am Chris Frey wrote:

> On Sat, Mar 28, 2009 at 04:10:50PM +0100, Daniel Gollub wrote:
> > JFYI, if your plugin needs to store/cache specific data  (e.g. device
> > information which get reused on every sync, ...) we plan to provide a new
> > OSyncDatabase [2] interface which allows to store key=value. (Not planned
> > for 0.39 nor 0.40 - since this implementation wouldn't break any API and
> > can be added later. If you rely on this interface - please give us
> > feedback!)
>
> The Barry plugin relies on this function to store its cache and ID map.
> These are just simple text files at the moment:  the cache is a list of
> known record ID's in the Blackberry, and the idmap is a map of Blackberry
> record ID's to opensync ID's (key/value).

Whats the purpose of those IDs?
By record you mean the entry/change IDs? Why not use the native Mapping Table
and just use the OSyncChange UID? Is it due to the problem that if you commit
new entries to the BB, the BB creates it's own ID and not using the original
UID reported by OpenSync? If so - there is a way to "workaround" this -
without the need to have your own mapping table. Commit your change - retrieve
the assigned new ID from the BB, and update the OSyncChange with BB's mapping
ID. (But yeah - wild guess - i should check your code ;))

We have this OSyncStateDB (format OSyncAnchor) which is since yesterday also a
key=value interface. In case those are independent of changes/entries.

>
> Your above paragraph makes it sound like there is no key/value API
> currently existing.  What is the best way to handle this?

Yes - this interface still needs to be written. To not break the API the (old)
OSyncDB got remove from the public API. The idea is to reintroduce [2] this
and add such interfaces. Since we add interface and not change or delete we
can do this after 0.39.


[2] http://opensync.org/ticket/1050

Best Regards,
Daniel

------------------------------------------------------------------------------
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

 « Return to Thread: [trunk] [API] dropped osync_plugin_info_get_configdir (#1083)