blob: b1ff1be1971df16e67ce05ae181e522fb4be7e45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
.. This is not done via automodule because it cannot be imported in
.. Python 3.
dbus.gobject\_service module
----------------------------
.. py:module:: gobject_service
This module is only available when using Python 2, and is deprecated.
.. py:class:: ExportedGObjectType(cls, name, bases, dct)
A metaclass which inherits from both GObjectMeta and
`dbus.service.InterfaceType`. Used as the metaclass for
`ExportedGObject`.
.. py:class:: ExportedGObject(self, conn=None, object_path=None, **kwargs)
A GObject which is exported on the D-Bus.
Because GObject and `dbus.service.Object` both have custom metaclasses,
the naive approach using simple multiple inheritance won't work. This
class has `ExportedGObjectType` as its metaclass, which is sufficient
to make it work correctly.
:param dbus.connection.Connection conn:
The D-Bus connection or bus
:param str object_path:
The object path at which to register this object.
:keyword dbus.service.BusName bus_name:
A bus name to be held on behalf of this object, or None.
:keyword dict gobject_properties:
GObject properties to be set on the constructed object.
Any unrecognised keyword arguments will also be interpreted
as GObject properties.
|