summaryrefslogtreecommitdiffstats
path: root/heimdall-frontend/source/Packaging.h
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2015-03-09 16:49:32 +0100
committerBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2015-03-09 16:53:28 +0100
commit6971b49f85d9ddeb2da968a594d65affec3d2b44 (patch)
tree620c821e72045b3b547982efb3d068d5354de9ce /heimdall-frontend/source/Packaging.h
parentCompleted basic firmware file selection functionality (diff)
downloadHeimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.tar
Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.tar.gz
Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.tar.bz2
Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.tar.lz
Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.tar.xz
Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.tar.zst
Heimdall-6971b49f85d9ddeb2da968a594d65affec3d2b44.zip
Diffstat (limited to '')
-rw-r--r--heimdall-frontend/source/Packaging.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/heimdall-frontend/source/Packaging.h b/heimdall-frontend/source/Packaging.h
index 8ba83f7..80b6d81 100644
--- a/heimdall-frontend/source/Packaging.h
+++ b/heimdall-frontend/source/Packaging.h
@@ -22,9 +22,7 @@
#define PACKAGING_H
// Qt
-#include <QList>
-#include <QString>
-#include <QTemporaryFile>
+#include <QDir>
// Heimdall Frontend
#include "PackageData.h"
@@ -99,18 +97,20 @@ namespace HeimdallFrontend
kExtractBufferLength = 262144,
kCompressBufferLength = 262144
};
-
+
+ static bool DecompressGZippedFile(const QString &path, const QString &outputPath);
+
// TODO: Add support for sparse files to both methods?
- static bool ExtractTar(QTemporaryFile& tarFile, PackageData *packageData);
+ static bool ExtractTar(QFile& tarFile, const QDir& outputDirectory, QList<QString>& outputFilePaths);
- static bool WriteTarEntry(const QString& filePath, QTemporaryFile *tarFile, const QString& entryFilename);
- static bool CreateTar(const FirmwareInfo& firmwareInfo, QTemporaryFile *tarFile); // Uses original TAR format.
+ static bool WriteTarEntry(const QString& entryFilename, const QString& filePath, QFile& outputTarFile);
+ static bool CreateTar(const FirmwareInfo& firmwareInfo, QFile& outputTarFile); // Uses original TAR format.
public:
static const char *ustarMagic;
- static bool ExtractPackage(const QString& packagePath, PackageData *packageData);
+ static bool ExtractPackage(const QString& packagePath, PackageData& packageData);
static bool BuildPackage(const QString& packagePath, const FirmwareInfo& firmwareInfo);
static QString ClashlessFilename(const QList<FileInfo>& fileInfos, int fileInfoIndex);