Akonadi Mime

emptytrashcommand.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
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#pragma once
9
10#include "commandbase.h"
11
12#include <Akonadi/AgentInstance>
13#include <Akonadi/Collection>
14
16namespace Akonadi
17{
18class EmptyTrashCommand : public CommandBase
19{
21
22public:
23 EmptyTrashCommand(const QAbstractItemModel *model, QObject *parent);
24 EmptyTrashCommand(const Akonadi::Collection &folder, QObject *parent);
25 void execute() override;
26
27protected Q_SLOTS:
28 void emitResult(Akonadi::CommandBase::Result result) override;
29
30private:
31 void expunge(const Akonadi::Collection &col);
32 [[nodiscard]] Akonadi::AgentInstance::List agentInstances();
33 [[nodiscard]] Akonadi::Collection trashCollectionFolder();
34 [[nodiscard]] Akonadi::Collection collectionFromId(Akonadi::Collection::Id id) const;
35 [[nodiscard]] bool folderIsTrash(const Akonadi::Collection &col);
36
37 const QAbstractItemModel *const mModel;
38 Akonadi::Collection::Id the_trashCollectionFolder;
39 Akonadi::Collection mFolder;
40 int mNumberOfTrashToEmpty = 0;
41};
42}
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:04:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.