Akonadi

xmlwriter.h
1 /*
2  SPDX-FileCopyrightText: 2009 Volker Krause <[email protected]>
3  SPDX-FileCopyrightText: 2009 Igor Trindade Oliveira <[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 #include <QDomElement>
13 
14 namespace Akonadi
15 {
16 class Attribute;
17 class Collection;
18 class Item;
19 
20 /**
21  Low-level methods to serialize Akonadi objects into XML.
22  @see Akonadi::XmlDocument
23 */
24 namespace XmlWriter
25 {
26 /**
27  Creates an attribute element for the given document.
28 */
29 Q_REQUIRED_RESULT AKONADI_XML_EXPORT QDomElement attributeToElement(Attribute *attr, QDomDocument &document);
30 
31 /**
32  Serializes all attributes of the given Akonadi object into the given parent element.
33 */
34 AKONADI_XML_EXPORT void writeAttributes(const Item &entity, QDomElement &parentElem);
35 
36 /**
37  Serializes all attributes of the given Akonadi object into the given parent element.
38 */
39 AKONADI_XML_EXPORT void writeAttributes(const Collection &entity, QDomElement &parentElem);
40 
41 /**
42  Creates a collection element for the given document, not yet attached to the DOM tree.
43 */
44 Q_REQUIRED_RESULT AKONADI_XML_EXPORT QDomElement collectionToElement(const Collection &collection, QDomDocument &document);
45 
46 /**
47  Serializes the given collection into a DOM element with the given parent.
48 */
49 AKONADI_XML_EXPORT QDomElement writeCollection(const Collection &collection, QDomElement &parentElem);
50 
51 /**
52  Creates an item element for the given document, not yet attached to the DOM tree
53 */
54 Q_REQUIRED_RESULT AKONADI_XML_EXPORT QDomElement itemToElement(const Item &item, QDomDocument &document);
55 
56 /**
57  Serializes the given item into a DOM element and attaches it to the given item.
58 */
59 AKONADI_XML_EXPORT QDomElement writeItem(const Item &item, QDomElement &parentElem);
60 }
61 
62 }
63 
AKONADI_XML_EXPORT QDomElement collectionToElement(const Collection &collection, QDomDocument &document)
Creates a collection element for the given document, not yet attached to the DOM tree.
Definition: xmlwriter.cpp:54
Represents a collection of PIM items.
Definition: collection.h:61
Provides interface for custom attributes for Entity.
Definition: attribute.h:124
AKONADI_XML_EXPORT QDomElement writeCollection(const Collection &collection, QDomElement &parentElem)
Serializes the given collection into a DOM element with the given parent.
Definition: xmlwriter.cpp:69
AKONADI_XML_EXPORT void writeAttributes(const Item &entity, QDomElement &parentElem)
Serializes all attributes of the given Akonadi object into the given parent element.
Definition: xmlwriter.cpp:44
AKONADI_XML_EXPORT QDomElement itemToElement(const Item &item, QDomDocument &document)
Creates an item element for the given document, not yet attached to the DOM tree.
Definition: xmlwriter.cpp:81
AKONADI_XML_EXPORT QDomElement writeItem(const Item &item, QDomElement &parentElem)
Serializes the given item into a DOM element and attaches it to the given item.
Definition: xmlwriter.cpp:111
AKONADI_XML_EXPORT QDomElement attributeToElement(Attribute *attr, QDomDocument &document)
Creates an attribute element for the given document.
Definition: xmlwriter.cpp:17
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.