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>
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.
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.
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.
20
#ifndef _NEPOMUK_STRIGI_SERVICE_H_
21
#define _NEPOMUK_STRIGI_SERVICE_H_
23
#include <Nepomuk/Service>
24
#include <QtCore/QTimer>
25
#include <QtCore/QThread>
36
* Service controlling the strigidaemon
38
class FileIndexer : public Nepomuk::Service
41
Q_CLASSINFO("D-Bus Interface", "org.kde.nepomuk.Strigi")
44
FileIndexer( QObject* parent = 0, const QList<QVariant>& args = QList<QVariant>() );
48
void statusStringChanged();
49
void statusChanged(); //vHanda: Can't we just use statusStringChanged? or should that be renamed
50
void indexingFolder( const QString& path );
51
void indexingStarted();
52
void indexingStopped();
56
* \return A user readable status string. Includes the currently indexed folder.
58
QString userStatusString() const;
61
* Simplified status string without details.
63
QString simpleUserStatusString() const;
65
bool isSuspended() const;
66
bool isIndexing() const;
70
void setSuspended( bool );
72
QString currentFolder() const;
73
QString currentFile() const;
76
* Update folder \a path if it is configured to be indexed.
78
void updateFolder( const QString& path, bool recursive, bool forced );
81
* Update all folders configured to be indexed.
83
void updateAllFolders( bool forced );
86
* Index a folder independent of its configuration status.
88
void indexFolder( const QString& path, bool recursive, bool forced );
91
* Index a specific file
93
void indexFile( const QString& path, bool forced );
96
void finishInitialization();
98
void slotIdleTimeoutReached();
99
void slotIdleTimerResume();
100
void slotIndexingDone();
103
void updateStrigiConfig();
104
QString userStatusString( bool simple ) const;
106
IndexScheduler* m_indexScheduler;
107
QThread* m_schedulingThread;