66 int scan(
const int fd);
~VirusScan()
Deletes the virus scanner.
int engineRefCount
Reference count of virus scan enginge.
void dbstat_free()
Frees database status.
pthread_t updateThread
Thrad for updating.
void log_virus_found(const int fd, const char *virname)
Writes log entry.
Status
Status of virus scanning.
struct cl_engine * getEngine()
Gets reference to virus scan engine.
struct cl_engine * createEngine()
Creates a new virus scan engine.
static void * updater(void *)
Thread to update engine.
struct cl_stat dbstat
Struture indicating if database has changed.
pthread_mutex_t mutexEngine
Mutex for accessing the engine.
Environment * env
environment
void destroyEngine(cl_engine *)
int scan(const int fd)
Scans file for virus.
pthread_mutex_t mutexUpdate
Mutex for accessing the engine.
void dbstat_clear()
Clears database status.
int dbstat_check()
Checks if database has changed. 0 = unchanged, 1 = changed.
struct cl_engine * engine
Reference to virus scan engine.
VirusScan(Environment *)
Initializes virus scan engine.
The environment holds variables that are shared by instances of multiple classes. ...
int createThread()
Creates a new thread for managing the scan engine.