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 Collection; 0016 class Item; 0017 0018 namespace FileStore 0019 { 0020 class AbstractJobSession; 0021 class ItemCreateJobPrivate; 0022 0023 /** 0024 */ 0025 class AKONADI_FILESTORE_EXPORT ItemCreateJob : public Job 0026 { 0027 friend class AbstractJobSession; 0028 0029 Q_OBJECT 0030 0031 public: 0032 explicit ItemCreateJob(const Item &item, const Collection &collection, AbstractJobSession *session = nullptr); 0033 0034 ~ItemCreateJob() override; 0035 0036 [[nodiscard]] Collection collection() const; 0037 0038 [[nodiscard]] Item item() const; 0039 0040 bool accept(Visitor *visitor) override; 0041 0042 private: 0043 void handleItemCreated(const Akonadi::Item &item); 0044 0045 private: 0046 std::unique_ptr<ItemCreateJobPrivate> const d; 0047 }; 0048 } 0049 }