Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
wireshark_zip_helper.h
Go to the documentation of this file.
1
11
12#ifndef WS_ZIP_HELPER_H
13#define WS_ZIP_HELPER_H
14
15#include "config.h"
16
17#include <QDir>
18
19#if defined(HAVE_MINIZIP) || defined(HAVE_MINIZIPNG)
20
21#ifdef HAVE_MINIZIP
22#include "minizip/zip.h"
23#else
24#include "minizip-ng/zip.h"
25#endif
26
27class WiresharkZipHelper
28{
29public:
30 // Each entry is a source path and the name to use for it inside the archive
31 static bool zip(QString zipFile, const QList<QPair<QString, QString>> &files);
32 static bool unzip(QString zipFile, QString directory, bool (*fileCheck)(QString fileName, uint64_t fileSize) = Q_NULLPTR, QString (*cleanName)(QString name) = Q_NULLPTR);
33
34protected:
35 static void addFileToZip(zipFile zf, QString filepath, QString fileInZip);
36
37};
38
39#endif
40
41#endif // WS_ZIP_HELPER_H