1 /* This file is part of the KDE Project
2 Copyright (c) 2008 Sebastian Trueg <trueg@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
19 #ifndef _NEPOMUK_STRIGI_CONFIG_H_
20 #define _NEPOMUK_STRIGI_CONFIG_H_
22 #include <QtCore/QObject>
25 #include <kio/global.h>
30 * Active config class which emits signals if the config
31 * was changed, for example if the KCM saved the config file.
33 class Config
: public QObject
39 static Config
* self();
42 * The folders to search for files to analyze
44 QStringList
folders() const;
47 * The folders that should be excluded.
48 * It is perfectly possible to include subfolders again.
50 QStringList
excludeFolders() const;
52 QStringList
excludeFilters() const;
53 QStringList
includeFilters() const;
56 void setShowGui( bool showGui
);
59 * The minimal available disk space. If it drops below
60 * indexing will be suspended.
62 KIO::filesize_t
minDiskSpace() const;
65 * true the first time the service is run (or after manually
66 * tampering with the config.
68 bool isInitialRun() const;
71 * Check if the folder should be indexed based on
72 * folders() and excludeFolders()
74 bool shouldFolderBeIndexed( const QString
& );
80 void slotConfigDirty();