Akonadi Mime

removeduplicatesjob.h
1 /*
2  SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, <[email protected]>
3  SPDX-FileCopyrightText: 2010 Andras Mantia <[email protected]>
4  SPDX-FileCopyrightText: 2012 Dan Vrátil <[email protected]>
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 
18 namespace Akonadi
19 {
20 class 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  */
30 class AKONADI_MIME_EXPORT RemoveDuplicatesJob : public Akonadi::Job
31 {
32  Q_OBJECT
33 
34 public:
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  */
49  RemoveDuplicatesJob(const Akonadi::Collection::List &folders, QObject *parent);
50 
51  /**
52  * Destroys the job.
53  */
54  ~RemoveDuplicatesJob() override;
55 
56 protected:
57  void doStart() override;
58  bool doKill() override;
59 
60 private:
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.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 10 2023 03:51:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.