7 manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
8 "org.moblin.connman.Manager")
10 properties = manager.GetProperties()
12 def print_properties(key, value):
14 interface = "org.moblin.connman.Profile"
15 elif key == "Devices":
16 interface = "org.moblin.connman.Device"
17 elif key == "Connections":
18 interface = "org.moblin.connman.Connection"
25 obj = dbus.Interface(bus.get_object("org.moblin.connman", path),
28 properties = obj.GetProperties()
30 for key in properties.keys():
34 if key in ["Powered", "Scanning", "Connected",
35 "Available", "Remember", "Default"]:
36 if properties[key] == dbus.Boolean(1):
40 elif key in ["Strength", "Priority"]:
41 val = int(properties[key])
43 val = str(properties[key])
45 print " %s = %s" % (key, val)
47 if "Networks" in properties.keys():
49 for path in properties["Networks"]:
51 list = list + val[val.rfind("/") + 1:] + " "
52 print " Networks = [ %s]" % (list)
54 for key in properties.keys():
55 if key in ["Profiles", "Devices", "Connections"]:
56 print_properties(key, properties[key])
57 elif key in ["OfflineMode"]:
59 if properties[key] == dbus.Boolean(1):
65 print " %s" % (properties[key])