File indexing completed on 2024-04-21 03:53:54

0001 /*
0002     SPDX-FileCopyrightText: 2010 Tobias Koenig <tokoe@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KDAV_DAVUTILS_P_H
0008 #define KDAV_DAVUTILS_P_H
0009 
0010 #include "enums.h"
0011 
0012 #include <QDomElement>
0013 
0014 namespace KDAV
0015 {
0016 namespace Utils
0017 {
0018 /**
0019  * Returns the first child element of @p parent that has the given @p tagName and is part of the @p namespaceUri.
0020  */
0021 Q_REQUIRED_RESULT QDomElement firstChildElementNS(const QDomElement &parent, const QString &namespaceUri, const QString &tagName);
0022 
0023 /**
0024  * Returns the next sibling element of @p element that has the given @p tagName and is part of the @p namespaceUri.
0025  */
0026 Q_REQUIRED_RESULT QDomElement nextSiblingElementNS(const QDomElement &element, const QString &namespaceUri, const QString &tagName);
0027 
0028 /**
0029  * Extracts privileges from @p element. The <privilege/> tags are expected to be first level children of @p element.
0030  */
0031 Q_REQUIRED_RESULT Privileges extractPrivileges(const QDomElement &element);
0032 
0033 /**
0034  * Parses a single <privilege/> tag and returns the final Privileges.
0035  */
0036 Q_REQUIRED_RESULT Privileges parsePrivilege(const QDomElement &element);
0037 
0038 }
0039 }
0040 
0041 #endif