On Fri, 2013-02-01 at 11:46 +0000, Graham Cobb wrote:
> On Friday 01 February 2013 10:24:15 Patrick Ohly wrote:
> > On Thu, 2013-01-31 at 23:32 +0000, Graham Cobb wrote:
> > > The effect of this is that using just "syncevolution --print-databases"
> > > doesn't show anything, even if you do have an account configured.  In
> > > fact, you have to name a "target-config" configuration, and exactly one
> > > source, to get the listing.  You can't even set up any configuration of
> > > the default context which will allow "syncevolution --print-databases"
> > > to work.
> > > 
> > > Is this expected and desired behaviour?
> > 
> > No, desired is to list databases without any configuration if enough
> > information was provided.
> 
> I am still confused about configuration -- I still don't really have a good 
> model in my head of the way configs work.  But help me understand how this 
> particular case should be working.
> 
> Assume that activesyncd gconf is set up correctly (that is a different 
> problem!).

Right. Partly that's why SyncEvolution is not as complete for ActiveSync
as it is for other backends - the expectation was that some other
entity, like an account setup GUI, will configure activesyncd and then
activate SyncEvolution.

>   In that case, all the AcriveSync backend needs to be told is the 
> account name.  It expects to get it from the username parameter in the source 
> config.

This part is a bit messy. The "target-config" sync config (see README
for the terminology) was introduced to share several properties between
many different sources (= databases) inside the same peer:
- username/password = for credentials
- WebDAV: syncURL = base URL for accessing the server and locating
  individual databases

Later I realized that for the "WebDAV <-> SyncML" sync, there is only
one sync config, and username/password/syncURL are already used for the
SyncML peer.

So I made it possible to user the source database, databaseUsername,
databasePassword properties *in addition* inside the WebDAV backend.
It'll fall back to the corresponding sync properties if the per-source
properties are not set. This is also useful for picking the right
database inside a WebDAV server: if database is empty, it'll do a scan
once to find the default database, then use that.

Sharing credentials by defining them only once as separate entities and
then referencing them elsewhere would be a cleaner solution for parts of
this problem, but hasn't been implemented. It would also be needed for
proper integration into GNOME Online Accounts or Ubuntu's SSO.

> For sync, it gets that from the target-config.  And my getDatabases code 
> works 
> if I specify the target config in the --print-databases command, for example:
> 
> syncevolution --print-databases target-config@Work calendar
> 
> But it would be nice if "syncevolution --print-databases" would work.  I 
> tried 
> to configure a username on the @default config:
> 
> syncevolution --configure [email protected] @default
> 
> But that isn't allowed: "per-peer (unshared) properties not allowed".

That's because --configure is meant for writing the sync (aka per-peer)
property into some config, and @default doesn't tell SyncEvolution were
to put that.

"syncevolution --print-databases [email protected]
backend=eas-contacts" should work. It does because the property is kept
in memory and thus available when the backend asks for it. See
FilterConfigNode and how it gets populated from command line parameters
if you care for the details - one can think of this as a temporary
overlay over the otherwise empty or non-existent config on dist.

> Does CalDAV have the same problem or does it have a way to get the required 
> information without explicitly specifying the configured target-config?

See above.

-- 
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

Reply via email to