File indexing completed on 2024-05-12 05:06:13
0001 /* 0002 SPDX-FileCopyrightText: 2017 Thomas Baumgart <tbaumgart@kde.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef WEBCONNECT_H 0007 #define WEBCONNECT_H 0008 0009 #include "kmm_webconnect_export.h" 0010 0011 #include <QObject> 0012 #include <QLoggingCategory> 0013 Q_DECLARE_LOGGING_CATEGORY(WebConnectLog) 0014 0015 class KMM_WEBCONNECT_EXPORT WebConnect : public QObject 0016 { 0017 Q_OBJECT 0018 public: 0019 explicit WebConnect(QObject* parent); 0020 virtual ~WebConnect(); 0021 0022 bool isClient() const; 0023 0024 public Q_SLOTS: 0025 void loadFile(const QUrl& url); 0026 0027 private Q_SLOTS: 0028 void serverConnected(); 0029 void serverDisconnected(); 0030 void clientConnected(); 0031 void clientDisconnected(); 0032 void dataAvailable(); 0033 0034 Q_SIGNALS: 0035 void gotUrl(const QUrl& url); 0036 0037 private: 0038 /// \internal d-pointer class. 0039 class Private; 0040 /// \internal d-pointer instance. 0041 Private* const d; 0042 }; 0043 0044 #endif // WEBCONNECT_H