On Tue, 2009-09-01 at 15:37 +0100, Jussi Kukkonen wrote:
> Patrick Ohly wrote:
> >> * 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.
No, that's not possible. Let's remove the parameter.
> >> 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)))
NULL means empty string, right? Yes, that looks good.
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution