SenderListFilter Class Reference

This class represents both the blacklist and the whitelist. For using create an object of it and call check() to test a sender address. You have to call load() after the settings in the config file was changed. More...

#include <senderlistfilter.h>

List of all members.

Public Member Functions

 SenderListFilter ()
 ~SenderListFilter ()
FilterAction_Type check (QString sender) const
void load ()
void print ()

Protected Member Functions

bool search (QStringList list, QString sender) const


Detailed Description

This class represents both the blacklist and the whitelist. For using create an object of it and call check() to test a sender address. You have to call load() after the settings in the config file was changed.

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

Definition at line 44 of file senderlistfilter.h.


Constructor & Destructor Documentation

SenderListFilter::SenderListFilter (  ) 

Constructor

Definition at line 20 of file senderlistfilter.cpp.

SenderListFilter::~SenderListFilter (  ) 

Destructor

Definition at line 32 of file senderlistfilter.cpp.


Member Function Documentation

FilterAction_Type SenderListFilter::check ( QString  sender  )  const

Checks the given sender whether it is listed in the blacklist or whitelist.

Parameters:
sender sender which shall be checked
Returns:
appointed action (FActPass, FActDelete, FActMark, FActNone)

Definition at line 36 of file senderlistfilter.cpp.

void SenderListFilter::load (  ) 

Loads the setup from the application config file.

Definition at line 51 of file senderlistfilter.cpp.

void SenderListFilter::print (  ) 

Prints the settings.

Definition at line 85 of file senderlistfilter.cpp.

bool SenderListFilter::search ( QStringList  list,
QString  sender 
) const [protected]

Returns TRUE if the given list contains the sender or a part of it. e.g.: The list contains: Ulrich Weigelt spam@spamhouse.com "Lara Croft" <lara.croft@tombraider.com>

This sender strings will cause a return value of TRUE: "Ulrich Weigelt" <ulrich.weigelt@gmx.de> "Spam King" <spam@spamhouse.com> spam@spamhouse.com lara.croft@tombraider.com "Lara Croft" <lara.croft@tombraider.com>

Parameters:
list blacklist or whitelist
sender searched sender name
Returns:
TRUE - the given sender name is listed. FALSE - is not listed

Definition at line 69 of file senderlistfilter.cpp.


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

Generated on Tue May 18 19:43:53 2010 for KShowmail by  doxygen 1.5.6