Baloo

app.h
1/*
2 This file is part of the KDE Baloo Project
3 SPDX-FileCopyrightText: 2013 Vishesh Handa <me@vhanda.in>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#ifndef EXTRACTOR_APP_H
9#define EXTRACTOR_APP_H
10
11#include <QVector>
12#include <QMimeDatabase>
13#include <QSocketNotifier>
14#include <QFile>
15
16#include <memory>
17
18#include <KFileMetaData/ExtractorCollection>
19
20#include "database.h"
21#include "extractor/commandpipe.h"
22#include "../fileindexerconfig.h"
23
24class KIdleTime;
25class QString;
26
27namespace Baloo {
28
29class Transaction;
30
31class App : public QObject
32{
34
35public:
36 explicit App(QObject* parent = nullptr);
37 ~App();
38
39private Q_SLOTS:
40 void slotNewBatch(const QVector<quint64>& ids);
41 void processNextFile();
42
43private:
44 bool index(Transaction* tr, const QString& filePath, quint64 id);
45
46 QMimeDatabase m_mimeDb;
47
48 KFileMetaData::ExtractorCollection m_extractorCollection;
49
50 FileIndexerConfig m_config;
51
52 QSocketNotifier m_notifyNewData;
53 QFile m_input;
54 QFile m_output;
55 Private::WorkerPipe m_workerPipe;
56
57 KIdleTime* m_idleTime = nullptr;
58 bool m_isBusy = true;
59
60 QVector<quint64> m_ids;
61 std::unique_ptr<Transaction> m_tr;
62};
63
64}
65#endif
Implements storage for docIds without any associated data Instantiated for:
Definition coding.cpp:11
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
QString tr(const char *sourceText, const char *disambiguation, int n)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:53:02 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.