9 # Create a service on the bus
10 service
= dbus
.Service("com.burtonini.dbus.SignalService", bus
)
12 # Define a D-BUS object
13 class SignalObject(dbus
.Object
):
14 def __init__(self
, service
):
15 dbus
.Object
.__init
__(self
, "/", [], service
)
17 # Create an instance of the object, which is part of the service
18 signal_object
= SignalObject(service
)
21 signal_object
.broadcast_signal("com.burtonini.dbus.Signal", "Ping")
25 # Call send_ping every second to send the signal
26 gtk
.timeout_add(1000, send_ping
)