| 1 |
/****************************************************************************** |
| 2 |
This source file is part of the Avogadro project. |
| 3 |
This source code is released under the 3-Clause BSD License, (see "LICENSE"). |
| 4 |
******************************************************************************/ |
| 5 |
|
| 6 |
#ifndef AVOGADRO_QTPLUGINS_ZIPEXTRACTOR_H |
| 7 |
#define AVOGADRO_QTPLUGINS_ZIPEXTRACTOR_H |
| 8 |
|
| 9 |
#include <archive.h> |
| 10 |
#include <archive_entry.h> |
| 11 |
#include <QtCore/QObject> |
| 12 |
#include <QtCore/QList> |
| 13 |
#include <string> |
| 14 |
|
| 15 |
namespace Avogadro { |
| 16 |
|
| 17 |
namespace QtPlugins { |
| 18 |
|
| 19 |
class ZipExtractor : public QObject |
| 20 |
{ |
| 21 |
Q_OBJECT |
| 22 |
|
| 23 |
public: |
| 24 |
ZipExtractor(); |
| 25 |
~ZipExtractor() override; |
| 26 |
int copyData(struct archive* ar, struct archive* aw); |
| 27 |
QList<QString> extract(const std::string& extractdir, |
| 28 |
const std::string& absolutepath); |
| 29 |
QList<QString> listFiles(const std::string& absolutepath); |
| 30 |
}; |
| 31 |
|
| 32 |
} // namespace QtPlugins |
| 33 |
} // namespace Avogadro |
| 34 |
|
| 35 |
#endif |