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

0001 /*
0002     SPDX-FileCopyrightText: 2016 Daniel Vrátil <dvratil@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QList>
0010 #include <QObject>
0011 
0012 #include "connection_p.h"
0013 
0014 namespace Akonadi
0015 {
0016 class SessionThread : public QObject
0017 {
0018     Q_OBJECT
0019 
0020 public:
0021     explicit SessionThread(QObject *parent = nullptr);
0022     ~SessionThread() override;
0023 
0024     void addConnection(Connection *connection);
0025     void destroyConnection(Connection *connection);
0026 
0027 private Q_SLOTS:
0028     void doDestroyConnection(Akonadi::Connection *connection);
0029     void doAddConnection(Akonadi::Connection *connection);
0030 
0031     void doThreadQuit();
0032 
0033 private:
0034     QList<Connection *> mConnections;
0035 };
0036 
0037 }