Ticket #1090 (closed task: fixed)

Opened 3 years ago

Last modified 3 years ago

[API] key=value interface for OSyncAnchor

Reported by: bellmich Owned by: dgollub
Priority: highest Milestone: OpenSync 0.39
Component: OpenSync: Plugin API Version: 0.38
Severity: critical Keywords:
Cc:

Description

Hi,

I need to manage in SyncML two synchronization anchors per data store. So I need an interface in OpenSync where I can store data on a key per value base. This interface can be attached to the plugin (aka main sink) or to the object type sink.

Best regards

Michael

Change History

comment:1 Changed 3 years ago by dgollub

  • Status changed from new to assigned
  • Summary changed from key=value interface for sinks to key=value interface for OSyncAnchor

After some discussion on IRC the ticket changed to "key=value inter for OSyncAnchor".

Definition:

OSyncAnchor can be used to store protocl "anchors" and further peer state information.
Note: that the OSyncAnchor can be flushed at any time by the Engine. Don't use it as persistent cache/store.

The generic database interface for dynamic configratuino gets addressed in #1050

comment:2 Changed 3 years ago by dgollub

  • Priority changed from normal to highest
  • Type changed from defect to task
  • Component changed from OpenSync to OpenSync: Plugin API
  • Severity changed from normal to critical
  • Summary changed from key=value interface for OSyncAnchor to [API] key=value interface for OSyncAnchor

comment:3 Changed 3 years ago by dgollub

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [5462]) Introduced OSyncAnchor key=value interface. This unfortuantely breaks the API and requires all plugins using the anchor to port.

Porting instruction:

char *anchor_value = plugin_specific_anchor();

-osync_anchor_compare(anchor, anchor_value, &anchormatch, &error); +osync_anchor_compare(anchor, "anchor_key"1, anchor_value, &anchormatch, &error);

-osync_anchor_update(anchor, anchor_value, &error); +osync_anchor_update(anchor, "anchor_key1", anchor_value, &error);

-osync_anchor_retrieve(anchor, &error); -osync_anchor_retrieve(anchor, "anchor_key1", &error);

This key=value pair is per ObjTypeSink?. This means you can reuse the key-name for each ObjTypeSink?.

Dropped old and unintended anchor.db file from test fixtures for filter_destobjtype_delete testcase

fixes #1090

comment:4 Changed 3 years ago by dgollub

(In [5463]) Ported file-sync to OSyncAnchor key=value API change. refs #1090

comment:5 Changed 3 years ago by dgollub

(In [5464]) Ported evolution2-sync to OSyncAnchor key=value API change. refs #1090

comment:6 Changed 3 years ago by dgollub

(In [5465]) Ported ldap-sync to OSyncAnchor key=value API change. refs #1090

comment:7 Changed 3 years ago by dgollub

(In [5466]) Ported tomboy-sync to OSyncAnchor key=value API change. refs #1090

Note: See TracTickets for help on using tickets.