Mailcommon

foldercollectionmonitor.h
1/*
2 SPDX-FileCopyrightText: 2009-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "mailcommon_export.h"
10
11#include <KIO/Job>
12#include <KSharedConfig>
13
14#include <QModelIndex>
15#include <QObject>
16
18
19namespace Akonadi
20{
21class ChangeRecorder;
22class Collection;
23class Session;
24}
25
26namespace MailCommon
27{
28class FolderCollectionMonitorPrivate;
29/**
30 * @brief The FolderCollectionMonitor class
31 * @author Laurent Montel <montel@kde.org>
32 */
33class MAILCOMMON_EXPORT FolderCollectionMonitor : public QObject
34{
35 Q_OBJECT
36
37public:
38 explicit FolderCollectionMonitor(Akonadi::Session *session, QObject *parent = nullptr);
39 ~FolderCollectionMonitor() override;
40
41 [[nodiscard]] Akonadi::ChangeRecorder *monitor() const;
42 void expireAllFolders(bool immediate, QAbstractItemModel *collectionModel);
43 void expunge(const Akonadi::Collection &, bool sync = false);
44
45protected:
46 void expireAllCollection(const QAbstractItemModel *model, bool immediate, const QModelIndex &parentIndex = QModelIndex());
47
48private:
49 MAILCOMMON_NO_EXPORT void slotDeleteJob(KJob *job);
50 std::unique_ptr<FolderCollectionMonitorPrivate> const d;
51};
52}
The FolderCollectionMonitor class.
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.