Hi Patrick,
just my comment:
Usually the engine knows
about the number of elements in the sync set,
therefore no additional information is needed to
get this count.
In case of a refresh-from-server I assume the
sync set will not be read, but the plugin could
return 20030 if no ReadNextItem sequence has been
done before. So the engine will remove element by
element then and get the number of elements this
way.
I'm not sure I follow here. Suppose a database plugin implements the
current DeleteSyncSet(). How does the engine know how many items were
deleted? Is it possible without causing overhead (the main reason for
the existance of DeleteSyncSync(), I suppose)?
Efficiency is one reason, yes. The main reason however was the need
for wiping metadata not directly visible in the sync when the entire
sync set is being refreshed, vs. a incremental update. In particular,
groups in the iPhone address book are added when first used, but are
not refcounted (not deleted when empty). But when I do a reload
device, I don't want such metadata to persist.
As a plugin writer you can decide not to implement DeleteSyncSet(),
and then the engine will read the sync set (IDs, modified status) as
for any normal sync, and then issue DeleteItem() in a loop. You still
can make use of the call to DeleteSyncSet() as an indicator the entire
sync set will be deleted and wipe metadata - if you return
LOCERR_NOTIMP the engine will still do a one-by-one delete loop.
Best Regards,
Lukas Zeller ([email protected])
-
Synthesis AG, SyncML Solutions & Sustainable Software Concepts
[email protected], http://www.synthesis.ch
_______________________________________________
os-libsynthesis mailing list
[email protected]
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis