• 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
fileindexer.h
Go to the documentation of this file.
1 /* This file is part of the KDE Project
2  Copyright (c) 2008-2010 Sebastian Trueg <trueg@kde.org>
3  Copyright (c) 2010 Vishesh Handa <handa.vish@gmail.com>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef _NEPOMUK_FILEINDEXER_SERVICE_H_
21 #define _NEPOMUK_FILEINDEXER_SERVICE_H_
22 
23 #include "service2.h"
24 #include <QtCore/QTimer>
25 
26 namespace Nepomuk2 {
27 
28  class IndexScheduler;
29 
33  class FileIndexer : public Nepomuk2::Service2
34  {
35  Q_OBJECT
36  Q_CLASSINFO("D-Bus Interface", "org.kde.nepomuk.FileIndexer")
37 
38  public:
39  FileIndexer();
40  ~FileIndexer();
41 
42  Q_SIGNALS:
43  void statusStringChanged();
44 
45  Q_SCRIPTABLE void statusChanged();
46  Q_SCRIPTABLE void indexingStarted();
47  Q_SCRIPTABLE void indexingStopped();
48  Q_SCRIPTABLE void fileIndexingDone();
49 
58  Q_SCRIPTABLE void status(int status, QString msg);
59 
60  public Q_SLOTS:
66  Q_SCRIPTABLE QString statusMessage() const;
67 
75  Q_SCRIPTABLE int currentStatus() const;
76 
82  Q_SCRIPTABLE QString userStatusString() const;
83 
84  Q_SCRIPTABLE bool isSuspended() const;
85  Q_SCRIPTABLE bool isIndexing() const;
86  Q_SCRIPTABLE bool isCleaning() const;
87 
88  Q_SCRIPTABLE void resume() const;
89  Q_SCRIPTABLE void suspend() const;
90  Q_SCRIPTABLE void setSuspended( bool );
91 
92  Q_SCRIPTABLE QString currentFolder() const;
93  Q_SCRIPTABLE QString currentFile() const;
94 
95  Q_SCRIPTABLE int indexedFiles() const;
96  Q_SCRIPTABLE int totalFiles() const;
97 
101  Q_SCRIPTABLE void updateFolder( const QString& path, bool recursive, bool forced );
102 
106  Q_SCRIPTABLE void updateAllFolders( bool forced );
107 
111  Q_SCRIPTABLE void indexFolder( const QString& path, bool recursive, bool forced );
112 
116  Q_SCRIPTABLE void indexFile( const QString& path );
117 
118  private Q_SLOTS:
119  void slotIndexingDone();
120 
128  void emitStatusMessage();
129 
130  private:
131  IndexScheduler* m_indexScheduler;
132  };
133 }
134 
135 #endif
Nepomuk2::FileIndexer::resume
Q_SCRIPTABLE void resume() const
Definition: fileindexer.cpp:139
Nepomuk2::FileIndexer::indexingStopped
Q_SCRIPTABLE void indexingStopped()
Nepomuk2::FileIndexer::currentFolder
Q_SCRIPTABLE QString currentFolder() const
Definition: fileindexer.cpp:151
Nepomuk2::FileIndexer::totalFiles
Q_SCRIPTABLE int totalFiles() const
Definition: fileindexer.cpp:188
Nepomuk2::FileIndexer::isSuspended
Q_SCRIPTABLE bool isSuspended() const
Definition: fileindexer.cpp:116
Nepomuk2::FileIndexer::setSuspended
Q_SCRIPTABLE void setSuspended(bool)
Definition: fileindexer.cpp:105
Nepomuk2::FileIndexer::statusMessage
Q_SCRIPTABLE QString statusMessage() const
Translated status message of the current Indexer behaviour.
Definition: fileindexer.cpp:90
Nepomuk2::IndexScheduler
The IndexScheduler is responsible for controlling the indexing queues and reacting to events...
Definition: indexscheduler.h:39
Nepomuk2::FileIndexer::currentStatus
Q_SCRIPTABLE int currentStatus() const
Returns the internal state of the indexer.
Definition: fileindexer.cpp:95
Nepomuk2::FileIndexer::statusStringChanged
void statusStringChanged()
Nepomuk2::FileIndexer::suspend
Q_SCRIPTABLE void suspend() const
Definition: fileindexer.cpp:133
Nepomuk2::Service2
New Base class for all Nepomuk services.
Definition: service2.h:88
service2.h
Nepomuk2::FileIndexer::isCleaning
Q_SCRIPTABLE bool isCleaning() const
Definition: fileindexer.cpp:127
Nepomuk2::FileIndexer::FileIndexer
FileIndexer()
Definition: fileindexer.cpp:36
Nepomuk2::FileIndexer::updateFolder
Q_SCRIPTABLE void updateFolder(const QString &path, bool recursive, bool forced)
Update folder path if it is configured to be indexed.
Definition: fileindexer.cpp:157
Nepomuk2::FileIndexer::indexFolder
Q_SCRIPTABLE void indexFolder(const QString &path, bool recursive, bool forced)
Index a folder independent of its configuration status.
Definition: fileindexer.cpp:213
Nepomuk2::FileIndexer::indexFile
Q_SCRIPTABLE void indexFile(const QString &path)
Index a specific file.
Definition: fileindexer.cpp:207
Nepomuk2::FileIndexer::statusChanged
Q_SCRIPTABLE void statusChanged()
Nepomuk2::FileIndexer::status
Q_SCRIPTABLE void status(int status, QString msg)
Emitted each time the status/activity of the FileIndexer changes.
Nepomuk2::FileIndexer::userStatusString
Q_SCRIPTABLE QString userStatusString() const
Definition: fileindexer.cpp:100
Nepomuk2::FileIndexer::currentFile
Q_SCRIPTABLE QString currentFile() const
Definition: fileindexer.cpp:145
Nepomuk2::FileIndexer::updateAllFolders
Q_SCRIPTABLE void updateAllFolders(bool forced)
Update all folders configured to be indexed.
Definition: fileindexer.cpp:201
Nepomuk2::FileIndexer::isIndexing
Q_SCRIPTABLE bool isIndexing() const
Definition: fileindexer.cpp:122
Nepomuk2::FileIndexer
Service controlling the file indexer.
Definition: fileindexer.h:33
Nepomuk2::FileIndexer::indexedFiles
Q_SCRIPTABLE int indexedFiles() const
Definition: fileindexer.cpp:174
Nepomuk2::FileIndexer::indexingStarted
Q_SCRIPTABLE void indexingStarted()
Nepomuk2::FileIndexer::~FileIndexer
~FileIndexer()
Definition: fileindexer.cpp:74
Nepomuk2::FileIndexer::fileIndexingDone
Q_SCRIPTABLE void fileIndexingDone()
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