comparison src/bridge/bridge_constructor/dbus_core_template.py @ 337:4402ac630712

bridge: async callback managed in bridge_constructor + misc - the new flag async make the method asynchronous - new method asyncConnect (connect which return when the user is connected) - setMicroblogAccess added to DBus frontend
author Goffi <goffi@goffi.org>
date Thu, 26 May 2011 16:47:09 +0200
parents e044d1dc37d1
children eb9d33ba4e36
comparison
equal deleted inserted replaced
336:953536246d9d 337:4402ac630712
106 106
107 def addSignal(self, name, int_suffix, signature, doc={}): 107 def addSignal(self, name, int_suffix, signature, doc={}):
108 """Dynamically add a signal to Dbus Bridge""" 108 """Dynamically add a signal to Dbus Bridge"""
109 attributes = ', '.join(self.__attributes(signature)) 109 attributes = ', '.join(self.__attributes(signature))
110 110
111 code = compile ('def '+name+' (self,'+attributes+'): debug ("'+name+' signal")', '<DBus bridge>','exec') 111 #code = compile ('def '+name+' (self,'+attributes+'): debug ("'+name+' signal")', '<DBus bridge>','exec') #XXX: the debug is too annoying with xmllog
112 code = compile ('def '+name+' (self,'+attributes+'): pass', '<DBus bridge>','exec')
112 exec (code) 113 exec (code)
113 signal = locals()[name] 114 signal = locals()[name]
114 setattr(DbusObject, name, dbus.service.signal( 115 setattr(DbusObject, name, dbus.service.signal(
115 const_INT_PREFIX+int_suffix, signature=signature)(signal)) 116 const_INT_PREFIX+int_suffix, signature=signature)(signal))
116 function = getattr(self, name) 117 function = getattr(self, name)