File indexing completed on 2024-11-24 04:44:34

0001 /*  This file is part of the KDE project
0002     SPDX-FileCopyrightText: 2009, 2010 Kevin Krammer <kevin.krammer@gmx.at>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "job.h"
0010 
0011 #include <memory>
0012 
0013 namespace Akonadi
0014 {
0015 class Item;
0016 
0017 namespace FileStore
0018 {
0019 class AbstractJobSession;
0020 class ItemDeleteJobPrivate;
0021 
0022 /**
0023  */
0024 class AKONADI_FILESTORE_EXPORT ItemDeleteJob : public Job
0025 {
0026     friend class AbstractJobSession;
0027 
0028     Q_OBJECT
0029 
0030 public:
0031     explicit ItemDeleteJob(const Item &item, AbstractJobSession *session = nullptr);
0032 
0033     ~ItemDeleteJob() override;
0034 
0035     [[nodiscard]] Item item() const;
0036 
0037     bool accept(Visitor *visitor) override;
0038 
0039 private:
0040     void handleItemDeleted(const Akonadi::Item &item);
0041 
0042 private:
0043     std::unique_ptr<ItemDeleteJobPrivate> const d;
0044 };
0045 }
0046 }