48 #include <QtXml/qdom.h> 49 #include <QtCore/qmap.h> 50 #include <QtCore/qvariant.h> 51 #include <QtCore/qtextstream.h> 56 #ifdef QDBUS_PARSER_DEBUG 57 # define qDBusParserError qWarning 59 # define qDBusParserError if (true) {} else qDebug 69 for (
int i = 0; i < list.
count(); ++i)
79 qDBusParserError(
"Invalid D-BUS annotation '%s' found while parsing introspection",
84 retval.
insert(name, value);
95 for (
int i = 0; i < list.
count(); ++i)
109 qDBusParserError(
"Invalid D-BUS type signature '%s' found while parsing introspection",
121 : m_service(service), m_path(path)
143 for (
int i = 0; i < interfaceList.
count(); ++i)
150 qDBusParserError(
"Invalid D-BUS interface name '%s' found while parsing introspection",
156 ifaceData->
name = ifaceName;
168 for (
int j = 0; j < list.
count(); ++j)
175 qDBusParserError(
"Invalid D-BUS member name '%s' found in interface '%s' while parsing introspection",
194 for (
int j = 0; j < list.
count(); ++j)
201 qDBusParserError(
"Invalid D-BUS member name '%s' found in interface '%s' while parsing introspection",
219 for (
int j = 0; j < list.
count(); ++j)
226 qDBusParserError(
"Invalid D-BUS member name '%s' found in interface '%s' while parsing introspection",
234 propertyData.
name = propertyName;
240 qDBusParserError(
"Invalid D-BUS type signature '%s' found in property '%s.%s' while parsing introspection",
253 qDBusParserError(
"Invalid D-BUS property access '%s' found in property '%s.%s' while parsing introspection",
288 for (
int i = 0; i < objects.
count(); ++i) {
294 qDBusParserError(
"Invalid D-BUS object path '%s/%s' found while parsing introspection",
303 for (
int i = 0; i < interfaceList.
count(); ++i) {
309 qDBusParserError(
"Invalid D-BUS interface name '%s' found while parsing introspection",
347 for (
int i = 0; i < objects.
count(); ++i) {
364 objAbsName += objName;
QString path
The object's path on the service.
QStringList childObjects
The list of child object names in this object.
QDomElement firstChildElement(const QString &tagName=QString()) const
Returns the first child element with tag name tagName if tagName is non-empty; otherwise returns the ...
QStringList interfaces
The list of interface names in this object.
static QDBusIntrospection::Annotations parseAnnotations(const QDomElement &elem)
Information about one object on the bus.
Objects childObjectData
A map of object paths and their data.
#define QT_END_NAMESPACE
This macro expands to.
QString name
The method's name.
static QDBusIntrospection::Arguments parseArgs(const QDomElement &elem, const QLatin1String &direction, bool acceptEmpty)
bool isValidObjectPath(const QString &path)
Returns true if path is valid object path.
QString name
The property's name.
Arguments outputArgs
A list of the signal's arguments.
QDBusXmlParser(const QString &service, const QString &path, const QString &xmlData)
Information about one property.
Annotations annotations
The annotations associated with the method.
One argument to a D-Bus method or signal.
QMap< Key, T >::iterator insert(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
QDBusIntrospection::Interfaces interfaces() const
Signals signals_
The signals available in this interface.
QSharedDataPointer< QDBusIntrospection::ObjectTree > objectTree() const
QDomNode firstChild() const
Returns the first child of the node.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
Interfaces interfaceData
A map of interfaces and their names.
The QString class provides a Unicode character string.
Properties properties
The properties available in this interface.
bool isValidInterfaceName(const QString &ifaceName)
Returns true if this is ifaceName is a valid interface name.
Arguments outputArgs
A list of the method's output arguments (i.
bool setContent(const QByteArray &text, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0)
QDomNodeList elementsByTagName(const QString &tagname) const
Returns a QDomNodeList containing all descendants of this element named tagname encountered during a ...
QString name
The interface's name.
void append(const T &t)
Inserts value at the end of the list.
The QDomDocument class represents an XML document.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QDomElement toElement() const
Converts a QDomNode into a QDomElement.
Arguments inputArgs
A list of the method's input arguments.
int access(const char *, int)
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Annotations annotations
The annotations associated with the signal.
bool isValidMemberName(const QString &memberName)
Returns true if memberName is a valid member name.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
bool isValidSingleSignature(const QString &signature)
Returns true if signature is a valid D-Bus type signature for exactly one full type.
QList< Key > keys() const
Returns a list containing all the keys in the map in ascending order.
Complete information about one object node and its descendency.
QString type
The argument type.
Information about one signal.
QString service
The object's service name.
Annotations annotations
The annotations associated with the interface.
QString introspection
The XML document fragment describing this interface.
QString attribute(const QString &name, const QString &defValue=QString()) const
Returns the attribute called name.
bool isNull() const
Returns true if this string is null; otherwise returns false.
QString name
The argument name.
QString & append(QChar c)
The QTextStream class provides a convenient interface for reading and writing text.
QString type
The property's type.
Methods methods
The methods available in this interface.
bool hasAttribute(const QString &name) const
Returns true if this element has an attribute called name; otherwise returns false.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
int count() const
This function is provided for Qt API consistency.
QSharedDataPointer< QDBusIntrospection::Object > object() const
Information about one interface on the bus.
static QByteArray methodName(const char *signature, int nameLength)
Makes a deep copy of the first nameLength characters of the given method signature and returns the co...
bool isNull() const
Returns true if this node is null (i.e.
The QDomNodeList class is a list of QDomNode objects.
QDomNode item(int index) const
Returns the node at position index.
QString name
The signal's name.
Access access
The property's access rights.
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
Annotations annotations
The annotations associated with the property.
#define qPrintable(string)
Information about one method.
The QDomElement class represents one element in the DOM tree.
void save(QTextStream &, int) const
Writes the XML representation of the node and all its children to the stream str. ...
The QSharedDataPointer class represents a pointer to an implicitly shared object. ...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
QString introspection
The XML document fragment describing this object, its interfaces and sub-objects at the time of the p...
Qt::LayoutDirection direction