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