1/*
2 SPDX-FileCopyrightText: 2015 Vishesh Handa <vhanda@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#ifndef BALOO_EXTRACTORPROCESS_H
8#define BALOO_EXTRACTORPROCESS_H
9
10#include "extractor/commandpipe.h"
11
12#include <QProcess>
13#include <QObject>
14#include <QVector>
15
16namespace Baloo {
17
18class ExtractorProcess : public QObject
19{
20 Q_OBJECT
21public:
22 ExtractorProcess(const QString& extractorPath, QObject* parent = nullptr);
23 ~ExtractorProcess();
24
25 void index(const QVector<quint64>& fileIds);
26 void start();
27
28Q_SIGNALS:
29 void startedIndexingFile(QString filePath);
30 void finishedIndexingFile(QString filePath, bool fileUpdated);
31 void done();
32 void failed();
33
34private:
35 const QString m_extractorPath;
36
37 QProcess m_extractorProcess;
38 Baloo::Private::ControllerPipe m_controller;
39};
40}
41
42#endif // BALOO_EXTRACTORPROCESS_H
43

source code of baloo/src/file/extractorprocess.h