DBusNodeInfo#

Added in version 2.26.

class DBusNodeInfo(*args, **kwargs)#

Information about nodes in a remote object hierarchy.

Constructors#

class DBusNodeInfo
classmethod new_for_xml(xml_data: str) DBusNodeInfo#

Parses xml_data and returns a DBusNodeInfo representing the data.

The introspection XML must contain exactly one top-level <node> element.

Note that this routine is using a [GMarkup][glib-Simple-XML-Subset-Parser.description]-based parser that only accepts a subset of valid XML documents.

Added in version 2.26.

Parameters:

xml_data – Valid D-Bus introspection XML.

Methods#

class DBusNodeInfo
generate_xml(indent: int, string_builder: String) None#

Appends an XML representation of info (and its children) to string_builder.

This function is typically used for generating introspection XML documents at run-time for handling the org.freedesktop.DBus.Introspectable.Introspect method.

Added in version 2.26.

Parameters:
  • indent – Indentation level.

  • string_builder – A String to to append XML data to.

lookup_interface(name: str) DBusInterfaceInfo | None#

Looks up information about an interface.

The cost of this function is O(n) in number of interfaces.

Added in version 2.26.

Parameters:

name – A D-Bus interface name.

Fields#

class DBusNodeInfo
annotations#

A pointer to a None-terminated array of pointers to DBusAnnotationInfo structures or None if there are no annotations.

interfaces#

A pointer to a None-terminated array of pointers to DBusInterfaceInfo structures or None if there are no interfaces.

nodes#

A pointer to a None-terminated array of pointers to DBusNodeInfo structures or None if there are no nodes.

path#

The path of the node or None if omitted. Note that this may be a relative path. See the D-Bus specification for more details.

ref_count#

The reference count or -1 if statically allocated.