ActiveSync: avoid "[ERROR] calendar: no database to synchronize"

The command line checks that a source has databases available.
That means that ActiveSyncSource::getDatabases() must at least
return one entry for the default database.

activesyncd commit ID:
6a95a911f2660fab7bea916e3607fa616b4e8b1e
This commit is contained in:
Patrick Ohly 2011-07-07 15:05:07 +02:00
parent a8f9440837
commit 81d73aa203
2 changed files with 10 additions and 1 deletions

View File

@ -45,6 +45,15 @@ bool ActiveSyncSource::serverModeEnabled() const
return m_operations.m_loadAdminData;
}
ActiveSyncSource::Databases ActiveSyncSource::getDatabases()
{
Databases result;
// empty string always selects the default database
result.push_back(Database("", "", true));
return result;
}
void ActiveSyncSource::open()
{
// extract account ID and throw error if missing

View File

@ -120,7 +120,7 @@ class ActiveSyncSource :
/* partial implementation of SyncSource */
virtual void enableServerMode();
virtual bool serverModeEnabled() const;
virtual Databases getDatabases() { return Databases(); } // not supported
virtual Databases getDatabases();
virtual void open();
virtual void close();
virtual std::string getPeerMimeType() const { return getMimeType(); }