1 ///###////////////////////////////////////////////////////////////////////////
2 //
3 // Burton Computer Corporation
4 // http://www.burton-computer.com
5 // http://www.cooldevtools.com
6 // $Id: ParserConfig.cc 272 2007-01-06 19:37:27Z brian $
7 //
8 // Copyright (C) 2007 Burton Computer Corporation
9 // ALL RIGHTS RESERVED
10 //
11 // This program is open source software; you can redistribute it
12 // and/or modify it under the terms of the Q Public License (QPL)
13 // version 1.0. Use of this software in whole or in part, including
14 // linking it (modified or unmodified) into other programs is
15 // subject to the terms of the QPL.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 // Q Public License for more details.
21 //
22 // You should have received a copy of the Q Public License
23 // along with this program; see the file LICENSE.txt.  If not, visit
24 // the Burton Computer Corporation or CoolDevTools web site
25 // QPL pages at:
26 //
27 //    http://www.burton-computer.com/qpl.html
28 //    http://www.cooldevtools.com/qpl.html
29 //
30 
31 #include "ParserConfig.h"
32 #include "RegularExpression.h"
33 
ParserConfig()34 ParserConfig::ParserConfig()
35   : m_minTermLength(1),
36     m_maxTermLength(90),
37     m_replaceNonAsciiChars(true),
38     m_nonAsciiChar('z'),
39     m_removeHTML(true),
40     m_keepSuspiciousTags(false),
41     m_ignoreBody(false),
42     m_minPhraseTerms(1),
43     m_maxPhraseTerms(2),
44     m_minPhraseChars(0),
45     m_maxPhraseChars(0),
46     m_maxTermsPerMessage(0),
47     m_spamprobeFieldName("x-spamprobe")
48 {
49 #ifdef USE_8BIT
50     setReplaceNonAsciiChars(0);
51 #endif
52     headers()->addSimpleHeaderPrefix("from");
53     headers()->addSimpleHeaderPrefix("to");
54     headers()->addSimpleHeaderPrefix("cc");
55     headers()->addSimpleHeaderPrefix("subject");
56     headers()->addHeaderPrefix("received", "recv", "recvx");
57 }
58 
~ParserConfig()59 ParserConfig::~ParserConfig()
60 {
61 }
62