Skip to content

Gio.DBusNodeInfo

record (struct)

Information about nodes in a remote object hierarchy.

Constructors

new_for_xml

@classmethod
def new_for_xml(cls, 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-based parser that only accepts a subset of valid XML documents.

Parameters:

  • xml_data — Valid D-Bus introspection XML.

Methods

generate_xml

def generate_xml(self, indent: int, string_builder: GLib.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.

Parameters:

  • indent — Indentation level.
  • string_builder — A GLib.String to to append XML data to.

lookup_interface

def lookup_interface(self, name: str) -> DBusInterfaceInfo | None

Looks up information about an interface.

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

Parameters:

  • name — A D-Bus interface name.

ref

def ref(self) -> DBusNodeInfo

If info is statically allocated does nothing. Otherwise increases the reference count.

unref

def unref(self) -> None

If info is statically allocated, does nothing. Otherwise decreases the reference count of info. When its reference count drops to 0, the memory used is freed.

Properties

ref_count

ref_count: int  # read/write

path

path: str  # read/write

interfaces

interfaces: list[DBusInterfaceInfo]  # read/write

nodes

nodes: list[DBusNodeInfo]  # read/write

annotations

annotations: list[DBusAnnotationInfo]  # read/write