3.5 <GDBusNodeInfo>

Structure: <GDBusNodeInfo>

Information about nodes in a remote object hierarchy.

Fields

ref-count

The reference count or -1 if statically allocated.

path

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

interfaces

A pointer to a #f-terminated array of pointers to <GDBusInterfaceInfo> structures or #f if there are no interfaces.

nodes

A pointer to a #f-terminated array of pointers to <GDBusNodeInfo> structures or #f if there are no nodes.

annotations

A pointer to a #f-terminated array of pointers to <GDBusAnnotationInfo> structures or #f if there are no annotations.

Procedures

Method: dbus-node-info:generate-xml self indent string-builder
Method: generate-xml self indent string-builder

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.

self

Passed: a <GDBusNodeInfo>.

A <GDBusNodeInfo>.

indent

Passed: an unsigned 32-bit integer.

Indentation level.

string-builder

Passed: a <GString>.

A <GString> to to append XML data to.

Method: dbus-node-info:lookup-interface self name ⇒ %return
Method: lookup-interface self name ⇒ %return

Looks up information about an interface.

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

self

Passed: a <GDBusNodeInfo>.

A <GDBusNodeInfo>.

name

Passed: a string.

A D-Bus interface name.

%return

Returned: a <GDBusInterfaceInfo>, or #f.

A <GDBusInterfaceInfo> or #f if not found. Do not free, it is owned by self.

Procedure: dbus-node-info:new-for-xml xml-data ⇒ %return

Parses xml-data and returns a <GDBusNodeInfo> 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.

xml-data

Passed: a string.

Valid D-Bus introspection XML.

%return

Returned: a <GDBusNodeInfo>.

A <GDBusNodeInfo> structure or #f if error is set. Free with dbus-node-info:unref.

Method: dbus-node-info:ref self ⇒ %return
Method: ref self ⇒ %return

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

self

Passed: a <GDBusNodeInfo>.

A <GDBusNodeInfo>

%return

Returned: a <GDBusNodeInfo>.

The same self.

Method: dbus-node-info:unref self
Method: unref self

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.

self

Passed: a <GDBusNodeInfo>.

A <GDBusNodeInfo>.