From bdb01c2c068df326f5a8328ed1492ab1bea388c5 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 20 Jan 2016 19:07:07 +0100 Subject: Renamed Akonadi2 to Sink (except for documentation). --- common/domainadaptor.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'common/domainadaptor.h') diff --git a/common/domainadaptor.h b/common/domainadaptor.h index 39bd3b8..d43fad7 100644 --- a/common/domainadaptor.h +++ b/common/domainadaptor.h @@ -39,7 +39,7 @@ * Create a buffer from a domain object using the provided mappings */ template -flatbuffers::Offset createBufferPart(const Akonadi2::ApplicationDomain::ApplicationDomainType &domainObject, flatbuffers::FlatBufferBuilder &fbb, const WritePropertyMapper &mapper) +flatbuffers::Offset createBufferPart(const Sink::ApplicationDomain::ApplicationDomainType &domainObject, flatbuffers::FlatBufferBuilder &fbb, const WritePropertyMapper &mapper) { //First create a primitives such as strings using the mappings QList > propertiesToAddToResource; @@ -67,11 +67,11 @@ flatbuffers::Offset createBufferPart(const Akonadi2::ApplicationDomain:: * After this the buffer can be extracted from the FlatBufferBuilder object. */ template -static void createBufferPartBuffer(const Akonadi2::ApplicationDomain::ApplicationDomainType &domainObject, flatbuffers::FlatBufferBuilder &fbb, WritePropertyMapper &mapper) +static void createBufferPartBuffer(const Sink::ApplicationDomain::ApplicationDomainType &domainObject, flatbuffers::FlatBufferBuilder &fbb, WritePropertyMapper &mapper) { auto pos = createBufferPart(domainObject, fbb, mapper); // Because we cannot template the following call - // Akonadi2::ApplicationDomain::Buffer::FinishEventBuffer(fbb, pos); + // Sink::ApplicationDomain::Buffer::FinishEventBuffer(fbb, pos); // FIXME: This means all buffers in here must have the AKFB identifier fbb.Finish(pos, "AKFB"); flatbuffers::Verifier verifier(fbb.GetBufferPointer(), fbb.GetSize()); @@ -84,7 +84,7 @@ static void createBufferPartBuffer(const Akonadi2::ApplicationDomain::Applicatio * A generic adaptor implementation that uses a property mapper to read/write values. */ template -class GenericBufferAdaptor : public Akonadi2::ApplicationDomain::BufferAdaptor +class GenericBufferAdaptor : public Sink::ApplicationDomain::BufferAdaptor { public: GenericBufferAdaptor() @@ -123,13 +123,13 @@ public: template class DomainTypeAdaptorFactory : public DomainTypeAdaptorFactoryInterface { - typedef typename Akonadi2::ApplicationDomain::TypeImplementation::Buffer LocalBuffer; - typedef typename Akonadi2::ApplicationDomain::TypeImplementation::BufferBuilder LocalBuilder; + typedef typename Sink::ApplicationDomain::TypeImplementation::Buffer LocalBuffer; + typedef typename Sink::ApplicationDomain::TypeImplementation::BufferBuilder LocalBuilder; public: DomainTypeAdaptorFactory() : - mLocalMapper(Akonadi2::ApplicationDomain::TypeImplementation::initializeReadPropertyMapper()), + mLocalMapper(Sink::ApplicationDomain::TypeImplementation::initializeReadPropertyMapper()), mResourceMapper(QSharedPointer >::create()), - mLocalWriteMapper(Akonadi2::ApplicationDomain::TypeImplementation::initializeWritePropertyMapper()), + mLocalWriteMapper(Sink::ApplicationDomain::TypeImplementation::initializeWritePropertyMapper()), mResourceWriteMapper(QSharedPointer >::create()) {}; virtual ~DomainTypeAdaptorFactory() {}; @@ -139,11 +139,11 @@ public: * * This returns by default a GenericBufferAdaptor initialized with the corresponding property mappers. */ - virtual QSharedPointer createAdaptor(const Akonadi2::Entity &entity) Q_DECL_OVERRIDE + virtual QSharedPointer createAdaptor(const Sink::Entity &entity) Q_DECL_OVERRIDE { - const auto resourceBuffer = Akonadi2::EntityBuffer::readBuffer(entity.resource()); - const auto localBuffer = Akonadi2::EntityBuffer::readBuffer(entity.local()); - // const auto metadataBuffer = Akonadi2::EntityBuffer::readBuffer(entity.metadata()); + const auto resourceBuffer = Sink::EntityBuffer::readBuffer(entity.resource()); + const auto localBuffer = Sink::EntityBuffer::readBuffer(entity.local()); + // const auto metadataBuffer = Sink::EntityBuffer::readBuffer(entity.metadata()); auto adaptor = QSharedPointer >::create(); adaptor->mLocalBuffer = localBuffer; @@ -153,7 +153,7 @@ public: return adaptor; } - virtual void createBuffer(const Akonadi2::ApplicationDomain::ApplicationDomainType &domainObject, flatbuffers::FlatBufferBuilder &fbb, void const *metadataData = 0, size_t metadataSize = 0) Q_DECL_OVERRIDE + virtual void createBuffer(const Sink::ApplicationDomain::ApplicationDomainType &domainObject, flatbuffers::FlatBufferBuilder &fbb, void const *metadataData = 0, size_t metadataSize = 0) Q_DECL_OVERRIDE { flatbuffers::FlatBufferBuilder localFbb; if (mLocalWriteMapper) { @@ -167,7 +167,7 @@ public: createBufferPartBuffer(domainObject, resFbb, *mResourceWriteMapper); } - Akonadi2::EntityBuffer::assembleEntityBuffer(fbb, metadataData, metadataSize, resFbb.GetBufferPointer(), resFbb.GetSize(), localFbb.GetBufferPointer(), localFbb.GetSize()); + Sink::EntityBuffer::assembleEntityBuffer(fbb, metadataData, metadataSize, resFbb.GetBufferPointer(), resFbb.GetSize(), localFbb.GetBufferPointer(), localFbb.GetSize()); } -- cgit v1.2.3