diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-12 23:12:23 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-12 23:12:23 +0100 |
commit | 58a1be7d56108ec65f95f522fbd7c4ee6bff7f86 (patch) | |
tree | a6e536f921029d59f12018fc1cfcd915b8811e02 /test | |
parent | a1953b25126c327c1bbfeb351b8649c1c1f82c0a (diff) | |
download | connman-58a1be7d56108ec65f95f522fbd7c4ee6bff7f86.tar.gz connman-58a1be7d56108ec65f95f522fbd7c4ee6bff7f86.tar.bz2 connman-58a1be7d56108ec65f95f522fbd7c4ee6bff7f86.zip |
Print more detailed information about the signal
Diffstat (limited to 'test')
-rwxr-xr-x | test/monitor-connman | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/monitor-connman b/test/monitor-connman index 86c7d42d..2c4b9bdd 100755 --- a/test/monitor-connman +++ b/test/monitor-connman @@ -5,19 +5,20 @@ import gobject import dbus import dbus.mainloop.glib -def property_changed(name, value, path): - print "[%s] %s = %s" % (path, name, str(value)) +def property_changed(name, value, path, interface): + iface = interface[interface.rfind(".") + 1:] + print "{%s} [%s] %s = %s" % (iface, path, name, str(value)) if __name__ == '__main__': dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() - manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"), - "org.moblin.connman.Manager") bus.add_signal_receiver(property_changed, + bus_name="org.moblin.connman", signal_name = "PropertyChanged", - path_keyword="path") + path_keyword="path", + interface_keyword="interface") mainloop = gobject.MainLoop() mainloop.run() |