kmail

spamheaderanalyzer.h
1/*
2 spamheaderanalyzer.h
3
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2004 Patrick Audley <paudley@blackcat.ca>
6 Copyright (c) 2004 Ingo Kloecker <kloecker@kde.org>
7
8 KMail is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 KMail is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22 In addition, as a special exception, the copyright holders give
23 permission to link the code of this program with any edition of
24 the TQt library by Trolltech AS, Norway (or with modified versions
25 of TQt that use the same license as TQt), and distribute linked
26 combinations including the two. You must obey the GNU General
27 Public License in all respects for all of the code used other than
28 TQt. If you modify this file, you may extend this exception to
29 your version of the file, but you are not obligated to do so. If
30 you do not wish to do so, delete this exception statement from
31 your version.
32*/
33
34#ifndef __KMAIL_SPAMHEADERANALYZER_H__
35#define __KMAIL_SPAMHEADERANALYZER_H__
36
37#include <tqvaluelist.h>
38
39class TQString;
40class KMMessage;
41
42namespace KMail {
43
56 class SpamScore {
57 public:
58 SpamScore() : mScore( -2.0 ) {}
59 SpamScore( const TQString & agent, float score, const TQString & header )
60 : mAgent( agent ), mScore( score ), mHeader( header ) {}
61 TQString agent() const { return mAgent; }
62 float score() const { return mScore; }
63 TQString spamHeader() const { return mHeader; }
64
65 private:
66 TQString mAgent;
67 float mScore;
68 TQString mHeader;
69 };
70 typedef TQValueList<SpamScore> SpamScores;
71 typedef TQValueListIterator<SpamScore> SpamScoresIterator;
72
73
79 public:
85 static SpamScores getSpamScores( const KMMessage *message );
86 };
87
88} // namespace KMail
89
90#endif // __KMAIL_SPAMHEADERANALYZER_H__
This is a Mime Message.
Definition: kmmessage.h:68
Flyweight for analysing spam headers.
static SpamScores getSpamScores(const KMMessage *message)
Extract scores from known anti-spam headers.
A simple tupel of agent, score and header.
folderdiaquotatab.h
Definition: aboutdata.cpp:40