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 <Akonadi/Item>
0012 
0013 #include <memory>
0014 
0015 namespace Akonadi
0016 {
0017 namespace FileStore
0018 {
0019 class AbstractJobSession;
0020 class ItemModifyJobPrivate;
0021 
0022 /**
0023  */
0024 class AKONADI_FILESTORE_EXPORT ItemModifyJob : public Job
0025 {
0026     friend class AbstractJobSession;
0027 
0028     Q_OBJECT
0029 
0030 public:
0031     explicit ItemModifyJob(const Item &item, AbstractJobSession *session = nullptr);
0032 
0033     ~ItemModifyJob() override;
0034 
0035     void setIgnorePayload(bool ignorePayload);
0036 
0037     [[nodiscard]] bool ignorePayload() const;
0038 
0039     [[nodiscard]] Item item() const;
0040 
0041     const QSet<QByteArray> &parts() const;
0042     void setParts(const QSet<QByteArray> &parts);
0043 
0044     bool accept(Visitor *visitor) override;
0045 
0046 private:
0047     void handleItemModified(const Akonadi::Item &item);
0048 
0049 private:
0050     std::unique_ptr<ItemModifyJobPrivate> const d;
0051 };
0052 }
0053 }