Main Page   Class Hierarchy   Compound List   File List   Compound Members  

filters.h

00001 /*
00002  *  Interface to register SLP services - Search Filters
00003  *  Copyright (C) 2002-2003 Tim Jansen <tim@tjansen.de>
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License as published by the Free Software Foundation; either
00008  *  version 2 of the License, or (at your option) any later version.
00009  *
00010  *  This library is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  *  Library General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Library General Public License
00016  *  along with this library; see the file COPYING.LIB.  If not, write to
00017  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018  *  Boston, MA 02111-1307, USA.
00019  */
00020 
00021 #ifndef KDE_SLP_FILTERS_H
00022 #define KDE_SLP_FILTERS_H
00023 
00024 #include <kde/util/smartptr.h>
00025 #include <qstring.h>
00026 #include <qvaluelist.h>
00027 
00028 namespace KDE {
00029 namespace SLP {
00030 
00036 class Filter {
00037 public:
00041         enum Type {
00042                 InvalidFilter,
00043                 PredicateFilter
00044                 /*,
00045                 SortFilter,
00046                 SelectFilter*/
00047         };
00048 
00049 protected:
00051         Type m_type;
00053         Filter(Type type);
00054 
00055 public:
00060         typedef QValueList<KDE::Util::SmartPtr<Filter> > List;
00061 
00066         Type type() const { return m_type; }
00067 };
00068 
00115 class PredicateFilter : public Filter {
00116 private:
00117         QString m_predicate;
00118 public:
00123         PredicateFilter(const QString &predicate);
00124 
00129         QString predicate() const;
00130 
00141         static QString escape(const QString &s);
00142 };
00143 
00144 
00145 }
00146 }
00147 
00148 #endif

Generated on Tue Jun 24 20:14:35 2003 for KDE::SLP by doxygen1.2.18