Baloo

metadatamover.h
1/*
2 This file is part of the KDE Project
3 SPDX-FileCopyrightText: 2009-2011 Sebastian Trueg <trueg@kde.org>
4 SPDX-FileCopyrightText: 2013-2014 Vishesh Handa <vhanda@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef BALOO_METADATA_MOVER_H_
10#define BALOO_METADATA_MOVER_H_
11
12#include <QObject>
13
14namespace Baloo
15{
16
17class Database;
18class Transaction;
19
20class MetadataMover : public QObject
21{
23
24public:
25 explicit MetadataMover(Database* db, QObject* parent = nullptr);
26 ~MetadataMover() override;
27
28public Q_SLOTS:
29 void moveFileMetadata(const QString& from, const QString& to);
30 void removeFileMetadata(const QString& file);
31
33 /**
34 * Emitted for files (and folders) that have been moved but
35 * do not have metadata to be moved. This allows the file indexer
36 * service to pick them up in case they are of interest. The
37 * typical example would be moving a file from a non-indexed into
38 * an indexed folder.
39 */
40 void movedWithoutData(const QString& path);
41
42 void fileRemoved(const QString& path);
43
44private:
45 /**
46 * Remove the metadata for file \p url
47 */
48 void removeMetadata(Transaction* tr, const QString& url);
49
50 /**
51 * Recursively update the nie:url and nie:isPartOf properties
52 * of the resource describing \p from.
53 */
54 void updateMetadata(Transaction* tr, const QString& from, const QString& to);
55
56 Database* m_db;
57};
58}
59
60#endif
Implements storage for docIds without any associated data Instantiated for:
Definition coding.cpp:11
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
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 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.