Mercurial > libervia-backend
diff src/bridge/DBus.py @ 284:c25371424090
dbus bridge: fixed introspection for dynamically added methods and signals
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 04 Feb 2011 00:13:41 +0100 |
parents | c1ad04586edf |
children | 15c8916317d0 |
line wrap: on
line diff
--- a/src/bridge/DBus.py Thu Feb 03 18:06:25 2011 +0100 +++ b/src/bridge/DBus.py Fri Feb 04 00:13:41 2011 +0100 @@ -342,6 +342,9 @@ method = locals()[name] setattr(DbusObject, name, dbus.service.method( const_INT_PREFIX+int_suffix, in_signature=in_sign, out_signature=out_sign)(method)) + function = getattr(self, name) + func_table = self._dbus_class_table[self.__class__.__module__ + '.' + self.__class__.__name__][function._dbus_interface] + func_table[function.__name__] = function #Needed for introspection def addSignal(self, name, int_suffix, signature): """Dynamically add a signal to Dbus Bridge""" @@ -353,6 +356,9 @@ signal = locals()[name] setattr(DbusObject, name, dbus.service.signal( const_INT_PREFIX+int_suffix, signature=signature)(signal)) + function = getattr(self, name) + func_table = self._dbus_class_table[self.__class__.__module__ + '.' + self.__class__.__name__][function._dbus_interface] + func_table[function.__name__] = function #Needed for introspection class DBusBridge(Bridge): def __init__(self):