Gio.DBusNodeInfo

Fields

Name Type Access Description
annotations [Gio.DBusAnnotationInfo] r/w A pointer to a None-terminated array of pointers to Gio.DBusAnnotationInfo structures or None if there are no annotations.
interfaces [Gio.DBusInterfaceInfo] r/w A pointer to a None-terminated array of pointers to Gio.DBusInterfaceInfo structures or None if there are no interfaces.
nodes [Gio.DBusNodeInfo] r/w A pointer to a None-terminated array of pointers to Gio.DBusNodeInfo structures or None if there are no nodes.
path str r/w 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 int r/w The reference count or -1 if statically allocated.

Methods

class new_for_xml (xml_data)
  generate_xml (indent, string_builder)
  lookup_interface (name)
  ref ()
  unref ()

Details

class Gio.DBusNodeInfo

Information about nodes in a remote object hierarchy.

New in version 2.26.

classmethod new_for_xml(xml_data)[source]
Parameters:xml_data (str) – Valid D-Bus introspection XML.
Raises:GLib.Error
Returns:A Gio.DBusNodeInfo structure or None if error is set. Free with Gio.DBusNodeInfo.unref().
Return type:Gio.DBusNodeInfo

Parses xml_data and returns a Gio.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.

New in version 2.26.

generate_xml(indent, string_builder)[source]
Parameters:

Appends an XML representation of self (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.

New in version 2.26.

lookup_interface(name)[source]
Parameters:name (str) – A D-Bus interface name.
Returns:A Gio.DBusInterfaceInfo or None if not found. Do not free, it is owned by self.
Return type:Gio.DBusInterfaceInfo

Looks up information about an interface.

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

New in version 2.26.

ref()[source]
Returns:The same self.
Return type:Gio.DBusNodeInfo

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

New in version 2.26.

unref()[source]

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

New in version 2.26.