File indexing completed on 2024-06-23 05:07:02

0001 /*
0002     SPDX-FileCopyrightText: 2009 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "handler.h"
0010 
0011 namespace Akonadi
0012 {
0013 namespace Server
0014 {
0015 /**
0016   @ingroup akonadi_server_handler
0017 
0018   Handler for the item move command.
0019 
0020   <h4>Semantics</h4>
0021   Moves the selected items. Item selection can happen within the usual three scopes:
0022   - based on a uid set relative to the currently selected collection
0023   - based on a global uid set (UID)
0024   - based on a list of remote identifiers within the currently selected collection (RID)
0025 
0026   Destination is a collection id.
0027 */
0028 class ItemMoveHandler : public Handler
0029 {
0030 public:
0031     ItemMoveHandler(AkonadiServer &akonadi);
0032     ~ItemMoveHandler() override = default;
0033 
0034     bool parseStream() override;
0035 
0036 private:
0037     void itemsRetrieved(const QList<qint64> &ids);
0038 
0039     Collection mDestination;
0040 };
0041 
0042 } // namespace Server
0043 } // namespace Akonadi