Baloo

unindexedfileiterator.h
1/*
2 This file is part of the KDE Baloo project.
3 SPDX-FileCopyrightText: 2015 Vishesh Handa <vhanda@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#ifndef BALOO_UNINDEXEDFILEITERATOR_H
9#define BALOO_UNINDEXEDFILEITERATOR_H
10
11#include "filtereddiriterator.h"
12
13#include <QMimeDatabase>
14
15namespace Baloo {
16
17class Transaction;
18
19/**
20 * Iterate over all the files (and directories) under a specific directory which require
21 * indexing. This checks the following -
22 * - Config include / exclude path
23 * - Config filters
24 * - Config mimetype filters
25 * - Database for mtime differences
26 */
28{
29public:
30 UnIndexedFileIterator(const FileIndexerConfig* config, Transaction* transaction, const QString& folder);
32
33 QString next();
34 QString filePath() const;
35 QString mimetype() const;
36 bool mTimeChanged() const;
37 bool cTimeChanged() const;
38
39private:
40 bool shouldIndex(const QString& filePath);
41
42 const FileIndexerConfig* m_config;
43 Transaction* m_transaction;
44 FilteredDirIterator m_iter;
45
46 QMimeDatabase m_mimeDb;
47 QString m_mimetype;
48
49 bool m_mTimeChanged;
50 bool m_cTimeChanged;
51};
52
53}
54
55#endif // BALOO_UNINDEXEDFILEITERATOR_H
Active config class which emits signals if the config was changed, for example if the KCM saved the c...
Iterate over all the files (and directories) under a specific directory which require indexing.
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-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.