| 1 | /* |
| 2 | This file is part of the KDE libraries |
| 3 | SPDX-FileCopyrightText: 2016 Kai Uwe Broulik <kde@privat.broulik.de> |
| 4 | |
| 5 | SPDX-License-Identifier: LGPL-2.0-or-later |
| 6 | */ |
| 7 | |
| 8 | #ifndef OPENFILEMANAGERWINDOWJOB_P_H |
| 9 | #define OPENFILEMANAGERWINDOWJOB_P_H |
| 10 | |
| 11 | #include <KJob> |
| 12 | |
| 13 | #include "openfilemanagerwindowjob.h" |
| 14 | |
| 15 | namespace KIO |
| 16 | { |
| 17 | class AbstractOpenFileManagerWindowStrategy : public QObject |
| 18 | { |
| 19 | Q_OBJECT |
| 20 | public: |
| 21 | explicit AbstractOpenFileManagerWindowStrategy() |
| 22 | : QObject() |
| 23 | { |
| 24 | } |
| 25 | |
| 26 | virtual ~AbstractOpenFileManagerWindowStrategy() |
| 27 | { |
| 28 | } |
| 29 | virtual void start(const QList<QUrl> &urls, const QByteArray &asn) = 0; |
| 30 | |
| 31 | Q_SIGNALS: |
| 32 | void finished(int error); |
| 33 | }; |
| 34 | |
| 35 | #ifdef WITH_QTDBUS |
| 36 | class OpenFileManagerWindowDBusStrategy : public AbstractOpenFileManagerWindowStrategy |
| 37 | { |
| 38 | public: |
| 39 | explicit OpenFileManagerWindowDBusStrategy() |
| 40 | : AbstractOpenFileManagerWindowStrategy() |
| 41 | { |
| 42 | } |
| 43 | void start(const QList<QUrl> &urls, const QByteArray &asn) override; |
| 44 | }; |
| 45 | #endif |
| 46 | |
| 47 | class OpenFileManagerWindowKRunStrategy : public AbstractOpenFileManagerWindowStrategy |
| 48 | { |
| 49 | public: |
| 50 | explicit OpenFileManagerWindowKRunStrategy(OpenFileManagerWindowJob *job) |
| 51 | : AbstractOpenFileManagerWindowStrategy() |
| 52 | , m_job(job) |
| 53 | { |
| 54 | } |
| 55 | void start(const QList<QUrl> &urls, const QByteArray &asn) override; |
| 56 | |
| 57 | private: |
| 58 | OpenFileManagerWindowJob *m_job; |
| 59 | }; |
| 60 | |
| 61 | #if defined(Q_OS_WINDOWS) |
| 62 | class OpenFileManagerWindowWindowsShellStrategy : public AbstractOpenFileManagerWindowStrategy |
| 63 | { |
| 64 | public: |
| 65 | explicit OpenFileManagerWindowWindowsShellStrategy() |
| 66 | : AbstractOpenFileManagerWindowStrategy() |
| 67 | { |
| 68 | } |
| 69 | void start(const QList<QUrl> &urls, const QByteArray &asn) override; |
| 70 | }; |
| 71 | #endif |
| 72 | } |
| 73 | |
| 74 | #endif // OPENFILEMANAGERWINDOWJOB_P_H |
| 75 | |