This email list is read-only.  Emails sent to this list will be discarded
----------------------------------
 test/monitor-connman |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 58a1be7d56108ec65f95f522fbd7c4ee6bff7f86
Author: Marcel Holtmann <[email protected]>
Date:   Fri Dec 12 23:12:23 2008 +0100

    Print more detailed information about the signal


Diff in this email is a maximum of 400 lines.
diff --git a/test/monitor-connman b/test/monitor-connman
index 86c7d42..2c4b9bd 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()
_______________________________________________
Commits mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/commits

Reply via email to