Akonadi

itemcreatehandler.h
1/***************************************************************************
2 * SPDX-FileCopyrightText: 2007 Robert Zwerus <arzie@dds.nl> *
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 X-AKAPPEND command.
20
21 This command is used to append an item with multiple parts.
22
23 */
24class ItemCreateHandler : public Handler
25{
26public:
27 ItemCreateHandler(AkonadiServer &akonadi);
28 ~ItemCreateHandler() override = default;
29
30 bool parseStream() override;
31
32private:
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
Represents a collection of PIM items.
Definition collection.h:62
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-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:57 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.