Akonadi

xmlreader.h
1 /*
2  SPDX-FileCopyrightText: 2009 Igor Trindade Oliveira <[email protected]>
3  SPDX-FileCopyrightText: 2009 Volker Krause <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #pragma once
9 
10 #include "akonadi-xml_export.h"
11 
12 // AkonadiCore
13 #include <akonadi/collection.h>
14 #include <akonadi/item.h>
15 
16 #include <QDomElement>
17 
18 namespace Akonadi
19 {
20 class Attribute;
21 
22 /**
23  Low-level methods to transform DOM elements into the corresponding Akonadi objects.
24  @see Akonadi::XmlDocument
25 */
26 namespace XmlReader
27 {
28 /**
29  Converts an attribute element.
30 */
31 AKONADI_XML_EXPORT Attribute *elementToAttribute(const QDomElement &elem);
32 
33 /**
34  Reads all attributes that are immediate children of @p elem and adds them
35  to @p item.
36 */
37 AKONADI_XML_EXPORT void readAttributes(const QDomElement &elem, Item &item);
38 
39 /**
40  Reads all attributes that are immediate children of @p elem and adds them
41  to @p collection.
42 */
43 AKONADI_XML_EXPORT void readAttributes(const QDomElement &elem, Collection &collection);
44 
45 /**
46  Converts a collection element.
47 */
48 Q_REQUIRED_RESULT AKONADI_XML_EXPORT Collection elementToCollection(const QDomElement &elem);
49 
50 /**
51  Reads recursively all collections starting from the given DOM element.
52 */
53 Q_REQUIRED_RESULT AKONADI_XML_EXPORT Collection::List readCollections(const QDomElement &elem);
54 
55 /**
56  Converts a tag element.
57 */
58 Q_REQUIRED_RESULT AKONADI_XML_EXPORT Tag elementToTag(const QDomElement &elem);
59 
60 /**
61  Reads recursively all tags starting from the given DOM element.
62 */
63 Q_REQUIRED_RESULT AKONADI_XML_EXPORT Tag::List readTags(const QDomElement &elem);
64 
65 /**
66  Converts an item element.
67 */
68 Q_REQUIRED_RESULT AKONADI_XML_EXPORT Item elementToItem(const QDomElement &elem, bool includePayload = true);
69 }
70 
71 }
72 
AKONADI_XML_EXPORT Item elementToItem(const QDomElement &elem, bool includePayload=true)
Converts an item element.
Definition: xmlreader.cpp:135
An Akonadi Tag.
Definition: tag.h:25
AKONADI_XML_EXPORT Collection elementToCollection(const QDomElement &elem)
Converts a collection element.
Definition: xmlreader.cpp:52
Represents a collection of PIM items.
Definition: collection.h:61
Provides interface for custom attributes for Entity.
Definition: attribute.h:124
AKONADI_XML_EXPORT Attribute * elementToAttribute(const QDomElement &elem)
Converts an attribute element.
Definition: xmlreader.cpp:16
AKONADI_XML_EXPORT Tag::List readTags(const QDomElement &elem)
Reads recursively all tags starting from the given DOM element.
Definition: xmlreader.cpp:115
AKONADI_XML_EXPORT void readAttributes(const QDomElement &elem, Item &item)
Reads all attributes that are immediate children of elem and adds them to item.
Definition: xmlreader.cpp:42
AKONADI_XML_EXPORT Tag elementToTag(const QDomElement &elem)
Converts a tag element.
Definition: xmlreader.cpp:92
AKONADI_XML_EXPORT Collection::List readCollections(const QDomElement &elem)
Reads recursively all collections starting from the given DOM element.
Definition: xmlreader.cpp:72
Represents a PIM item stored in Akonadi storage.
Definition: item.h:104
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jun 25 2022 06:00:33 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.