Add (and install) svg for the new krunner interface.
[kdebase/uwolfer.git] / runtime / kurifilter-plugins / localdomain / localdomainurifilter.h
blob0db58ade3090fa8937fe530c34906282639ad5f6
1 /*
2 localdomainurifilter.h
4 This file is part of the KDE project
5 Copyright (C) 2002 Lubos Lunak <llunak@suse.cz>
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef _LOCALDOMAINURIFILTER_H_
22 #define _LOCALDOMAINURIFILTER_H_
24 #include <time.h>
26 #include <kgenericfactory.h>
27 #include <kurifilter.h>
28 #include <QRegExp>
31 This filter takes care of hostnames in the local search domain.
32 If you're in domain domain.org which has a host intranet.domain.org
33 and the typed URI is just intranet, check if there's a host
34 intranet.domain.org and if yes, it's a network URI.
37 class LocalDomainUriFilter : public KUriFilterPlugin
39 Q_OBJECT
41 public:
42 LocalDomainUriFilter( QObject* parent, const QVariantList& args );
43 virtual bool filterUri( KUriFilterData &data ) const;
45 public Q_SLOTS:
46 void configure();
48 private:
49 bool isLocalDomainHost( QString& cmd ) const;
50 mutable QString last_host;
51 mutable bool last_result;
52 mutable time_t last_time;
53 QRegExp m_hostPortPattern;
56 #endif