1 | /* |
2 | SPDX-FileCopyrightText: 2010 Tobias Koenig <tokoe@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.0-or-later |
5 | */ |
6 | |
7 | #ifndef KDAV_DAVUTILS_P_H |
8 | #define KDAV_DAVUTILS_P_H |
9 | |
10 | #include "enums.h" |
11 | |
12 | #include <QDomElement> |
13 | |
14 | namespace KDAV |
15 | { |
16 | namespace Utils |
17 | { |
18 | /** |
19 | * Returns the first child element of @p parent that has the given @p tagName and is part of the @p namespaceUri. |
20 | */ |
21 | Q_REQUIRED_RESULT QDomElement firstChildElementNS(const QDomElement &parent, const QString &namespaceUri, const QString &tagName); |
22 | |
23 | /** |
24 | * Returns the next sibling element of @p element that has the given @p tagName and is part of the @p namespaceUri. |
25 | */ |
26 | Q_REQUIRED_RESULT QDomElement nextSiblingElementNS(const QDomElement &element, const QString &namespaceUri, const QString &tagName); |
27 | |
28 | /** |
29 | * Extracts privileges from @p element. The <privilege/> tags are expected to be first level children of @p element. |
30 | */ |
31 | Q_REQUIRED_RESULT Privileges (const QDomElement &element); |
32 | |
33 | /** |
34 | * Parses a single <privilege/> tag and returns the final Privileges. |
35 | */ |
36 | Q_REQUIRED_RESULT Privileges parsePrivilege(const QDomElement &element); |
37 | |
38 | } |
39 | } |
40 | |
41 | #endif |
42 | |