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
QDBusIntrospection Class Reference

\inmodule QtDBus More...

#include <qdbusintrospection_p.h>

+ Collaboration diagram for QDBusIntrospection:

Classes

struct  Annotation
 
class  Argument
 \inmodule QtDBus More...
 
class  DiagnosticsReporter
 
class  Interface
 \inmodule QtDBus More...
 
class  Method
 \inmodule QtDBus More...
 
class  Object
 \inmodule QtDBus More...
 
class  Property
 \inmodule QtDBus More...
 
class  Signal
 \inmodule QtDBus More...
 
struct  SourceLocation
 

Public Types

typedef QMap< QString, AnnotationAnnotations
 \variable QDBusIntrospection::Object::service The object's service name.
 
typedef QList< ArgumentArguments
 Contains a list of arguments to either a Method or a Signal.
 
typedef QMultiMap< QString, MethodMethods
 Contains a QMap of methods and their names.
 
typedef QMultiMap< QString, SignalSignals
 Contains a QMap of signals and their names.
 
typedef QMap< QString, PropertyProperties
 Contains a QMap of properties and their names.
 
typedef QMap< QString, QSharedDataPointer< Interface > > Interfaces
 Contains a QMap of interfaces and their names.
 
typedef QMap< QString, QSharedDataPointer< ObjectTree > > Objects
 Contains a QMap of objects and their paths relative to their immediate parent.
 

Static Public Member Functions

static Interface parseInterface (const QString &xml, DiagnosticsReporter *reporter=nullptr)
 Parses the XML document fragment (given by xml) containing one interface.
 
static Interfaces parseInterfaces (const QString &xml, DiagnosticsReporter *reporter=nullptr)
 Parses the XML document fragment (given by xml) containing several interfaces.
 
static Object parseObject (const QString &xml, const QString &service=QString(), const QString &path=QString(), DiagnosticsReporter *reporter=nullptr)
 Parses the XML document fragment (given by xml) containing one object, found at the service service and path path.
 

Detailed Description

\inmodule QtDBus

Information about introspected objects and interfaces on D-Bus.

This class provides structures and methods for parsing the XML introspection data for D-Bus. Normally, you don't have to use the methods provided here: QDBusInterface and QDBusObject will do that for you.

But they may prove useful if the XML data was obtained through other means (like parsing a file).

Definition at line 29 of file qdbusintrospection_p.h.

Member Typedef Documentation

◆ Annotations

\variable QDBusIntrospection::Object::service The object's service name.

See also
parseObject()

\variable QDBusIntrospection::Object::path The object's path on the service. This is an absolute path.

See also
parseObject()

\variable QDBusIntrospection::Object::interfaces The list of interface names in this object.

\variable QDBusIntrospection::Object::childObjects The list of child object names in this object. Note that this is a relative name, not an absolute path. To obtain the absolute path, concatenate with \l {QDBusIntrospection::Object::path}{path}.

Contains a QMap of an annotation pair. The annotation's name is stored in the QMap key and must be unique. The annotation's value is stored in the QMap's value and is arbitrary.

Definition at line 43 of file qdbusintrospection_p.h.

◆ Arguments

Contains a list of arguments to either a Method or a Signal.

The arguments' order is important.

Definition at line 44 of file qdbusintrospection_p.h.

◆ Interfaces

Contains a QMap of interfaces and their names.

Each interface has a unique name.

Definition at line 48 of file qdbusintrospection_p.h.

◆ Methods

Contains a QMap of methods and their names.

The method's name is stored in the map's key and is not necessarily unique. The order in which multiple methods with the same name are stored in this map is undefined.

Definition at line 45 of file qdbusintrospection_p.h.

◆ Objects

Contains a QMap of objects and their paths relative to their immediate parent.

Definition at line 49 of file qdbusintrospection_p.h.

◆ Properties

Contains a QMap of properties and their names.

Each property must have a unique name.

Definition at line 47 of file qdbusintrospection_p.h.

◆ Signals

Contains a QMap of signals and their names.

The signal's name is stored in the map's key and is not necessarily unique. The order in which multiple signals with the same name are stored in this map is undefined.

Definition at line 46 of file qdbusintrospection_p.h.

Member Function Documentation

◆ parseInterface()

QDBusIntrospection::Interface QDBusIntrospection::parseInterface ( const QString & xml,
DiagnosticsReporter * reporter = nullptr )
static

Parses the XML document fragment (given by xml) containing one interface.

The first element tag in this XML data must be either <node> or <interface>. If it is <node>, then the <interface> tag must be a child tag of the <node> one.

If there are multiple interfaces in this XML data, it is undefined which one will be returned.

Definition at line 303 of file qdbusintrospection.cpp.

References parseInterfaces(), and xml.

+ Here is the call graph for this function:

◆ parseInterfaces()

QDBusIntrospection::Interfaces QDBusIntrospection::parseInterfaces ( const QString & xml,
DiagnosticsReporter * reporter = nullptr )
static

Parses the XML document fragment (given by xml) containing several interfaces.

If the first element tag in this document fragment is <node>, the interfaces parsed will be those found as child elements of the <node> tag.

Definition at line 321 of file qdbusintrospection.cpp.

References QDBusXmlParser::interfaces(), and xml.

Referenced by QDBusMetaObject::createMetaObject(), and parseInterface().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseObject()

QDBusIntrospection::Object QDBusIntrospection::parseObject ( const QString & xml,
const QString & service = QString(),
const QString & path = QString(),
DiagnosticsReporter * reporter = nullptr )
static

Parses the XML document fragment (given by xml) containing one object, found at the service service and path path.

The first element tag in this document must be <node>. If that tag does not contain a name attribute, the path argument will be used to determine the path of this object node.

This function does not parse the interfaces contained in the node, nor sub-object's contents. It will only list their names.

Definition at line 340 of file qdbusintrospection.cpp.

References QDBusXmlParser::object(), and xml.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: