Skip to content

Gio.DBusObjectSkeleton

class — extends GObject.Object, DBusObject

A GDBusObjectSkeleton instance is essentially a group of D-Bus interfaces. The set of exported interfaces on the object may be dynamic and change at runtime.

This type is intended to be used with DBusObjectManager.

Constructors

new

@classmethod
def new(cls, object_path: str) -> DBusObjectSkeleton

Creates a new DBusObjectSkeleton.

Parameters:

  • object_path — An object path.

Methods

add_interface

def add_interface(self, interface_: DBusInterfaceSkeleton) -> None

Adds interface_ to object.

If object already contains a DBusInterfaceSkeleton with the same interface name, it is removed before interface_ is added.

Note that object takes its own reference on interface_ and holds it until removed.

Parameters:

flush

def flush(self) -> None

This method simply calls DBusInterfaceSkeleton.flush on all interfaces belonging to object. See that method for when flushing is useful.

remove_interface

def remove_interface(self, interface_: DBusInterfaceSkeleton) -> None

Removes interface_ from object.

Parameters:

remove_interface_by_name

def remove_interface_by_name(self, interface_name: str) -> None

Removes the DBusInterface with interface_name from object.

If no D-Bus interface of the given interface exists, this function does nothing.

Parameters:

  • interface_name — A D-Bus interface name.

set_object_path

def set_object_path(self, object_path: str) -> None

Sets the object path for object.

Parameters:

  • object_path — A valid D-Bus object path.

Virtual methods

do_authorize_method

def do_authorize_method(self, interface_: DBusInterfaceSkeleton, invocation: DBusMethodInvocation) -> bool

Signal class handler for the DBusObjectSkeleton::authorize-method signal.

Properties

g_object_path

g_object_path: str  # read/write

The object path where the object is exported.

Signals

authorize-method

def on_authorize_method(self, interface: DBusInterfaceSkeleton, invocation: DBusMethodInvocation) -> bool: ...

Emitted when a method is invoked by a remote caller and used to determine if the method call is authorized.

This signal is like DBusInterfaceSkeleton's DBusInterfaceSkeleton::g-authorize-method signal, except that it is for the enclosing object.

The default class handler just returns True.