File indexing completed on 2024-11-24 04:44:34
0001 /* This file is part of the KDE project 0002 SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net> 0003 SPDX-FileContributor: Kevin Krammer <krake@kdab.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include "job.h" 0011 0012 #include <memory> 0013 0014 namespace Akonadi 0015 { 0016 class Collection; 0017 0018 namespace FileStore 0019 { 0020 class AbstractJobSession; 0021 class CollectionCreateJobPrivate; 0022 0023 /** 0024 */ 0025 class AKONADI_FILESTORE_EXPORT CollectionCreateJob : public Job 0026 { 0027 friend class AbstractJobSession; 0028 0029 Q_OBJECT 0030 0031 public: 0032 explicit CollectionCreateJob(const Collection &collection, const Collection &targetParent, AbstractJobSession *session = nullptr); 0033 0034 ~CollectionCreateJob() override; 0035 0036 Collection collection() const; 0037 0038 Collection targetParent() const; 0039 0040 bool accept(Visitor *visitor) override; 0041 0042 private: 0043 void handleCollectionCreated(const Collection &collection); 0044 0045 private: 0046 std::unique_ptr<CollectionCreateJobPrivate> const d; 0047 }; 0048 } 0049 }