From cc3fed3668a80616ec78bc872e21b7ac06bcde38 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 9 Apr 2015 15:21:06 +0200 Subject: Renamed Akonadi::Domain to Akonadi::ApplicationDomain Because it's really the application domain and not the akonadi domain. --- dummyresource/domainadaptor.cpp | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'dummyresource/domainadaptor.cpp') diff --git a/dummyresource/domainadaptor.cpp b/dummyresource/domainadaptor.cpp index 865a4c0..b133614 100644 --- a/dummyresource/domainadaptor.cpp +++ b/dummyresource/domainadaptor.cpp @@ -14,11 +14,8 @@ using namespace DummyCalendar; using namespace flatbuffers; -using namespace DummyCalendar; -using namespace flatbuffers; - //This will become a generic implementation that simply takes the resource buffer and local buffer pointer -class DummyEventAdaptor : public Akonadi2::Domain::BufferAdaptor +class DummyEventAdaptor : public Akonadi2::ApplicationDomain::BufferAdaptor { public: DummyEventAdaptor() @@ -55,10 +52,10 @@ public: return props; } - Akonadi2::Domain::Buffer::Event const *mLocalBuffer; + Akonadi2::ApplicationDomain::Buffer::Event const *mLocalBuffer; DummyEvent const *mResourceBuffer; - QSharedPointer > mLocalMapper; + QSharedPointer > mLocalMapper; QSharedPointer > mResourceMapper; }; @@ -73,14 +70,14 @@ DummyEventAdaptorFactory::DummyEventAdaptorFactory() } return QVariant(); }); - mLocalMapper = QSharedPointer >::create(); - mLocalMapper->mReadAccessors.insert("summary", [](Akonadi2::Domain::Buffer::Event const *buffer) -> QVariant { + mLocalMapper = QSharedPointer >::create(); + mLocalMapper->mReadAccessors.insert("summary", [](Akonadi2::ApplicationDomain::Buffer::Event const *buffer) -> QVariant { if (buffer->summary()) { return QString::fromStdString(buffer->summary()->c_str()); } return QVariant(); }); - mLocalMapper->mReadAccessors.insert("uid", [](Akonadi2::Domain::Buffer::Event const *buffer) -> QVariant { + mLocalMapper->mReadAccessors.insert("uid", [](Akonadi2::ApplicationDomain::Buffer::Event const *buffer) -> QVariant { if (buffer->uid()) { return QString::fromStdString(buffer->uid()->c_str()); } @@ -90,10 +87,10 @@ DummyEventAdaptorFactory::DummyEventAdaptorFactory() } //TODO pass EntityBuffer instead? -QSharedPointer DummyEventAdaptorFactory::createAdaptor(const Akonadi2::Entity &entity) +QSharedPointer DummyEventAdaptorFactory::createAdaptor(const Akonadi2::Entity &entity) { const auto resourceBuffer = Akonadi2::EntityBuffer::readBuffer(entity.resource()); - const auto localBuffer = Akonadi2::EntityBuffer::readBuffer(entity.local()); + const auto localBuffer = Akonadi2::EntityBuffer::readBuffer(entity.local()); // const auto metadataBuffer = Akonadi2::EntityBuffer::readBuffer(entity.metadata()); auto adaptor = QSharedPointer::create(); @@ -104,7 +101,7 @@ QSharedPointer DummyEventAdaptorFactory::create return adaptor; } -void DummyEventAdaptorFactory::createBuffer(const Akonadi2::Domain::Event &event, flatbuffers::FlatBufferBuilder &fbb) +void DummyEventAdaptorFactory::createBuffer(const Akonadi2::ApplicationDomain::Event &event, flatbuffers::FlatBufferBuilder &fbb) { flatbuffers::FlatBufferBuilder eventFbb; eventFbb.Clear(); @@ -119,10 +116,10 @@ void DummyEventAdaptorFactory::createBuffer(const Akonadi2::Domain::Event &event flatbuffers::FlatBufferBuilder localFbb; { auto uid = localFbb.CreateString(event.getProperty("uid").toString().toStdString()); - auto localBuilder = Akonadi2::Domain::Buffer::EventBuilder(localFbb); + auto localBuilder = Akonadi2::ApplicationDomain::Buffer::EventBuilder(localFbb); localBuilder.add_uid(uid); auto location = localBuilder.Finish(); - Akonadi2::Domain::Buffer::FinishEventBuffer(localFbb, location); + Akonadi2::ApplicationDomain::Buffer::FinishEventBuffer(localFbb, location); } Akonadi2::EntityBuffer::assembleEntityBuffer(fbb, 0, 0, eventFbb.GetBufferPointer(), eventFbb.GetSize(), localFbb.GetBufferPointer(), localFbb.GetSize()); -- cgit v1.2.3