Akonadi

itemcreatehandler.h
1 /***************************************************************************
2  * Copyright (C) 2007 by Robert Zwerus <[email protected]> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU Library General Public License as *
6  * published by the Free Software Foundation; either version 2 of the *
7  * License, or (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU Library General Public *
15  * License along with this program; if not, write to the *
16  * Free Software Foundation, Inc., *
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18  ***************************************************************************/
19 
20 #ifndef AKONADI_ITEMCREATEHANDLER_H_
21 #define AKONADI_ITEMCREATEHANDLER_H_
22 
23 #include "handler.h"
24 #include "entities.h"
25 
26 namespace Akonadi
27 {
28 namespace Server
29 {
30 
31 class Transaction;
32 
42 {
43 public:
44  ItemCreateHandler(AkonadiServer &akonadi);
45  ~ItemCreateHandler() override = default;
46 
47  bool parseStream() override;
48 
49 private:
50  bool buildPimItem(const Protocol::CreateItemCommand &cmd,
51  PimItem &item,
52  Collection &parentCollection);
53 
54  bool insertItem(const Protocol::CreateItemCommand &cmd,
55  PimItem &item,
56  const Collection &parentCollection);
57 
58  bool mergeItem(const Protocol::CreateItemCommand &cmd,
59  PimItem &newItem,
60  PimItem &currentItem,
61  const Collection &parentCollection);
62 
63  bool sendResponse(const PimItem &item, Protocol::CreateItemCommand::MergeModes mergeModes);
64 
65  bool notify(const PimItem &item, bool seen, const Collection &collection);
66  bool notify(const PimItem &item, const Collection &collection,
67  const QSet<QByteArray> &changedParts);
68 
69  void recoverFromMultipleMergeCandidates(const PimItem::List &items, const Collection &collection);
70 };
71 
72 } // namespace Server
73 } // namespace Akonadi
74 
75 #endif
The handler interfaces describes an entity capable of handling an AkonadiIMAP command.
Definition: handler.h:48
Definition: item.h:44
Helper integration between Akonadi and Qt.
Handler for the X-AKAPPEND command.
bool parseStream() override
Parse and handle the IMAP message using the streaming parser.
Representation of a record in the PimItem table.
Definition: entities.h:1194
Representation of a record in the Collection table.
Definition: entities.h:451
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon May 25 2020 22:46:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.