File indexing completed on 2024-04-28 16:44:28
0001 /* This file is part of the KDE project 0002 SPDX-FileCopyrightText: 1999-2006 David Faure <faure@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-only 0005 */ 0006 0007 #ifndef __kioclient_h 0008 #define __kioclient_h 0009 0010 #include <QApplication> 0011 #include <kio/udsentry.h> 0012 0013 class QCommandLineParser; 0014 class KJob; 0015 namespace KIO 0016 { 0017 class Job; 0018 } 0019 0020 class ClientApp : public QObject 0021 { 0022 Q_OBJECT 0023 public: 0024 ClientApp(); 0025 0026 /** Parse command-line arguments and "do it" */ 0027 bool doIt(const QCommandLineParser &parser); 0028 0029 private Q_SLOTS: 0030 void slotPrintData(KIO::Job *job, const QByteArray &data); 0031 void slotEntries(KIO::Job *job, const KIO::UDSEntryList &); 0032 void slotResult(KJob *); 0033 void slotStatResult(KJob *); 0034 void slotDialogCanceled(); 0035 0036 private: 0037 bool kde_open(const QString &url, const QString &mimeType, bool allowExec); 0038 bool doCopy(const QStringList &urls); 0039 bool doMove(const QStringList &urls); 0040 bool doList(const QStringList &urls); 0041 bool doRemove(const QStringList &urls); 0042 bool doStat(const QStringList &urls); 0043 0044 static bool m_ok; 0045 }; 0046 0047 #endif