File indexing completed on 2023-09-24 04:08:46
0001 /* 0002 SPDX-FileCopyrightText: 2022 David Faure <faure@kde.org> 0003 SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org> 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KIO_WORKERFACTORY_H 0008 #define KIO_WORKERFACTORY_H 0009 0010 #include "kiocore_export.h" 0011 #include <QObject> 0012 #include <memory> 0013 0014 namespace KIO 0015 { 0016 0017 class SlaveBase; 0018 class WorkerBase; 0019 0020 class KIOCORE_EXPORT WorkerFactory : public QObject 0021 { 0022 Q_OBJECT 0023 public: 0024 explicit WorkerFactory(QObject *parent = nullptr); 0025 0026 virtual std::unique_ptr<SlaveBase> createWorker(const QByteArray &pool, const QByteArray &app) = 0; 0027 }; 0028 0029 class KIOCORE_EXPORT RealWorkerFactory : public WorkerFactory 0030 { 0031 Q_OBJECT 0032 public: 0033 using WorkerFactory::WorkerFactory; 0034 virtual std::unique_ptr<WorkerBase> createRealWorker(const QByteArray &pool, const QByteArray &app) = 0; 0035 }; 0036 0037 } // namespace KIO 0038 0039 #endif // KIO_WORKERFACTORY_H