Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdbusxmlparser_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QDBUSXMLPARSER_P_H
5#define QDBUSXMLPARSER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of the QLibrary class. This header file may change from
13// version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtDBus/private/qtdbusglobal_p.h>
19#include <QtCore/qloggingcategory.h>
20#include <QtCore/qmap.h>
21#include <QtCore/qxmlstream.h>
23
24#ifndef QT_NO_DBUS
25
27
29
30
34{
35 QString m_service;
36 QString m_path;
37 QSharedDataPointer<QDBusIntrospection::Object> m_object;
38 std::unique_ptr<QDBusIntrospection::Interface> m_currentInterface;
40 QXmlStreamReader m_xml;
41 QDBusIntrospection::SourceLocation m_currentLocation;
43
44public:
45 QDBusXmlParser(const QString &service, const QString &path, const QString &xmlData,
46 QDBusIntrospection::DiagnosticsReporter *reporter = nullptr);
47
48 inline QDBusIntrospection::Interfaces interfaces() const { return m_interfaces; }
49 inline QSharedDataPointer<QDBusIntrospection::Object> object() const { return m_object; }
50
51private:
52 void readNode(int nodeLevel);
53 void readInterface();
54 bool parseSignal(QDBusIntrospection::Signal &signalData);
55 bool parseMethod(QDBusIntrospection::Method &methodData);
56 bool parseProperty(QDBusIntrospection::Property &propertyData);
57 bool parseAnnotation(QDBusIntrospection::Annotations &annotations,
58 bool interfaceAnnotation = false);
59 bool parseArg(const QXmlStreamAttributes &attributes, QDBusIntrospection::Argument &argData);
60 bool readNextStartElement();
61 void updateCurrentLocation();
62};
63
65
66#endif // QT_NO_DBUS
67#endif
QDBusIntrospection::Interfaces interfaces() const
QSharedDataPointer< QDBusIntrospection::Object > object() const
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLsizei const GLchar *const * path