#ifndef COMPRESSED_ARCHIVE_H #define COMPRESSED_ARCHIVE_H #include class ExtractDelegate; class QLibrary; #include #include #include struct SevenZipInterface; class MyCodecs; class CompressedArchive : public QObject { Q_OBJECT public: explicit CompressedArchive(const QString &filePath, QObject *parent = 0); ~CompressedArchive(); signals: public slots: int getNumFiles(); int getNumEntries(); QList getAllData(const QVector &indexes, ExtractDelegate *delegate = 0); QByteArray getRawDataAtIndex(int index); QList getFileNames(); bool isValid(); bool toolsLoaded(); private: SevenZipInterface *szInterface; QLibrary *sevenzLib; bool loadFunctions(); bool tools; bool valid; QList files; QList offsets; QMap indexesToPages; void setupFilesNames(); QVector translateIndexes(const QVector &indexes); friend class MyCodecs; }; #endif // COMPRESSED_ARCHIVE_H