Patrick Ohly wrote:
  * renamed SessionReady to SessionCreated, because that's what it is.
    Moved session.Close() to server.CloseSession() so it can be called
    before the session is actually created.

I like the previous version better: a session will exist in the server
as as soon as StartSession returns. It just won't be ready to execute
any of its methods, except for Close(). I suggest we revert to the
"SessionReady" signal and Session.Close().

Ok, that's fine as well, my NOTEs were just not in line with what was being done...

  * progress signal reworked: signal "Status" is for sync and source
    status changes and "Progress" includes the whole known progress state
    for the sync. There are matching Get-functions for both.
  * config functions now have a BOOLEAN variable "template"
    for accessing templates. Note that the functions in the session
    interface refer to the server specified in StartSession, so creating
    a config from template looks like this:
       server.GetConfigs(true)
       // pick a template here ...
       config = Server.GetConfig("chosen_template", true)
       // modify configuration here ...
       session = server.StartSession ("my_config")
       // wait for SessionCreated here...
       session.SetConfig(false, config)
       session.Close()
    Sound sensible?

What's the purpose of the SetConfig() template parameter?

Wasn't there a way to create templates via the command line? If that wasn't possible, I'll just remove the parameter.

 One could also start the session earlier if that
    makes more sense in the client.

I think it makes more sense.

org.syncevolution.Session

   Sync
     STRING mode
     in ARRAY of STRUCT (STRING sources, STRING mode)

     [NOTE: valid values for mode are same as in syncevolution config.
      If array is non-empty, only the sources included will be synced.
      If mode is empty the value from configuration will be used]

Did you see Frederik's API proposal for this (using a dict and
additional rules)? I think that extra flexibility is useful.

Yes I did, I thought they were functionally the same but you are correct: it isn't. I liked the 'generic' mode variable more than a special value in the array/dict, so would this be ok:

   Sync
     in STRING mode
     in ARRAY of STRUCT (STRING sources, STRING mode)

      [NOTE: mode for specific source is selected in this order:
        * use mode in source array if given
        * use 'generic' mode if given
        * use mode in configuration ]

Examples:
 * sync all with mode from config
     Sync (NULL, ())
 * refresh all from server
     Sync ("refresh-from-server", ())
 * force slow sync for calendar, use mode from config for others
     Sync (NULL, (("calendar", "slow")))
 * sync only calendar and addressbook, with mode from config
     Sync ("none", (("calendar", NULL), ("addressbook", NULL)))


 - Jussi
_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to