syncevolution/src/backends
Patrick Ohly 8ac69096e8 command line: revise usability checking of datastores
When configuring a new sync config, the command line checks whether a
datastore is usable before enabling it. If no datastores were listed
explicitly, only the usable ones get enabled. If unusable datastores
were explicitly listed, the entire configure operation fails.

This check was based on listing databases, which turned out to be too
unspecific for the WebDAV backend: when "database" was set to some URL
which is good enough to list databases, but not a database URL itself,
the sources where configured with that bad URL.

Now a new SyncSource::isUsable() operation is used, which by default
just falls back to calling the existing Operations::m_isEmpty. In
practice, all sources either check their config in open() or the
m_isEmpty operation, so the source is usable if no error is
enountered.

For WebDAV, the usability check is skipped because it would require
contacting a remote server, which is both confusing (why does a local
configure operation need the server?) and could fail even for valid
configs (server temporarily down). The check was incomplete anyway
because listing databases gave a fixed help text response when no
credentials were given. For usability checking that should have
resulted in "not usable" and didn't.

The output during the check was confusing: it always said "listing
databases" without giving a reason why that was done. The intention
was to give some feedback while a potentially expensive operation
ran. Now the isUsable() method itself prints "checking usability" if
(and only if!) such a check is really done.

Sometimes datastores were checked even when they were about to be
configure as "disabled" already. Now checking such datastores is
skipped.
2014-09-08 11:07:31 +02:00
..
activesync source -> datastore rename, improved terminology 2014-07-28 15:29:41 +02:00
akonadi source -> datastore rename, improved terminology 2014-07-28 15:29:41 +02:00
evolution EDS: memo syncing as iCalendar 2.0 (FDO #52714) 2014-09-08 11:07:31 +02:00
file code restructing: Exception, throwError() 2014-05-02 16:43:52 +02:00
gnome code restructing: Exception, throwError() 2014-05-02 16:43:52 +02:00
goa GOA: fix usage with libdbus 2013-12-04 13:53:08 +01:00
kcalextended code restructing: Exception, throwError() 2014-05-02 16:43:52 +02:00
kde code restructing: Exception, throwError() 2014-05-02 16:43:52 +02:00
maemo code restructing: Exception, throwError() 2014-05-02 16:43:52 +02:00
pbap PBAP: typo fix in README 2014-07-21 10:40:57 +02:00
qtcontacts code restructing: Exception, throwError() 2014-05-02 16:43:52 +02:00
signon signon: make Accounts optional 2014-05-22 17:05:08 +02:00
sqlite source -> datastore rename, improved terminology 2014-07-28 15:29:41 +02:00
webdav command line: revise usability checking of datastores 2014-09-08 11:07:31 +02:00
xmlrpc xmlrpc: fix compile problem 2014-05-22 17:05:15 +02:00