File indexing completed on 2024-04-21 03:51:45

0001 /*
0002     SPDX-FileCopyrightText: 2015 Vishesh Handa <vhanda@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 #ifndef BALOO_NEWFILEINDEXER_H
0008 #define BALOO_NEWFILEINDEXER_H
0009 
0010 #include <QRunnable>
0011 #include <QStringList>
0012 #include <QObject>
0013 
0014 namespace Baloo {
0015 
0016 class Database;
0017 class FileIndexerConfig;
0018 
0019 /**
0020  * Does not check the folder path or the mtime of the file
0021  */
0022 class NewFileIndexer : public QObject, public QRunnable
0023 {
0024     Q_OBJECT
0025 public:
0026     NewFileIndexer(Database* db, const FileIndexerConfig* config, const QStringList& newFiles);
0027 
0028     void run() override;
0029 
0030 Q_SIGNALS:
0031     void done();
0032 
0033 private:
0034     Database* m_db;
0035     const FileIndexerConfig* m_config;
0036     QStringList m_files;
0037 };
0038 
0039 }
0040 
0041 #endif // BALOO_NEWFILEINDEXER_H