Hello Patrick,
On Sep 23, 2009, at 11:31 , Patrick Ohly wrote:
In the SyncEvolution GUI we wanted to implement an indicator whether a
certain datastore is done already while the sync itself continues.
This
would be useful as feedback to the user when he has to decide
whether he
can abort.
"done" in the SyncML context would be "all data exchanged, mapping
sent,
client and server agree that anchors for the datastore can be
updated".
I'm no longer sure whether the protocol actually allows the last step
unless also the whole session completes.
No, IMHO the anchors may only be saved if the session completes (which
does not mean that all datastore syncs must complete *sucessfully*,
but all the SyncML protocol phases must complete correctly. Our
current implementation, both client and server side are doing it this
way, i.e. detecting that the session now has ended and then calling
engFinishDataStoreSync() for all datastores.
If it doesn't, then we have to drop the concept of an datastore
which is
completed early [...]
I would not drop it - because this is a protocol detail that even
might change with future SyncML versions (who knows..).
Especially because the current progress event mechanism already has
what you are asking: PEV_SYNCEND is what you are looking for - this is
a per-datastore event signalling that the sync with this datastore has
ended. It now is issued at the same time (plus per-datastore
termination overhead) for each datastore, but conceptually is an
independent signal for that datastore, even if the session and other
datastores could or maybe will proceed in the future. The signal for
overall session end is PEV_SESSIONEND.
[...] except for one special case: if a datastore isn't part
of the sync session at all, then it would be nice to tell the GUI
that.
We can do that in SyncEvolution without Synthesis extensions, but it
would be more consistent if we had a PEV_DSDONE and/or PEV_DSDISABLED.
Technically, a datastore that is not used in a sync does not even
exist in the engine (no TSyncDatastore object instantiated), so from
an engine perspective it's not entirely consistent to implement
something saying "hey, I'm telling you that I don't even exist...".
Still, a PEV_DSDISABLED could be done, by issuing it in SelectProfile
() which is the place where the configured target settings are
iterated and for those which have the enabled flag set, a datastore
object is instantiated and added to the session. It would be
relatively simple to issue a PEV_DSDISABLED for those datastores which
are NOT instantiated.
I only wonder if it makes sense, as this PEV_DSDISABLED would be
essentially a *non*-progress event, so unlike all other events which
indicate that something has happened, it would indicate that something
did not happen. I guess there would be a lot of other things that the
engine could alert as not having happened, like world peace or hell
freezing over :-)
Ok, ok, it could be justified as signalling a decision happened not to
include a datastore into sync...
If you need it, just add it (SelectProfile() in binfileimplclient.cpp
and syncclient.cpp, the latter is a generic fallback of the former
used in our command line (demo) clients).
If you don't like these defines in engine_defs.h, can we add at
least a
PEV_CUSTOM_START = 128, PEV_CUSTOM_END = 255 range in it that is
declared for use outside of the core engine?
I think that's a good idea anyway, please add it!
Best Regards,
Lukas Zeller (l...@synthesis.ch)
-
Synthesis AG, SyncML Solutions & Sustainable Software Concepts
i...@synthesis.ch, http://www.synthesis.ch
_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@synthesis.ch
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis