DBusInterfaceInfo

Added in version 2.26.

class DBusInterfaceInfo(*args, **kwargs)

Information about a D-Bus interface.

Methods

class DBusInterfaceInfo
cache_build() None

Builds a lookup-cache to speed up lookup_method(), lookup_signal() and lookup_property().

If this has already been called with info, the existing cache is used and its use count is increased.

Note that info cannot be modified until cache_release() is called.

Added in version 2.30.

cache_release() None

Decrements the usage count for the cache for info built by cache_build() (if any) and frees the resources used by the cache if the usage count drops to zero.

Added in version 2.30.

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_method(name: str) DBusMethodInfo | None

Looks up information about a method.

The cost of this function is O(n) in number of methods unless cache_build() has been used on info.

Added in version 2.26.

Parameters:

name – A D-Bus method name (typically in CamelCase)

lookup_property(name: str) DBusPropertyInfo | None

Looks up information about a property.

The cost of this function is O(n) in number of properties unless cache_build() has been used on info.

Added in version 2.26.

Parameters:

name – A D-Bus property name (typically in CamelCase).

lookup_signal(name: str) DBusSignalInfo | None

Looks up information about a signal.

The cost of this function is O(n) in number of signals unless cache_build() has been used on info.

Added in version 2.26.

Parameters:

name – A D-Bus signal name (typically in CamelCase)

Fields

class DBusInterfaceInfo
annotations

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

methods

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

name

The name of the D-Bus interface, e.g. “org.freedesktop.DBus.Properties”.

properties

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

ref_count

The reference count or -1 if statically allocated.

signals

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