On Tue, 2009-11-03 at 16:15 +0000, Ralf Ratering wrote:
It seems there are implementations missing for two functions in class
SQLiteContactSource:
- void enableServerMode();
- bool serverModeEnabled() const;
Is that correct?
Yes. They were introduced recently and only added to the
TrackingSyncSource, but not the SQLite backend. Any backend not deriving
from TrackingSyncSource must implement them.
There's an utility class for these calls, so the following changes will
implement them:
diff --git a/src/backends/sqlite/SQLiteContactSource.cpp
b/src/backends/sqlite/SQLiteContactSource.cpp
index 5dddf23..023e66a 100644
--- a/src/backends/sqlite/SQLiteContactSource.cpp
+++ b/src/backends/sqlite/SQLiteContactSource.cpp
@@ -349,6 +349,17 @@ void SQLiteContactSource::deleteItem(const string& uid)
deleteRevision(*m_trackingNode, uid);
}
+void SQLiteContactSource::enableServerMode()
+{
+ SyncSourceAdmin::init(m_operations,
+ getSyncSourceNodes());
+}
+
+bool SQLiteContactSource::serverModeEnabled() const
+{
+ return m_operations.m_loadAdminData;
+}
+
void SQLiteContactSource::beginSync(const std::string &lastToken, const std::string
&resumeToken)
{
diff --git a/src/backends/sqlite/SQLiteContactSource.h
b/src/backends/sqlite/SQLiteContactSource.h
index 91f7802..f11965c 100644
--- a/src/backends/sqlite/SQLiteContactSource.h
+++ b/src/backends/sqlite/SQLiteContactSource.h
@@ -53,6 +53,7 @@ SE_BEGIN_CXX
*/
class SQLiteContactSource : public SyncSource,
virtual public SyncSourceSession,
+ virtual public SyncSourceAdmin,
virtual public SyncSourceRevisions,
virtual public SyncSourceDelete,
virtual public SyncSourceLogging,
@@ -82,6 +83,8 @@ class SQLiteContactSource : public SyncSource,
virtual Databases getDatabases();
virtual const char *getMimeType() const { return "text/x-vcard"; }
virtual const char *getMimeVersion() const { return "2.1"; }
+ virtual void enableServerMode();
+ virtual bool serverModeEnabled() const;
/* Methods in SyncSource */
virtual void getSynthesisInfo (SynthesisInfo &info, XMLConfigFragments
&fragment);
I've added that to the SQLite backend and also enable its compilation in
the nightly regression testing. That way we'll catch such regressions
faster the next time...
--
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.