Skip to content

Gio.DBusInterfaceInfo

record (struct)

Information about a D-Bus interface.

Methods

cache_build

def cache_build(self) -> None

Builds a lookup-cache to speed up DBusInterfaceInfo.lookup_method, DBusInterfaceInfo.lookup_signal and DBusInterfaceInfo.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 DBusInterfaceInfo.cache_release is called.

cache_release

def cache_release(self) -> None

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

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_method

def lookup_method(self, name: str) -> DBusMethodInfo | None

Looks up information about a method.

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

Parameters:

  • name — A D-Bus method name (typically in CamelCase)

lookup_property

def lookup_property(self, name: str) -> DBusPropertyInfo | None

Looks up information about a property.

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

Parameters:

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

lookup_signal

def lookup_signal(self, name: str) -> DBusSignalInfo | None

Looks up information about a signal.

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

Parameters:

  • name — A D-Bus signal name (typically in CamelCase)

ref

def ref(self) -> DBusInterfaceInfo

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

name

name: str  # read/write

methods

methods: list[DBusMethodInfo]  # read/write

signals

signals: list[DBusSignalInfo]  # read/write

properties

properties: list[DBusPropertyInfo]  # read/write

annotations

annotations: list[DBusAnnotationInfo]  # read/write