File indexing completed on 2025-01-05 04:37:30

0001 /*
0002     SPDX-FileCopyrightText: 2009 Joris Guisson <joris.guisson@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef BT_EXTRACTFILEJOB_H
0008 #define BT_EXTRACTFILEJOB_H
0009 
0010 #include <KArchive>
0011 #include <KIO/Job>
0012 
0013 #include <ktorrent_export.h>
0014 
0015 namespace bt
0016 {
0017 class ExtractFileThread;
0018 
0019 /**
0020     Job which extracts a single file out of an archive
0021 */
0022 class KTORRENT_EXPORT ExtractFileJob : public KIO::Job
0023 {
0024 public:
0025     ExtractFileJob(KArchive *archive, const QString &path, const QString &dest);
0026     ~ExtractFileJob() override;
0027 
0028     void start() override;
0029     virtual void kill(bool quietly = true);
0030 
0031 private:
0032     void extractThreadDone();
0033 
0034 private:
0035     KArchive *archive;
0036     QString path;
0037     QString dest;
0038     ExtractFileThread *extract_thread;
0039 };
0040 
0041 }
0042 
0043 #endif // BT_EXTRACTFILEJOB_H