Ticket #1105 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

Add plugin sink function get_committed_uid() (for async working plugins)

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

Description

Add plugin sink function get_committed_uid() to allow async working plugins to report UID changes - after commit - to report.

Example SyncML:

  1. commit() Commits changes with OpenSync native UID
  2. committed_all() Signals to Peer that all entries got sent
  3. get_committed_uid() is waiting for SyncML <Map> which reports the UID changes

Draft Prototype:

void (get_committed_uid *)(OSyncContext *ctx, OSyncPluginInfo *info, const char *olduid, char **newuid)

This functions get called:

  • after committed_all sink function
  • before sync_done sink function

This function is optional.

Internal Implementation Notes:

  • This function should get called by osync_client_proxy_xxxx with a callback pointer - which has a OSyncMappingEntryEngine pointer of the OSyncChange in userdata.
  • All ChangeTypes? should get called - even the MODIFIED onces. Since some plugins/protocols can't perform a "clean" ADD. To be future safe even call this for DELETED entries.

Change History

comment:1 Changed 3 years ago by bricks

imho the function signature should be void (get_committed_uid *)(OSyncObjTypeSink *sink, OSyncContext *ctx, OSyncPluginInfo *info, const char *olduid, char newuid, void *data) because the plugin should be able to update the hashtable and to have access to the sink userdata

comment:2 Changed 2 years ago by dgollub

  • Status changed from new to assigned

comment:3 Changed 2 years ago by dgollub

Duplicate #1161 ?

comment:4 Changed 2 years ago by dgollub

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

I'm pretty sure that this we filed for this issue two tickets: #1161 and #1105 Since #1161 got fixed and we can now update Mapping in an aysnc fashion this issue should be fixed.

Michael, please correct me if i'm wrong here.

Note: See TracTickets for help on using tickets.