Ticket #1105 (closed enhancement: fixed)
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:
- commit() Commits changes with OpenSync native UID
- committed_all() Signals to Peer that all entries got sent
- 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
Note: See
TracTickets for help on using
tickets.

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