Am Dienstag, den 01.09.2009, 17:37 +0300 schrieb Jussi Kukkonen:
> >> 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)))

Like that! Simple but powerful.

Cheers,
Frederik


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

Reply via email to