mirror of
https://github.com/YACReader/yacreader
synced 2025-07-23 23:44:52 -04:00
fixed comiplation in Linux (Ubuntu)
line 117: #define _WIN64 1 must be removed in ./compressed_archive/libp7zip/CPP/myWindows/StdAfx.h "cannot find -lpulse" compiling under Qt 5.0.2 can be fixed creating a symbolic link from libpulse.so.0 to libpulse.so (further research is needed)
This commit is contained in:
54
compressed_archive/compressed_archive.h
Normal file
54
compressed_archive/compressed_archive.h
Normal file
@ -0,0 +1,54 @@
|
||||
#ifndef COMPRESSED_ARCHIVE_H
|
||||
#define COMPRESSED_ARCHIVE_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class ExtractDelegate;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include "7z_includes.h"
|
||||
#define _MY_WINAPI WINAPI
|
||||
#else
|
||||
#define _MY_WINAPI
|
||||
#endif
|
||||
|
||||
typedef quint32 (_MY_WINAPI * CreateObjectFunc)(const GUID *clsID,const GUID *interfaceID,void **outObject);
|
||||
typedef quint32 (_MY_WINAPI *GetMethodPropertyFunc)(quint32 index, PROPID propID, PROPVARIANT *value);
|
||||
typedef quint32 (_MY_WINAPI *GetNumberOfMethodsFunc)(quint32 *numMethods);
|
||||
typedef quint32 (_MY_WINAPI *GetNumberOfFormatsFunc)(quint32 *numFormats);
|
||||
typedef quint32 (_MY_WINAPI *GetHandlerPropertyFunc)(PROPID propID, PROPVARIANT *value);
|
||||
typedef quint32 (_MY_WINAPI *GetHandlerPropertyFunc2)(quint32 index, PROPID propID, PROPVARIANT *value);
|
||||
typedef quint32 (_MY_WINAPI *SetLargePageModeFunc)();
|
||||
|
||||
class QLibrary;
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
|
||||
struct SevenZipInterface;
|
||||
|
||||
class CompressedArchive : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CompressedArchive(const QString & filePath, QObject *parent = 0);
|
||||
~CompressedArchive();
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
int getNumFiles();
|
||||
QList<QByteArray> getAllData(const QVector<quint32> & indexes, ExtractDelegate * delegate = 0);
|
||||
QByteArray getRawDataAtIndex(int index);
|
||||
QList<QString> getFileNames();
|
||||
bool isValid();
|
||||
bool toolsLoaded();
|
||||
private:
|
||||
SevenZipInterface * szInterface;
|
||||
QLibrary * sevenzLib;
|
||||
bool loadFunctions();
|
||||
bool tools;
|
||||
bool valid;
|
||||
|
||||
};
|
||||
|
||||
#endif // COMPRESSED_ARCHIVE_H
|
Reference in New Issue
Block a user