Akonadi

itemcreatehandler.h
1 /***************************************************************************
2  * SPDX-FileCopyrightText: 2007 Robert Zwerus <[email protected]> *
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 
12 namespace Akonadi
13 {
14 namespace Server
15 {
16 /**
17  @ingroup akonadi_server_handler
18 
19  Handler for the X-AKAPPEND command.
20 
21  This command is used to append an item with multiple parts.
22 
23  */
24 class ItemCreateHandler : public Handler
25 {
26 public:
27  ItemCreateHandler(AkonadiServer &akonadi);
28  ~ItemCreateHandler() override = default;
29 
30  bool parseStream() override;
31 
32 private:
33  bool buildPimItem(const Protocol::CreateItemCommand &cmd, PimItem &item, Collection &parentCollection);
34 
35  bool insertItem(const Protocol::CreateItemCommand &cmd, PimItem &item, const Collection &parentCollection);
36 
37  bool mergeItem(const Protocol::CreateItemCommand &cmd, PimItem &newItem, PimItem &currentItem, const Collection &parentCollection);
38 
39  bool sendResponse(const PimItem &item, Protocol::CreateItemCommand::MergeModes mergeModes);
40 
41  bool notify(const PimItem &item, bool seen, const Collection &collection);
42  bool notify(const PimItem &item, const Collection &collection, const QSet<QByteArray> &changedParts);
43 
44  void recoverFromMultipleMergeCandidates(const PimItem::List &items, const Collection &collection);
45 };
46 
47 } // namespace Server
48 } // namespace Akonadi
bool parseStream() override
Parse and handle the IMAP message using the streaming parser.
Represents a collection of PIM items.
Definition: collection.h:61
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Mar 30 2023 04:11:39 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.