Gio.DBusObject

g GObject.GInterface GObject.GInterface Gio.DBusObject Gio.DBusObject GObject.GInterface->Gio.DBusObject

Implementations:

Gio.DBusObjectProxy, Gio.DBusObjectSkeleton

Methods

get_interface (interface_name)

get_interfaces ()

get_object_path ()

Virtual Methods

do_get_interface (interface_name)

do_get_interfaces ()

do_get_object_path ()

do_interface_added (interface_)

do_interface_removed (interface_)

Properties

None

Signals

Name

Short Description

interface-added

Emitted when interface is added to object.

interface-removed

Emitted when interface is removed from object.

Fields

None

Class Details

class Gio.DBusObject
Bases:

GObject.GInterface

Structure:

Gio.DBusObjectIface

The GDBusObject type is the base type for D-Bus objects on both the service side (see [class`Gio`.DBusObjectSkeleton]) and the client side (see [class`Gio`.DBusObjectProxy]). It is essentially just a container of interfaces.

get_interface(interface_name)[source]
Parameters:

interface_name (str) – A D-Bus interface name.

Returns:

None if not found, otherwise a Gio.DBusInterface that must be freed with GObject.Object.unref().

Return type:

Gio.DBusInterface or None

Gets the D-Bus interface with name interface_name associated with self, if any.

New in version 2.30.

get_interfaces()[source]
Returns:

A list of Gio.DBusInterface instances. The returned list must be freed by g_list_free() after each element has been freed with GObject.Object.unref().

Return type:

[Gio.DBusInterface]

Gets the D-Bus interfaces associated with self.

New in version 2.30.

get_object_path()[source]
Returns:

A string owned by self. Do not free.

Return type:

str

Gets the object path for self.

New in version 2.30.

do_get_interface(interface_name) virtual
Parameters:

interface_name (str) – A D-Bus interface name.

Returns:

None if not found, otherwise a Gio.DBusInterface that must be freed with GObject.Object.unref().

Return type:

Gio.DBusInterface or None

Gets the D-Bus interface with name interface_name associated with object, if any.

New in version 2.30.

do_get_interfaces() virtual
Returns:

A list of Gio.DBusInterface instances. The returned list must be freed by g_list_free() after each element has been freed with GObject.Object.unref().

Return type:

[Gio.DBusInterface]

Gets the D-Bus interfaces associated with object.

New in version 2.30.

do_get_object_path() virtual
Returns:

A string owned by object. Do not free.

Return type:

str

Gets the object path for object.

New in version 2.30.

do_interface_added(interface_) virtual
Parameters:

interface (Gio.DBusInterface) –

Signal handler for the Gio.DBusObject ::interface-added signal.

do_interface_removed(interface_) virtual
Parameters:

interface (Gio.DBusInterface) –

Signal handler for the Gio.DBusObject ::interface-removed signal.

Signal Details

Gio.DBusObject.signals.interface_added(d_bus_object, interface)
Signal Name:

interface-added

Flags:

RUN_LAST

Parameters:

Emitted when interface is added to object.

New in version 2.30.

Gio.DBusObject.signals.interface_removed(d_bus_object, interface)
Signal Name:

interface-removed

Flags:

RUN_LAST

Parameters:

Emitted when interface is removed from object.

New in version 2.30.