From 11e81350b50e4a1b77789870e6af90a8d3144322 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 14 Dec 2014 11:54:56 +0100 Subject: cleanup --- client/clientapi.h | 91 ------------------------------------------------------ 1 file changed, 91 deletions(-) diff --git a/client/clientapi.h b/client/clientapi.h index a0020af..fae0744 100644 --- a/client/clientapi.h +++ b/client/clientapi.h @@ -417,94 +417,3 @@ public: } -//Example implementations -/* - * Resource and domain object specific - * FIXME: should we hardcode the requirement that the domain adapter is a subclass for the domain object? - * * how do we allow copying of domain objects? - * ** dummy domain object that is a wrapper? - * ** domain adapter has an accessor for the domain object to hide subclassing - */ -class EventDomainAdapter : public Akonadi2::Domain::Event { - // virtual void setFoo(const QString &value) - // { - // mBuffer.setFoo(value); - // } - - // virtual QString foo() const - // { - // return mBuffer.foo(); - // } - - // MessageBuffer mBuffer; -}; - - -/** - * Actual implementation of the store facade that is provided by the resource plugin. - * - * It knows the buffer type used by the resource as well as the actual store used. - * - * A resource must provide this facade for each domain type it knows. - * => is reimplemented a lot - * => we should have a base implementation - * - * This interface should be executed in a thread so we can synchronously retrieve data from the store. - * - * TODO: perhaps we should also allow async access and leave the thread/non-thread decision up to the implementation? - */ -// template -// class StoreFacadeImpl : public Akonadi2::StoreFacade { -// }; -// -// template<> -// class StoreFacadeImpl : public Akonadi2::StoreFacade { -// public: -// StoreFacadeImpl():StoreFacade() {}; -// -// void create(const Akonadi2::Domain::Event &domainObject) { -// //FIXME here we would need to cast to DomainAdapter -// //Do actual work -// //transformFromDomainType(domainObject); -// //Ideally we have an adapter -// //getAdater(domainObject).buffer(); -// //domainObject.key(); => The domain object needs to provide the id -// //writeToDb(); -// } -// -// void modify(const Akonadi2::Domain::Event &domainObject) { -// //Do actual work -// } -// -// void remove(const Akonadi2::Domain::Event &domainObject) { -// //Do actual work -// } -// -// class EventBuffer { -// QString value; -// }; -// -// static Akonadi2::Domain::Event transformToDomainType(const EventBuffer &buffer) { -// //We may want to avoid copies here -// Akonadi2::Domain::Event event; -// // //Ideally we don't have to copy and can use an adaptor instead -// // return DomainAdaptor -// return event; -// }; -// -// void load(const Akonadi2::Query &query, const std::function &resultCallback) { -// //retrieve buffers from storage -// QList queryresult; -// for(const EventBuffer &buffer : queryresult) { -// resultCallback(transformToDomainType(buffer)); -// } -// } -// -// private: -// //Dummy implementation -// class ResourceImpl {}; -// ResourceImpl resource; -// class DatabaseImpl {}; -// DatabaseImpl mDb; -// }; - -- cgit v1.2.3