~hdlorean-db/hdlorean/db

« back to all changes in this revision

Viewing changes to src/gui/DBus/POT4/receiver.py

  • Committer: Winterfuse
  • Date: 2008-04-05 18:15:03 UTC
  • mfrom: (49.37.3 db)
  • Revision ID: adrianbn@gmail.com-20080405181503-bn68mbaepy0brlvy
Merged with db

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
2
 
# -*- coding: utf-8 -*-
3
 
import dbus, dbus.glib
4
 
import gobject
5
 
bus = dbus.SessionBus()
6
 
server = dbus.Interface(bus.get_object('com.hdlorean.Server2', '/'),'com.hdlorean.Interface2')
7
 
class Receiver:
8
 
        
9
 
        def manejador(sender=None):
10
 
                #print "got signal from %r" % sender
11
 
                print "señal recibida"          
12
 
                return True
13
 
 
14
 
 
15
 
 
16
 
e = Receiver()
17
 
bus.add_signal_receiver(e.manejador,'pruebasig','com.hdlorean.Interface2','com.hdlorean.Server2','/')
18
 
loop = gobject.MainLoop()
19
 
loop.run()