File indexing completed on 2024-06-23 05:07:00
0001 /* 0002 SPDX-FileCopyrightText: 2008 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "entities.h" 0010 #include "handler/itemcopyhandler.h" 0011 0012 namespace Akonadi 0013 { 0014 namespace Server 0015 { 0016 /** 0017 @ingroup akonadi_server_handler 0018 0019 Handler for the CollectionCopyHandler command. 0020 0021 This command is used to copy a single collection into another collection, including 0022 all sub-collections and their content. 0023 0024 The copied items differ in the following points from the originals: 0025 - new unique id 0026 - empty remote id 0027 - possible located in a different collection (and thus resource) 0028 0029 The copied collections differ in the following points from the originals: 0030 - new unique id 0031 - empty remote id 0032 - owning resource is the same as the one of the target collection 0033 */ 0034 class CollectionCopyHandler : public ItemCopyHandler 0035 { 0036 public: 0037 CollectionCopyHandler(AkonadiServer &akonadi); 0038 ~CollectionCopyHandler() override = default; 0039 0040 bool parseStream() override; 0041 0042 private: 0043 bool copyCollection(const Collection &source, const Collection &target); 0044 }; 0045 0046 } // namespace Server 0047 } // namespace Akonadi