> > 3. error messages:
> >     "Server authorization failed", "No space left", ...
> >     Clients can get this information from synthesis signal, but it's not
> >     easy.
> 
> Error messages are difficult because we don't have a concept of
> localization in the D-Bus API.

Couldn’t the clients do the localisation stuff? If errors are presented
as raw enum values, with documentation somewhere about the meaning of
these values, clients could take care of the natural language version
and translations.

> >    Sync
> >      in ARRAY of STRING sources
> 
> Instead of selecting sources in the Sync method, should we introduce the
> concept of temporarily overriding sync properties? These changes can be
> attached to the Session object. That way the sync mode can be changed
> for just the next run without permanently changing the configs. Proposal
> below.

I’d like the Sync method to be as simple as possible. Maybe the CLI can
be of conceptual help: A plain call without further arguments syncs all
sources with the sync mode specified in the config (which might also be
"none"). A call with --sync <mode> syncs all sources with mode <mode>
(except for those with sync disabled in the config). The DBus API could
go one step further and allow to sync several sources with different
modes (which I think the CLI currently doesn’t support.

So I think of something along the lines of the current API:

Sync
  in DICT ( STRING source, INT mode )

but with the following rules:

      * If the dict is empty, the default modes are used as specified in
        the config. 
      * If the dict contains an empty string as key, this is used for
        all active sources, if not specified otherwise. So {'': 2} would
        force slow sync for all active sources. 
      * Explicitly specified sources override the defaults, so 
              * {'calendar': 2} would force slow sync for calendar, and
                sync all other sources as normal, while 
              * {'': 0, 'calendar': 1} would sync only calendar in
                two-way mode.

This would allow fine-grained control while making common tasks easy.

> >    GetConfig
> >      out DICT (STRING source, DICT (STRING key, STRING value))
> 
> How do we create a new config from a template? StartSession("foobar"),
> GetTemplate("scheduleworld"), copy+edit dicts, SetConfig()?
> 
> >    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]

What is the difference between the two? Are they both needed?

Cheers,
Frederik

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

Reply via email to