1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 Copyright (C) 2000-2005 David Faure <faure@kde.org>
4 Copyright (C) 2001 Waldo Bastian <bastian@kde.org>
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21
22
23#ifndef KIOEXEC_MAIN_H
24#define KIOEXEC_MAIN_H
25
26#include <QtCore/QObject>
27#include <QtCore/QString>
28#include <QList>
29#include <QtCore/QTimer>
30
31#include <KUrl>
32
33namespace KIO { class Job; }
34
35class KJob;
36
37class KIOExec : public QObject
38{
39 Q_OBJECT
40public:
41 KIOExec();
42
43 bool exited() const { return mExited; }
44
45public Q_SLOTS:
46 void slotResult( KJob * );
47 void slotRunApp();
48
49protected:
50 bool mExited;
51 bool tempfiles;
52 QString suggestedFileName;
53 int counter;
54 int expectedCounter;
55 QString command;
56 struct FileInfo {
57 QString path;
58 KUrl url;
59 int time;
60 };
61 QList<FileInfo> fileList;
62 int jobCounter;
63 QList<KIO::Job *> jobList;
64};
65
66#endif
67