File indexing completed on 2024-04-21 03:55:30

0001 /*
0002     This file is part of the KDE project
0003     SPDX-FileCopyrightText: 1998, 1999 Torben Weis <weis@kde.org>
0004     SPDX-FileCopyrightText: 2000-2005 David Faure <faure@kde.org>
0005     SPDX-FileCopyrightText: 2001 Waldo Bastian <bastian@kde.org>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #ifndef KIOEXEC_MAIN_H
0011 #define KIOEXEC_MAIN_H
0012 
0013 #include <QList>
0014 #include <QObject>
0015 #include <QString>
0016 
0017 #include <QDateTime>
0018 #include <QUrl>
0019 
0020 namespace KIO
0021 {
0022 class Job;
0023 }
0024 
0025 class KJob;
0026 class QCommandLineParser;
0027 
0028 class KIOExec : public QObject
0029 {
0030     Q_OBJECT
0031 public:
0032     KIOExec(const QStringList &args, bool tempFiles, const QString &suggestedFileName);
0033 
0034     bool exited() const
0035     {
0036         return mExited;
0037     }
0038 
0039 public Q_SLOTS:
0040     void slotResult(KJob *);
0041     void slotRunApp();
0042 
0043 protected:
0044     bool mExited;
0045     bool mTempFiles;
0046     bool mUseDaemon;
0047     QString mSuggestedFileName;
0048     int counter;
0049     int expectedCounter;
0050     QString command;
0051     struct FileInfo {
0052         QString path;
0053         QUrl url;
0054         QDateTime time;
0055     };
0056     QList<FileInfo> fileList;
0057     int jobCounter;
0058     QList<KIO::Job *> jobList;
0059 };
0060 
0061 #endif