Gio.DBusInterfaceInfo

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.

methods

[Gio.DBusMethodInfo]

r/w

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

name

str

r/w

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

properties

[Gio.DBusPropertyInfo]

r/w

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

ref_count

int

r/w

The reference count or -1 if statically allocated.

signals

[Gio.DBusSignalInfo]

r/w

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

Methods

cache_build ()

cache_release ()

generate_xml (indent, string_builder)

lookup_method (name)

lookup_property (name)

lookup_signal (name)

ref ()

unref ()

Details

class Gio.DBusInterfaceInfo

Information about a D-Bus interface.

New in version 2.26.

cache_build()[source]

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

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

Note that self cannot be modified until Gio.DBusInterfaceInfo.cache_release() is called.

New in version 2.30.

cache_release()[source]

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

New in version 2.30.

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_method(name)[source]
Parameters:

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

Returns:

A Gio.DBusMethodInfo or None if not found. Do not free, it is owned by self.

Return type:

Gio.DBusMethodInfo or None

Looks up information about a method.

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

New in version 2.26.

lookup_property(name)[source]
Parameters:

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

Returns:

A Gio.DBusPropertyInfo or None if not found. Do not free, it is owned by self.

Return type:

Gio.DBusPropertyInfo or None

Looks up information about a property.

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

New in version 2.26.

lookup_signal(name)[source]
Parameters:

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

Returns:

A Gio.DBusSignalInfo or None if not found. Do not free, it is owned by self.

Return type:

Gio.DBusSignalInfo or None

Looks up information about a signal.

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

New in version 2.26.

ref()[source]
Returns:

The same self.

Return type:

Gio.DBusInterfaceInfo

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.