Akonadi Mime

removeduplicatesjob.h
1/*
2 SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>
3 SPDX-FileCopyrightText: 2010 Andras Mantia <andras@kdab.com>
4 SPDX-FileCopyrightText: 2012 Dan Vrátil <dvratil@redhat.com>
5
6 SPDX-License-Identifier: LGPL-2.1-or-later
7*/
8
9#pragma once
10
11#include <Akonadi/Collection>
12#include <Akonadi/Job>
13
14#include "akonadi-mime_export.h"
15
16#include <memory>
17
18namespace Akonadi
19{
20class RemoveDuplicatesJobPrivate;
21
22/**
23 * @short Job that finds and removes duplicate messages in given collection
24 *
25 * This jobs compares all messages in given collections by their Message-Id
26 * headers and hashes of their bodies and removes duplicates.
27 *
28 * @since 4.10
29 */
30class AKONADI_MIME_EXPORT RemoveDuplicatesJob : public Akonadi::Job
31{
32 Q_OBJECT
33
34public:
35 /**
36 * Creates a new job that will remove duplicates in @p folder.
37 *
38 * @param folder The folder where to search for duplicates
39 * @param parent The parent object
40 */
41 explicit RemoveDuplicatesJob(const Akonadi::Collection &folder, QObject *parent = nullptr);
42
43 /**
44 * Creates a new job that will remove duplicates in all @p folders.
45 *
46 * @param folders Folders where to search for duplicates
47 * @param parent The parent object
48 */
50
51 /**
52 * Destroys the job.
53 */
55
56protected:
57 void doStart() override;
58 bool doKill() override;
59
60private:
61 friend class RemoveDuplicatesJobPrivate;
62 std::unique_ptr<RemoveDuplicatesJobPrivate> const d;
63};
64} /* namespace Akonadi */
Job that finds and removes duplicate messages in given collection.
~RemoveDuplicatesJob() override
Destroys the job.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:32:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.