Ok. I've added signatures. I'm using "DICT" to mean "a D-Bus array that
contains DICT_ENTRY", in other words a C++ map or GLib Hashtable. Other
capitalized terms are D-Bus datatypes.
Other changes since last version:
* Used Patricks suggestion of naming: There's now Server and Session
interfaces
* Session object is now tied to a single server, specified in
StartSession
* Because of the above GetConfigs is now only available in the Server
interface. GetReports and GetConfig are still duplicated (now with
slightly different signatures, because "server" is no longer needed in
Session interface)
* Session has SyncEnd signal with a "status" variable. This can be
something separate or just SyncClient.sync() return value.
I've been trying to figure out the progress handling logic, but without
much success. The idea was to move some of it into the server to make
sure different clients would provide consistent info, but it's not so
easy. Any comments on these?
1. progress as percentage:
This will always be a wild guess, because we can't know what the
server will give us, but making just one wild guess is probably
better than many?
2. progress messages:
"Receiving %s", "Sync finished", ...
Clients can get this information from the synthesis signal fairly
easily.
3. error messages:
"Server authorization failed", "No space left", ...
Clients can get this information from synthesis signal, but it's not
easy.
The latter two seem like something the clients can deduce from the
synthesis signal (with proper documentation they could even do it
consistently). I think they should be only implemented if we really aim
to remove the synthesis signal at some point.
The first one seems somewhat useful. Should I just add
that as a variable to ProgressSignal?
- Jussi
---
org.syncevolution.Server
GetConfigs
out ARRAY of STRING server
GetConfig
in STRING server
out DICT (STRING source, DICT (STRING key, STRING value))
[NOTE: outer dictionary contains a dictionary for every source and
one dictionary for server config]
GetReports
in STRING server
in UINT32 start
in UINT32 count
out ARRAY of DICT (STRING key, STRING value)
[NOTE: returns a maximum of 'count' reports (dictionaries),
starting from index 'start' (going from latest to oldest)]
StartSession
in STRING server
out OBJECT_PATH session
GetSessions
out ARRAY of STRUCT (OBJECT_PATH path, BOOLEAN ready)
signal SessionReady
out OBJECT_PATH path
signal SessionEnd
out OBJECT_PATH path
[NOTE: StartSession returns immediately, but the session object only
exists when SessionReady is signalled.]
org.syncevolution.Session
Close
Sync
in ARRAY of STRING sources
Abort
Suspend
signal SyncEnd
out UINT32 reason
signal Progress
out STRING source
out INT32 type
out INT32 extra1
out INT32 extra2
out INT32 extra3
GetConfig
out DICT (STRING source, DICT (STRING key, STRING value))
SetConfig
in DICT (STRING source, DICT (STRING key, STRING value))
UpdateConfig
in DICT (STRING source, DICT (STRING key, STRING value))
[NOTE: outer dictionary contains a dictionary for every source and
one dictionary for server config]
GetReports
in UINT32 start
in UINT32 count
out ARRAY of DICT (STRING key, STRING value)
[NOTE: returns a maximum of 'count' reports (dictionaries),
starting from index 'start' (going from latest to oldest)]
_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution