FilterLog Class Reference

This is the log of the filters. More...

#include <filterlog.h>

List of all members.

Public Types

enum  LogEntryStorageMode { exit, days }

Public Member Functions

 FilterLog ()
 ~FilterLog ()
void addDeletedMail (const KDateTime &dateTime, const QString &sender, const QString &account, const QString &subject, KindOfMailDeleting kindDelete, const QString &filter=QString())
void addMovedMail (const KDateTime &dateTime, const QString &sender, const QString &account, const QString &subject, const QString &mailbox)
void print ()
void clearDeletedMailsLog ()
void clearMovedMailsLog ()
void save ()
void load ()
LogEntryList getDeletedMails ()
LogEntryList getMovedMails ()
void loadSetup ()
int numberDeletedMails ()
int numberFilterDeletedMails ()
int numberMovedMails ()

Protected Member Functions

void addEntry (FilterAction_Type action, const KDateTime &dateTime, const QString &sender, const QString &account, const QString &subject, const QString &mailbox=QString(), KindOfMailDeleting kindDelete=DelFilter, const QString &filter=QString())
 Adds an entry.

Private Attributes

KSharedConfigPtr config
LogEntryList listDeletedMails
LogEntryList listMovedMails
bool logDeletedMails
bool logManualDeletedMails
bool logMovedMails
LogEntryStorageMode deletedMailsStorageMode
LogEntryStorageMode manualDeletedMailsStorageMode
unsigned int daysStoreDeletedMails
unsigned int daysStoreManualDeletedMails

Detailed Description

This is the log of the filters.

It holds two lists of entry objects (class FilterLogEntry). One for the deleted mails and the other one for the moved mails.

Author:
Ulrich Weigelt <ulrich.weigelt@gmx.de>

Definition at line 52 of file filterlog.h.


Member Enumeration Documentation

Storage mode of the log entries

Enumerator:
exit 

hold log entries mails until application exit

days 

hold log entries some days

Definition at line 60 of file filterlog.h.


Constructor & Destructor Documentation

FilterLog::FilterLog (  ) 

Default constructor

Definition at line 20 of file filterlog.cpp.

FilterLog::~FilterLog (  ) 

Destructor

Definition at line 33 of file filterlog.cpp.


Member Function Documentation

void FilterLog::addDeletedMail ( const KDateTime &  dateTime,
const QString &  sender,
const QString &  account,
const QString &  subject,
KindOfMailDeleting  kindDelete,
const QString &  filter = QString() 
)

Adds an entry about a deleted mail.

Parameters:
dateTime date and time on which the mail was sent
Parameters:
sender sender of the mail
Parameters:
account Account which has received the mail
Parameters:
subject Subject of the mail
Parameters:
kindDelete kind of mail deleting (by filter or manual)
Parameters:
filter the name of the filter which has deleted the mail

Definition at line 37 of file filterlog.cpp.

void FilterLog::addEntry ( FilterAction_Type  action,
const KDateTime &  dateTime,
const QString &  sender,
const QString &  account,
const QString &  subject,
const QString &  mailbox = QString(),
KindOfMailDeleting  kindDelete = DelFilter,
const QString &  filter = QString() 
) [protected]

Adds an entry.

The target list will be coose on the basis of the given filter action.

Parameters:
action the performed action
Parameters:
dateTime send time of the mail
Parameters:
sender sender of the mail
Parameters:
account account
Parameters:
subject mail subject
Parameters:
mailbox mailbox if the mail was moved
Parameters:
kindDelete kind of mail deleting (by filter or manual)
Parameters:
filter the name of the filter which has deleted the mail

Definition at line 49 of file filterlog.cpp.

void FilterLog::addMovedMail ( const KDateTime &  dateTime,
const QString &  sender,
const QString &  account,
const QString &  subject,
const QString &  mailbox 
)

Adds an entry about a moved mail.

Parameters:
dateTime date and time on which the mail was sent
Parameters:
sender sender of the mail
Parameters:
account Account which has received the mail
Parameters:
subject Subject of the mail
Parameters:
mailbox mailbox

Definition at line 43 of file filterlog.cpp.

void FilterLog::clearDeletedMailsLog (  ) 

Clears the log of deleted mails.

Definition at line 84 of file filterlog.cpp.

void FilterLog::clearMovedMailsLog (  ) 

Clears the log of moved mails.

Definition at line 89 of file filterlog.cpp.

LogEntryList FilterLog::getDeletedMails (  ) 

Returns a copy of the list of deleted mails.

Returns:
copy of the deleted mails list

Definition at line 246 of file filterlog.cpp.

LogEntryList FilterLog::getMovedMails (  ) 

Retruns a copy of the list of moved mails.

Returns:
copy of the moved mails list

Definition at line 251 of file filterlog.cpp.

void FilterLog::load (  ) 

Loads the log of deleted mails from the XML document and get settings.

Definition at line 159 of file filterlog.cpp.

void FilterLog::loadSetup (  ) 

Loads the settings

Definition at line 256 of file filterlog.cpp.

int FilterLog::numberDeletedMails (  ) 

Returns the number of logged deleted mails.

Returns:
number of logged deleted mails

Definition at line 309 of file filterlog.cpp.

int FilterLog::numberFilterDeletedMails (  ) 

Returns the number of logged mails deleted by filter.

Returns:
number of logged mails deleted by filter

Definition at line 319 of file filterlog.cpp.

int FilterLog::numberMovedMails (  ) 

Returns the number of logged moved mails.

Returns:
number of logged moved mails

Definition at line 314 of file filterlog.cpp.

void FilterLog::print (  ) 

Prints the log state.

Definition at line 65 of file filterlog.cpp.

void FilterLog::save (  ) 

Saved the log of deleted mails as XML document.

Definition at line 94 of file filterlog.cpp.


Member Data Documentation

KSharedConfigPtr FilterLog::config [private]

Connector to the configuration file

Definition at line 162 of file filterlog.h.

unsigned int FilterLog::daysStoreDeletedMails [private]

Time (days) a entry of a deleted mail will be stored.

Definition at line 202 of file filterlog.h.

Time (days) a entry of a manual deleted mail will be stored.

Definition at line 207 of file filterlog.h.

Storage mode of log entries about deleted mails

Definition at line 192 of file filterlog.h.

List of entries about deleted mails.

Definition at line 167 of file filterlog.h.

List of entries about moved mails.

Definition at line 172 of file filterlog.h.

TRUE - the log accepts orders to log deleted mails

Definition at line 177 of file filterlog.h.

TRUE - the log accepts orders to log manual deleted mails

Definition at line 182 of file filterlog.h.

bool FilterLog::logMovedMails [private]

TRUE - the log accepts orders to log moved mails

Definition at line 187 of file filterlog.h.

Storage mode of log entries about manual deleted mails

Definition at line 197 of file filterlog.h.


The documentation for this class was generated from the following files:
Generated on Sun Mar 13 15:27:10 2011 for KShowmail by  doxygen 1.6.3