6 import dbus.mainloop.glib
8 def property_changed(name, value):
9 if name in ["Profiles", "Services", "Technologies"]:
12 val = val + " " + i[i.rfind("/") + 1:]
14 elif name in ["AvailableTechnologies", "EnabledTechnologies",
15 "ConnectedTechnologies",
16 "AvailableDebugs", "EnabledDebugs"]:
21 elif name in ["Strength", "Priority"]:
25 print "%s = %s" % (name, val)
27 if __name__ == '__main__':
28 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
30 bus = dbus.SystemBus()
32 bus.add_signal_receiver(property_changed,
33 bus_name="net.connman",
34 dbus_interface="net.connman.Manager",
35 signal_name = "PropertyChanged")
37 mainloop = gobject.MainLoop()