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

Outputs messages to system and application log and to the console. More...

#include <Messaging.h>

Collaboration diagram for Messaging:
Collaboration graph

Public Types

enum  Level { DEBUG = 1, INFORMATION = 2, WARNING = 3, ERROR = 4 }
 Message levels available. More...
 

Static Public Member Functions

static void setLevel (const enum Level)
 Sets message level. More...
 
static void error (const std::string &)
 Sends an error message based on errno. More...
 
static void message (const enum Level, const std::string &)
 Sends message. More...
 
static void teardown ()
 Deletes the singleton. More...
 

Private Member Functions

 Messaging ()
 Creates the singleton. More...
 
 ~Messaging ()
 Deletes singleton. More...
 

Static Private Member Functions

static MessaginggetSingleton ()
 Retrieves the messaging singleton. More...
 

Private Attributes

std::fstream logfs
 
enum Level messageLevel
 

Static Private Attributes

static Messagingsingleton = NULL
 Singleton responsible for all messages sent. More...
 

Detailed Description

Outputs messages to system and application log and to the console.

Definition at line 35 of file Messaging.h.

Member Enumeration Documentation

Message levels available.

Enumerator
DEBUG 

Debugging information only to be shown in the console.

INFORMATION 

Information, e.g. access scanning has started.

WARNING 

Warning, e.g. file access has been blocked.

ERROR 

Error, e.g. malfunction of the code, malware detected.

Definition at line 40 of file Messaging.h.

Constructor & Destructor Documentation

Messaging::Messaging ( )
private

Creates the singleton.

Definition at line 46 of file Messaging.cc.

Here is the caller graph for this function:

Messaging::~Messaging ( )
private

Deletes singleton.

Definition at line 177 of file Messaging.cc.

Member Function Documentation

void Messaging::error ( const std::string &  label)
static

Sends an error message based on errno.

Parameters
labellabel to futher detail error message

Definition at line 88 of file Messaging.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Messaging * Messaging::getSingleton ( )
staticprivate

Retrieves the messaging singleton.

Definition at line 157 of file Messaging.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void Messaging::message ( const enum Level  level,
const std::string &  message 
)
static

Sends message.

Parameters
levelmessage priority
messagemessage text

Definition at line 101 of file Messaging.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void Messaging::setLevel ( const enum Level  level)
static

Sets message level.

Parameters
levelmessage level

Definition at line 149 of file Messaging.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void Messaging::teardown ( )
static

Deletes the singleton.

Definition at line 167 of file Messaging.cc.

Here is the caller graph for this function:

Member Data Documentation

std::fstream Messaging::logfs
private

Definition at line 65 of file Messaging.h.

enum Level Messaging::messageLevel
private

Definition at line 66 of file Messaging.h.

Messaging * Messaging::singleton = NULL
staticprivate

Singleton responsible for all messages sent.

Definition at line 64 of file Messaging.h.


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