Akonadi

itemcopyhandler.h
1/*
2 SPDX-FileCopyrightText: 2008 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "entities.h"
10#include "handler.h"
11
12namespace Akonadi
13{
14namespace Server
15{
16/**
17 @ingroup akonadi_server_handler
18
19 Handler for the COPY command.
20
21 This command is used to copy a set of items into the specific collection. It
22 is syntactically identical to the IMAP COPY command.
23
24 The copied items differ in the following points from the originals:
25 - new unique id
26 - empty remote id
27 - possible located in a different collection (and thus resource)
28
29 There is only the usual status response indicating success or failure of the
30 COPY command
31 */
33{
34public:
35 ItemCopyHandler(AkonadiServer &akonadi);
36 ~ItemCopyHandler() override = default;
37
38 bool parseStream() override;
39
40protected:
41 /**
42 Copy the given item and all its parts into the @p target.
43 The changes mentioned above are applied.
44 */
45 bool copyItem(const PimItem &item, const Collection &target);
46 void processItems(const QList<qint64> &ids);
47
48private:
49 Collection mTargetCollection;
50};
51
52} // namespace Server
53} // namespace Akonadi
Represents a collection of PIM items.
Definition collection.h:62
The handler interfaces describes an entity capable of handling an AkonadiIMAP command.
Definition handler.h:32
Handler for the COPY command.
bool copyItem(const PimItem &item, const Collection &target)
Copy the given item and all its parts into the target.
bool parseStream() override
Parse and handle the IMAP message using the streaming parser.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 7 2024 11:56:45 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.