val += " }"
return val
-def property_changed(name, value, path, interface):
- iface = interface[interface.rfind(".") + 1:]
- ipath = path[path.rfind("/") + 1:]
- if iface not in ["Service"]:
- return
+def property_changed(name, value, path):
+ service = path[path.rfind("/") + 1:]
if name in ["Profiles", "Services", "Providers", "Technologies",
"Devices", "Networks"]:
val = "["
val = int(value)
else:
val = str(value)
- print "{%s} [%s] %s = %s" % (iface, ipath, name, val)
+ print "[%s] %s = %s" % (service, name, val)
if __name__ == '__main__':
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
bus = dbus.SystemBus()
bus.add_signal_receiver(property_changed,
- bus_name="org.moblin.connman",
- signal_name = "PropertyChanged",
- path_keyword="path",
- interface_keyword="interface")
+ bus_name="org.moblin.connman",
+ dbus_interface="org.moblin.connman.Service",
+ signal_name = "PropertyChanged",
+ path_keyword="path")
mainloop = gobject.MainLoop()
mainloop.run()