forked from hubenchang0515/Raphael
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clamavengine.h
43 lines (35 loc) · 913 Bytes
/
clamavengine.h
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
#ifndef CLAMAVENGINE_H
#define CLAMAVENGINE_H
#include <QObject>
#include <QFileInfo>
#include <QQueue>
#include <clamav/clamav.h>
class ClamAVEngine : public QObject
{
Q_OBJECT
public:
explicit ClamAVEngine(QObject *parent = nullptr);
~ClamAVEngine();
signals:
void opened();
void closed();
void finished();
void detecting(const QString& file);
void detected(const QString& file, bool isSafe, const QString& virname);
void message(const QString& text);
public slots:
bool open();
bool close();
bool detect(const QFileInfo& file);
bool detect(const QString& file);
void scan(const QString& file);
void globalScan();
private:
struct cl_engine* engine;
struct cl_scan_options options;
bool isOpen;
bool isInit;
bool detectFile(const QFileInfo& file);
bool detectDir(const QFileInfo& directory);
};
#endif // CLAMAVENGINE_H