Baloo

app.h
1 /*
2  This file is part of the KDE Baloo Project
3  SPDX-FileCopyrightText: 2013 Vishesh Handa <[email protected]>
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 <KFileMetaData/ExtractorCollection>
17 
18 #include "database.h"
19 #include "extractor/commandpipe.h"
20 #include "../fileindexerconfig.h"
21 
22 class KIdleTime;
23 class QString;
24 
25 namespace Baloo {
26 
27 class Transaction;
28 
29 class App : public QObject
30 {
31  Q_OBJECT
32 
33 public:
34  explicit App(QObject* parent = nullptr);
35 
36 private Q_SLOTS:
37  void slotNewBatch(const QVector<quint64>& ids);
38  void processNextFile();
39 
40 private:
41  bool index(Transaction* tr, const QString& filePath, quint64 id);
42 
43  QMimeDatabase m_mimeDb;
44 
45  KFileMetaData::ExtractorCollection m_extractorCollection;
46 
47  FileIndexerConfig m_config;
48 
49  QSocketNotifier m_notifyNewData;
50  QFile m_input;
51  QFile m_output;
52  Private::WorkerPipe m_workerPipe;
53 
54  KIdleTime* m_idleTime = nullptr;
55  bool m_isBusy = true;
56 
57  QVector<quint64> m_ids;
58  Transaction* m_tr;
59 };
60 
61 }
62 #endif
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
Implements storage for docIds without any associated data Instantiated for:
Definition: coding.cpp:11
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Nov 29 2023 03:56:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.