2
Copyright (c) 2009 Volker Krause <vkrause@kde.org>
3
Copyright (c) 2009 Igor Trindade Oliveira <igor_trindade@yahoo.com.br>
5
This library is free software; you can redistribute it and/or modify it
6
under the terms of the GNU Library General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or (at your
8
option) any later version.
10
This library is distributed in the hope that it will be useful, but WITHOUT
11
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13
License for more details.
15
You should have received a copy of the GNU Library General Public License
16
along with this library; see the file COPYING.LIB. If not, write to the
17
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21
#ifndef AKONADI_XMLWRITER_H
22
#define AKONADI_XMLWRITER_H
24
#include "akonadi-xml_export.h"
26
#include <QtXml/QDomElement>
36
Low-level methods to serialize Akonadi objects into XML.
37
@see Akonadi::XmlDocument
42
Creates an attribute element for the given document.
44
AKONADI_XML_EXPORT QDomElement attributeToElement( Attribute* attr, QDomDocument &document );
47
Serializes all attributes of the given Akonadi object into the given parent element.
49
AKONADI_XML_EXPORT void writeAttributes( const Entity &entity, QDomElement &parentElem );
52
Creates a collection element for the given document, not yet attached to the DOM tree.
54
AKONADI_XML_EXPORT QDomElement collectionToElement( const Collection &collection, QDomDocument &document );
57
Serializes the given collection into a DOM element with the given parent.
59
AKONADI_XML_EXPORT QDomElement writeCollection( const Collection &collection, QDomElement &parentElem );
62
Creates an item element for the given document, not yet attached to the DOM tree
64
AKONADI_XML_EXPORT QDomElement itemToElement( const Item &item, QDomDocument &document );
67
Serializes the given item into a DOM element and attaches it to the given item.
69
AKONADI_XML_EXPORT QDomElement writeItem( const Akonadi::Item& item, QDomElement& parentElem );