Skyld AV  0.6
On access virus scanning for Linux
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Environment Class Reference

The environment holds variables that are shared by instances of multiple classes. More...

#include <Environment.h>

Collaboration diagram for Environment:
Collaboration graph

Public Member Functions

 Environment ()
 Creates a new environment. More...
 
int isCleanCacheOnUpdate ()
 Determines if cache shall be cleaned when the virus scanner receives a new pattern file. More...
 
StringSetgetExcludePaths ()
 Gets the set of paths that shall not be scanned. More...
 
StringSetgetLocalFileSystems ()
 Gets the list of file systems considered local. This list can be used to decide if scan results shall be cached. More...
 
StringSetgetNoMarkFileSystems ()
 Gets the list of file systems that shall not be scanned. More...
 
StringSetgetNoMarkMounts ()
 Gets the list of mounts not to be scanned. More...
 
unsigned int getCacheMaxSize ()
 Gets the maximum number of entries in the cache with scan results. More...
 
void setCacheMaxSize (unsigned int)
 Sets the maximum number of entries in the cache with scan results. More...
 
void setCleanCacheOnUpdate (int)
 Sets if cache shall be cleaned when the virus scanner receives a new pattern file. More...
 
ScanCachegetScanCache ()
 Gets the scan cache. More...
 
int getNumberOfThreads ()
 Gets the number of threads used to call the virus scanner. More...
 
void setNumberOfThreads (int)
 sets the number of threads used to call the virus scanner. More...
 
virtual ~Environment ()
 Destroys the environment. More...
 

Private Member Functions

 Environment (const Environment &)
 

Private Attributes

StringSetexcludepath
 Paths to be excluded from scanning. More...
 
StringSetlocalfs
 File systems for local drives. More...
 
StringSetnomarkfs
 File systems which shall not be scanned. More...
 
StringSetnomarkmnt
 Mounts that shall not be scanned. More...
 
int nThreads
 Number of threads for virus scanning. More...
 
ScanCachescache
 Cache for scan results. More...
 
unsigned int cacheMaxSize
 Maximum cache size. More...
 
int cleanCacheOnUpdate
 Clean cache when the virus scanner receives a new pattern file. More...
 

Detailed Description

The environment holds variables that are shared by instances of multiple classes.

Definition at line 38 of file Environment.h.

Constructor & Destructor Documentation

Environment::Environment ( )

Creates a new environment.

Definition at line 29 of file Environment.cc.

Environment::~Environment ( )
virtual

Destroys the environment.

Definition at line 145 of file Environment.cc.

Environment::Environment ( const Environment )
private

Member Function Documentation

unsigned int Environment::getCacheMaxSize ( )

Gets the maximum number of entries in the cache with scan results.

Returns
maximum cache size

Definition at line 92 of file Environment.cc.

Here is the caller graph for this function:

StringSet * Environment::getExcludePaths ( )

Gets the set of paths that shall not be scanned.

Returns
paths no to be scanned

Definition at line 55 of file Environment.cc.

Here is the caller graph for this function:

StringSet * Environment::getLocalFileSystems ( )

Gets the list of file systems considered local. This list can be used to decide if scan results shall be cached.

Returns
list of file systems considered local

Definition at line 83 of file Environment.cc.

Here is the caller graph for this function:

StringSet * Environment::getNoMarkFileSystems ( )

Gets the list of file systems that shall not be scanned.

Returns
file systems not to be scanned.

Definition at line 64 of file Environment.cc.

Here is the caller graph for this function:

StringSet * Environment::getNoMarkMounts ( )

Gets the list of mounts not to be scanned.

Returns
mounts not to be scanned

Definition at line 73 of file Environment.cc.

Here is the caller graph for this function:

int Environment::getNumberOfThreads ( )

Gets the number of threads used to call the virus scanner.

Returns
number of threads

Definition at line 119 of file Environment.cc.

ScanCache * Environment::getScanCache ( )

Gets the scan cache.

Returns
scan cache

Definition at line 110 of file Environment.cc.

Here is the caller graph for this function:

int Environment::isCleanCacheOnUpdate ( )

Determines if cache shall be cleaned when the virus scanner receives a new pattern file.

Returns
cache shall be cleaned on update

Definition at line 46 of file Environment.cc.

Here is the caller graph for this function:

void Environment::setCacheMaxSize ( unsigned int  size)

Sets the maximum number of entries in the cache with scan results.

Parameters
sizemaximum cache size

Definition at line 101 of file Environment.cc.

Here is the caller graph for this function:

void Environment::setCleanCacheOnUpdate ( int  value)

Sets if cache shall be cleaned when the virus scanner receives a new pattern file.

Parameters
valuecache shall be cleaned on update

Definition at line 129 of file Environment.cc.

Here is the caller graph for this function:

void Environment::setNumberOfThreads ( int  n)

sets the number of threads used to call the virus scanner.

Parameters
nnumber of threads

Definition at line 138 of file Environment.cc.

Here is the caller graph for this function:

Member Data Documentation

unsigned int Environment::cacheMaxSize
private

Maximum cache size.

Definition at line 81 of file Environment.h.

int Environment::cleanCacheOnUpdate
private

Clean cache when the virus scanner receives a new pattern file.

Definition at line 85 of file Environment.h.

StringSet* Environment::excludepath
private

Paths to be excluded from scanning.

Definition at line 57 of file Environment.h.

StringSet* Environment::localfs
private

File systems for local drives.

Definition at line 61 of file Environment.h.

StringSet* Environment::nomarkfs
private

File systems which shall not be scanned.

Definition at line 65 of file Environment.h.

StringSet* Environment::nomarkmnt
private

Mounts that shall not be scanned.

Definition at line 69 of file Environment.h.

int Environment::nThreads
private

Number of threads for virus scanning.

Definition at line 73 of file Environment.h.

ScanCache* Environment::scache
private

Cache for scan results.

Definition at line 77 of file Environment.h.


The documentation for this class was generated from the following files: