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)
62 for key in properties.keys():
63 if key in ["Profiles", "Devices", "Connections", "Services"]:
64 print_properties(key, properties[key])
65 elif key in ["AvailableTechnologies", "EnabledTechnologies",
66 "ConnectedTechnologies",
67 "AvailableDebugs", "EnabledDebugs"]:
70 for val in properties[key]:
71 list = list + val + " "
72 print " [ %s]" % (list)
73 elif key in ["OfflineMode"]:
75 if properties[key] == dbus.Boolean(1):
79 elif key in ["DefaultTechnology"]:
81 if properties[key] == "":
84 print " %s" % (properties[key])
87 print " %s" % (properties[key])