File indexing completed on 2024-11-10 04:40:19

0001 /*
0002     SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "fakeconnection.h"
0008 
0009 #include "fakeakonadiserver.h"
0010 #include "fakedatastore.h"
0011 
0012 using namespace Akonadi::Server;
0013 
0014 FakeConnection::FakeConnection(quintptr socketDescriptor, FakeAkonadiServer &akonadi)
0015     : Connection(socketDescriptor, akonadi)
0016 {
0017 }
0018 
0019 FakeConnection::FakeConnection(AkonadiServer &akonadi)
0020     : Connection(akonadi)
0021 {
0022 }
0023 
0024 FakeConnection::~FakeConnection()
0025 {
0026     quitThread();
0027 }
0028 
0029 void FakeConnection::init()
0030 {
0031     Connection::init();
0032 
0033     mNotificationCollector = storageBackend()->notificationCollector();
0034 }
0035 
0036 void FakeConnection::quit()
0037 {
0038     mNotificationCollector->dispatchNotifications();
0039     Connection::quit();
0040 }
0041 
0042 NotificationCollector *FakeConnection::notificationCollector()
0043 {
0044     return mNotificationCollector;
0045 }
0046 
0047 #include "moc_fakeconnection.cpp"