This repository was archived by the owner on Dec 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfileprocessor.h
More file actions
57 lines (41 loc) · 1.33 KB
/
Copy pathfileprocessor.h
File metadata and controls
57 lines (41 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef FILEPROCESSOR_H
#define FILEPROCESSOR_H
#include <QDir>
#include <QHash>
#include <QObject>
#include <QStandardItemModel>
#include <QUrl>
#include "yaraprocessor.h"
class FileProcessor : public QObject
{
Q_OBJECT
public:
explicit FileProcessor(QObject *parent = nullptr);
~FileProcessor();
public slots:
void processFiles(const QList<QUrl> &urls, bool yara);
void initializeYara();
void loadAndCompileYaraRules(const QString &yara_dir_path);
signals:
void startProcessing(const QList<QUrl> &urls, bool yara);
void fileCountSum(int count);
void fileCount(int count);
void updateModel(const QStringList &data);
void finishedProcessing(const QHash<QString, QStringList> *file_list);
void startInitializingYara();
void startLoadingCompilingYaraRules(const QString &yara_dir_path);
void finishedLoadingYaraRules();
void yaraSuccess(QString success);
void yaraError(QString error);
void yaraWarning(QString warning);
private:
void insertFileListData(QHash<QString, QStringList> &file_list, const QString &file_path);
QString getFileType(const QString file_path, const bool &mime_type);
QHash<QString, QStringList> *file_list;
YaraProcessor *scanner;
QDir yara_dir;
bool yara_active;
int file_count;
int file_counter;
};
#endif // FILEPROCESSOR_H