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"
19 elif key == "Services":
20 interface = "org.moblin.connman.Service"
27 obj = dbus.Interface(bus.get_object("org.moblin.connman", path),
30 properties = obj.GetProperties()
32 for key in properties.keys():
33 if key in ["Networks", "Services"]:
36 if key in ["Powered", "Scanning", "Connected",
37 "Available", "Remember", "Default"]:
38 if properties[key] == dbus.Boolean(1):
42 elif key in ["Strength", "Priority"]:
43 val = int(properties[key])
45 val = str(properties[key])
47 print " %s = %s" % (key, val)
49 if "Networks" in properties.keys():
51 for path in properties["Networks"]:
53 list = list + val[val.rfind("/") + 1:] + " "
54 print " Networks = [ %s]" % (list)
55 if "Services" in properties.keys():
57 for path in properties["Services"]:
59 list = list + val[val.rfind("/") + 1:] + " "
60 print " Services = [ %s]" % (list)
61 if "Technologies" in properties.keys():
63 for val in properties["Technologies"]:
64 list = list + val + " "
65 print " Technologies = [ %s]" % (list)
67 for key in properties.keys():
68 if key in ["Profiles", "Devices", "Connections", "Services"]:
69 print_properties(key, properties[key])
70 elif key in ["Technologies", "EnabledTechnologies"]:
73 for val in properties[key]:
74 list = list + val + " "
75 print " [ %s]" % (list)
76 elif key in ["OfflineMode"]:
78 if properties[key] == dbus.Boolean(1):
84 print " %s" % (properties[key])