1 /* This file is part of the KDE project
3 Copyright (C) 2002,2003 Dawit Alemayehu <adawit@kde.org>
4 Copyright (C) 1999 Simon Hausmann <hausmann@kde.org>
5 Copyright (C) 1999 Yves Arrouye <yves@realnames.com>
8 Copyright (C) 2001 Andreas Hochsteger <e9625392@student.tuwien.ac.at>
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 #ifndef KURIIKWSFILTERENG_H
26 #define KURIIKWSFILTERENG_H
30 class KURISearchFilterEngine
33 typedef QMap
<QString
, QString
> SubstMap
;
35 KURISearchFilterEngine();
36 ~KURISearchFilterEngine() {}
38 QByteArray
name() const;
40 QString
webShortcutQuery (const QString
&) const;
42 QString
autoWebSearchQuery (const QString
&) const;
44 bool verbose() const { return m_bVerbose
; }
48 static KURISearchFilterEngine
*self();
51 QString
formatResult (const QString
& url
, const QString
& cset1
, const QString
& cset2
,
52 const QString
& query
, bool isMalformed
) const;
54 QString
formatResult (const QString
& url
, const QString
& cset1
, const QString
& cset2
,
55 const QString
& query
, bool isMalformed
, SubstMap
& map
) const;
58 QStringList
modifySubstitutionMap (SubstMap
& map
, const QString
& query
) const;
60 QString
substituteQuery (const QString
& url
, SubstMap
&map
,
61 const QString
& userquery
, const int encodingMib
) const;
64 bool m_bWebShortcutsEnabled
;
65 char m_cKeywordDelimiter
;
67 QString m_defaultSearchEngine
;
68 static KURISearchFilterEngine
*s_pSelf
;
71 #endif // KURIIKWSFILTERENG_H