File indexing completed on 2024-10-13 09:34:47
0001 /* 0002 This file is part of the KDE libraries 0003 SPDX-FileCopyrightText: 1999 Waldo Bastian <bastian@kde.org> 0004 SPDX-FileCopyrightText: 2013 David Faure <faure@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-only 0007 */ 0008 0009 #ifndef IDLESLAVE_H 0010 #define IDLESLAVE_H 0011 0012 #include "kiocore_export.h" 0013 #include <QDateTime> 0014 #include <QObject> 0015 #include <QScopedPointer> 0016 #include <QUrl> 0017 0018 #if KIOCORE_ENABLE_DEPRECATED_SINCE(5, 101) 0019 0020 namespace KIO 0021 { 0022 class IdleSlavePrivate; 0023 class Connection; 0024 0025 /** 0026 * @internal 0027 * Represents an idle slave, waiting to be reused. 0028 * Used by klauncher. 0029 * Do not use outside KIO and klauncher! 0030 * @since 5.0 0031 * @deprecated Since 5.101, as KLauncher/KInit is deprecated. 0032 */ 0033 class KIOCORE_EXPORT IdleSlave : public QObject 0034 { 0035 Q_OBJECT 0036 public: 0037 explicit IdleSlave(QObject *parent); 0038 ~IdleSlave() override; 0039 0040 bool match(const QString &protocol, const QString &host, bool connected) const; 0041 void connect(const QString &app_socket); 0042 qint64 pid() const; 0043 int age(const QDateTime &now) const; 0044 void reparseConfiguration(); 0045 bool onHold(const QUrl &url) const; 0046 QString protocol() const; 0047 Connection *connection() const; 0048 bool hasTempAuthorization() const; 0049 0050 Q_SIGNALS: 0051 // TODO KF6: fix clazy wanring by using fully-qualified signal argument 0052 void statusUpdate(IdleSlave *); // clazy:exclude=fully-qualified-moc-types 0053 0054 private Q_SLOTS: 0055 void gotInput(); 0056 0057 private: 0058 QScopedPointer<IdleSlavePrivate> d; 0059 }; 0060 0061 } // namespace KIO 0062 0063 #endif 0064 0065 #endif // IDLESLAVE_H