File indexing completed on 2024-04-28 07:40:07
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_EXTRACTORPROCESS_H 0008 #define BALOO_EXTRACTORPROCESS_H 0009 0010 #include "extractor/commandpipe.h" 0011 0012 #include <QProcess> 0013 #include <QObject> 0014 #include <QVector> 0015 0016 namespace Baloo { 0017 0018 class ExtractorProcess : public QObject 0019 { 0020 Q_OBJECT 0021 public: 0022 ExtractorProcess(const QString& extractorPath, QObject* parent = nullptr); 0023 ~ExtractorProcess(); 0024 0025 void index(const QVector<quint64>& fileIds); 0026 void start(); 0027 0028 Q_SIGNALS: 0029 void startedIndexingFile(QString filePath); 0030 void finishedIndexingFile(QString filePath, bool fileUpdated); 0031 void done(); 0032 void failed(); 0033 0034 private: 0035 const QString m_extractorPath; 0036 0037 QProcess m_extractorProcess; 0038 Baloo::Private::ControllerPipe m_controller; 0039 }; 0040 } 0041 0042 #endif // BALOO_EXTRACTORPROCESS_H