• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Nepomuk-Core

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk-core
  • services
  • fileindexer
indexcleaner.h
Go to the documentation of this file.
1 /*
2  This file is part of the Nepomuk KDE project.
3  Copyright (C) 2011 Vishesh Handa <handa.vish@gmail.com>
4  Copyright (C) 2011 Sebastian Trueg <trueg@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #ifndef INDEXCLEANER_H
24 #define INDEXCLEANER_H
25 
26 #include <QtCore/QString>
27 #include <QtCore/QQueue>
28 #include <QtCore/QMutex>
29 
30 #include <KJob>
31 
32 namespace Nepomuk2 {
33  class FileIndexerConfig;
34 
35  class IndexCleaner : public KJob
36  {
37  Q_OBJECT
38 
39  public:
40  IndexCleaner(QObject* parent=0);
41 
42  virtual void start();
43 
49  static QString constructExcludeFolderFilter(Nepomuk2::FileIndexerConfig* cfg);
50 
55  static QString constructExcludeFiltersFilenameFilter(Nepomuk2::FileIndexerConfig* cfg);
56 
65  static QString constructExcludeFiltersFolderFilter(Nepomuk2::FileIndexerConfig* cfg);
66 
67  public slots:
75  void setDelay(int msecs);
76 
77  protected:
78  virtual bool doSuspend();
79  virtual bool doResume();
80 
81  private slots:
82  void clearNextBatch();
83  void slotRemoveResourcesDone(KJob* job);
84 
85  private:
86  QQueue<QString> m_removalQueries;
87 
88  QString m_query;
89 
90  QMutex m_stateMutex;
91  bool m_suspended;
92  int m_delay;
93  };
94 }
95 
96 #endif // INDEXCLEANER_H
Nepomuk2::IndexCleaner::IndexCleaner
IndexCleaner(QObject *parent=0)
Definition: indexcleaner.cpp:72
Nepomuk2::IndexCleaner::constructExcludeFiltersFolderFilter
static QString constructExcludeFiltersFolderFilter(Nepomuk2::FileIndexerConfig *cfg)
Construct a SPARQL filter which matches all file URLs (variable ?url) that should not be indexed acco...
Definition: indexcleaner.cpp:351
Nepomuk2::FileIndexerConfig
Active config class which emits signals if the config was changed, for example if the KCM saved the c...
Definition: fileindexerconfig.h:38
QObject
Nepomuk2::IndexCleaner::start
virtual void start()
Definition: indexcleaner.cpp:81
Nepomuk2::IndexCleaner::constructExcludeFolderFilter
static QString constructExcludeFolderFilter(Nepomuk2::FileIndexerConfig *cfg)
Construct a SPARQL filter which matches all URLs (variable ?url) that should not be indexed according...
Definition: indexcleaner.cpp:301
Nepomuk2::IndexCleaner::setDelay
void setDelay(int msecs)
Set the delay between the cleanup queries.
Definition: indexcleaner.cpp:226
Nepomuk2::IndexCleaner::doSuspend
virtual bool doSuspend()
Definition: indexcleaner.cpp:209
Nepomuk2::IndexCleaner::constructExcludeFiltersFilenameFilter
static QString constructExcludeFiltersFilenameFilter(Nepomuk2::FileIndexerConfig *cfg)
Construct a SPARQL filter which matches all filenames (variable ?fn) that match one of the exclude fi...
Definition: indexcleaner.cpp:336
Nepomuk2::IndexCleaner::doResume
virtual bool doResume()
Definition: indexcleaner.cpp:216
Nepomuk2::IndexCleaner
Definition: indexcleaner.h:35
KJob
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal