File indexing completed on 2024-12-15 04:51:47
0001 /******************************************************************* 0002 KNotes -- Notes for the KDE project 0003 0004 SPDX-FileCopyrightText: 2003 Daniel Martin <daniel.martin@pirack.com> 0005 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel.org> 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 *******************************************************************/ 0009 0010 #pragma once 0011 0012 #include "noteshared_export.h" 0013 #include <QAbstractSocket> 0014 #include <QObject> 0015 0016 #include <memory> 0017 0018 class QTcpSocket; 0019 namespace NoteShared 0020 { 0021 class NotesNetworkReceiverPrivate; 0022 class NOTESHARED_EXPORT NotesNetworkReceiver : public QObject 0023 { 0024 Q_OBJECT 0025 public: 0026 explicit NotesNetworkReceiver(QTcpSocket *); 0027 ~NotesNetworkReceiver() override; 0028 0029 Q_SIGNALS: 0030 void sigNoteReceived(const QString &, const QString &); 0031 0032 private Q_SLOTS: 0033 void slotDataAvailable(); 0034 void slotReceptionTimeout(); 0035 void slotConnectionClosed(); 0036 void slotError(QAbstractSocket::SocketError); 0037 0038 private: 0039 std::unique_ptr<NotesNetworkReceiverPrivate> const d; 0040 }; 0041 }