From 2486b417dbfb4daf0741f7b870e3d276fac87729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20Knau=C3=9F?= Date: Mon, 16 Jan 2017 17:36:47 +0100 Subject: make contacts suitable for applications like sinksh --- common/domain/applicationdomaintype.h | 4 ++-- common/domain/applicationdomaintype_p.h | 2 ++ common/domainadaptor.h | 1 + common/facade.cpp | 1 + common/queryrunner.cpp | 2 ++ common/synchronizer.cpp | 5 +++++ common/synchronizer.h | 1 + 7 files changed, 14 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index e4ed05b..8ebf6cb 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h @@ -330,10 +330,10 @@ struct SINK_EXPORT Entity : public ApplicationDomainType { struct SINK_EXPORT Contact : public Entity { SINK_ENTITY(Contact); - SINK_EXTRACTED_PROPERTY(QString, Uid, uid); + SINK_PROPERTY(QString, Uid, uid); SINK_PROPERTY(QString, Fn, fn); SINK_PROPERTY(QByteArrayList, Emails, emails); - SINK_BLOB_PROPERTY(Vcard, vcard); + SINK_PROPERTY(QByteArray, Vcard, vcard); }; struct SINK_EXPORT Event : public Entity { diff --git a/common/domain/applicationdomaintype_p.h b/common/domain/applicationdomaintype_p.h index aedf21f..4b06864 100644 --- a/common/domain/applicationdomaintype_p.h +++ b/common/domain/applicationdomaintype_p.h @@ -38,6 +38,8 @@ struct TypeHelper { return Func{}(std::forward(args...)); } else if (type == Sink::ApplicationDomain::getTypeName()) { return Func{}(std::forward(args...)); + } else if (type == Sink::ApplicationDomain::getTypeName()) { + return Func{}(std::forward(args...)); } else { Q_ASSERT(false); } diff --git a/common/domainadaptor.h b/common/domainadaptor.h index e7b8c1e..0377ef4 100644 --- a/common/domainadaptor.h +++ b/common/domainadaptor.h @@ -26,6 +26,7 @@ #include "domaintypeadaptorfactoryinterface.h" #include "domain/applicationdomaintype.h" +#include "domain/contact.h" #include "domain/event.h" #include "domain/mail.h" #include "domain/folder.h" diff --git a/common/facade.cpp b/common/facade.cpp index 7f2da56..56271e6 100644 --- a/common/facade.cpp +++ b/common/facade.cpp @@ -111,6 +111,7 @@ QPair, typename ResultEmitter::Ptr> } +template class Sink::GenericFacade; template class Sink::GenericFacade; template class Sink::GenericFacade; template class Sink::GenericFacade; diff --git a/common/queryrunner.cpp b/common/queryrunner.cpp index 0862378..a86d8a8 100644 --- a/common/queryrunner.cpp +++ b/common/queryrunner.cpp @@ -250,9 +250,11 @@ ReplayResult QueryWorker::executeInitialQuery( return {entityStore.maxRevision(), replayResult.replayedEntities, replayResult.replayedAll}; } +template class QueryRunner; template class QueryRunner; template class QueryRunner; template class QueryRunner; +template class QueryWorker; template class QueryWorker; template class QueryWorker; template class QueryWorker; diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index e19140c..a8af114 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp @@ -530,6 +530,11 @@ KAsync::Job Synchronizer::replay(const QByteArray &type, const QByteArray }); } +KAsync::Job Synchronizer::replay(const ApplicationDomain::Contact &, Sink::Operation, const QByteArray &, const QList &) +{ + return KAsync::null(); +} + KAsync::Job Synchronizer::replay(const ApplicationDomain::Mail &, Sink::Operation, const QByteArray &, const QList &) { return KAsync::null(); diff --git a/common/synchronizer.h b/common/synchronizer.h index 73c91a3..4240782 100644 --- a/common/synchronizer.h +++ b/common/synchronizer.h @@ -72,6 +72,7 @@ protected: protected: ///Implement to write back changes to the server + virtual KAsync::Job replay(const Sink::ApplicationDomain::Contact &, Sink::Operation, const QByteArray &oldRemoteId, const QList &); virtual KAsync::Job replay(const Sink::ApplicationDomain::Mail &, Sink::Operation, const QByteArray &oldRemoteId, const QList &); virtual KAsync::Job replay(const Sink::ApplicationDomain::Folder &, Sink::Operation, const QByteArray &oldRemoteId, const QList &); -- cgit v1.2.3