Hi Patrick,
On Sep 25, 2009, at 16:29 , Patrick Ohly wrote:
Ah, progress. In other words, more questions... ;-)
:-)
How do I tell the server which URL to use and how to append (or not
to
append) the ?sessionID=... suffix? The <serverurl> element is only
valid
for clients.
You don't need to. The client will send it in the Target LocURI of the
SyncHdr.
The engine takes it from there and adds the sessionID suffix (if
enabled) to create a RespURI.
If you don't need the respURI, disable it using the new config
directives (see commit message of
4b9c739d0a01f20ae85da983a8feb989b8230c51 for details).
You said that OpenSession() accepts a sessionID created by the app.
I
could use that when I want to create my own ID. If I don't do that,
can
I query which session ID was generated by the engine?
Yes, you can query the session key for "localSessionID" to get it.
Profiles are gone in the server. How do I control the sync modes
used by
the server for specific datastores? I'm using
<plugin_module>[SDK_textdb]</plugin_module>
<plugin_sessionauth>yes</plugin_sessionauth>
<plugin_deviceadmin>yes</plugin_deviceadmin>
for the server and my own plugin for each datastore.
The client controls the sync modes. The server just executes what the
client wants.
There are options to declare a datastore or a session read-only, which
then prevents writing to the DB (see <readonly> and SETREADONLY() in
the config reference).
A related question: I was using the "dbname" in a target to
find the
datastore name related to a progress event. The code looked like this
(with wrapper classes around the underlying handles):
SharedKey targets = m_engine.OpenKeyByPath(profile, "targets");
SharedKey target;
target = m_engine.OpenSubkey(targets, progressInfo.targetID);
std::string name = m_engine.GetStrValue(target, "dbname");
Is there a better way that works in both client and server?
Note that the server does not have progress events at this time at
all. Could be added, but requires some work, and would require to re-
architect the progress events to some degree as these are all global
(engine level) now, and would need to be made separate per session.
At the moment I can start a sync session, but SessionStep() returns
an
error at some point. Need to look more closely into that before I can
say more...
Just let me know...
Lukas Zeller (luz(a)synthesis.ch)
-
Synthesis AG, SyncML Solutions & Sustainable Software Concepts
info(a)synthesis.ch,
http://www.synthesis.ch