Akonadi

bridgeconnection.h
1 /***************************************************************************
2  * SPDX-FileCopyrightText: 2010 Volker Krause <[email protected]> *
3  * *
4  * SPDX-License-Identifier: LGPL-2.0-or-later *
5  ***************************************************************************/
6 
7 #pragma once
8 
9 #include <QObject>
10 
11 class QTcpSocket;
12 class QLocalSocket;
13 
14 class BridgeConnection : public QObject
15 {
16  Q_OBJECT
17 
18 public:
19  explicit BridgeConnection(QTcpSocket *remoteSocket, QObject *parent = nullptr);
20  ~BridgeConnection() override;
21 
22 protected Q_SLOTS:
23  virtual void connectLocal() = 0;
24  void doConnects();
25 
26 protected:
27  QLocalSocket *m_localSocket = nullptr;
28 
29 private Q_SLOTS:
30  void slotDataAvailable();
31 
32 private:
33  QTcpSocket *const m_remoteSocket;
34 };
35 
36 class AkonadiBridgeConnection : public BridgeConnection
37 {
38  Q_OBJECT
39 
40 public:
41  explicit AkonadiBridgeConnection(QTcpSocket *remoteSocket, QObject *parent = nullptr);
42 
43 protected:
44  void connectLocal() override;
45 };
46 
47 class DBusBridgeConnection : public BridgeConnection
48 {
49  Q_OBJECT
50 
51 public:
52  explicit DBusBridgeConnection(QTcpSocket *remoteSocket, QObject *parent = nullptr);
53 
54 protected:
55  void connectLocal() override;
56 };
57 
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jun 30 2022 03:51:45 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.