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 == "Services":
18 interface = "org.moblin.connman.Service"
19 elif key == "Providers":
20 interface = "org.moblin.connman.Provider"
21 elif key == "Technologies":
22 interface = "org.moblin.connman.Technology"
29 obj = dbus.Interface(bus.get_object("org.moblin.connman", path),
32 properties = obj.GetProperties()
34 for key in properties.keys():
35 if key in ["Devices", "Networks", "Services",
36 "Providers", "Technologies"]:
39 if key in ["Powered", "Scanning", "Connected",
40 "Available", "Remember", "Default"]:
41 if properties[key] == dbus.Boolean(1):
45 elif key in ["Strength", "Priority"]:
46 val = int(properties[key])
48 val = str(properties[key])
50 print " %s = %s" % (key, val)
52 if "Devices" in properties.keys():
54 for path in properties["Devices"]:
56 list = list + val[val.rfind("/") + 1:] + " "
57 print " Devices = [ %s]" % (list)
58 if "Networks" in properties.keys():
60 for path in properties["Networks"]:
62 list = list + val[val.rfind("/") + 1:] + " "
63 print " Networks = [ %s]" % (list)
64 if "Services" in properties.keys():
66 for path in properties["Services"]:
68 list = list + val[val.rfind("/") + 1:] + " "
69 print " Services = [ %s]" % (list)
70 if "Providers" in properties.keys():
72 for path in properties["Providers"]:
74 list = list + val[val.rfind("/") + 1:] + " "
75 print " Providers = [ %s]" % (list)
78 for key in properties.keys():
79 if key in ["Profiles", "Devices", "Services", "Providers",
81 print_properties(key, properties[key])
82 elif key in ["AvailableTechnologies", "EnabledTechnologies",
83 "ConnectedTechnologies",
84 "AvailableDebugs", "EnabledDebugs"]:
87 for val in properties[key]:
88 list = list + val + " "
89 print " [ %s]" % (list)
90 elif key in ["OfflineMode"]:
92 if properties[key] == dbus.Boolean(1):
96 elif key in ["DefaultTechnology"]:
98 if properties[key] == "":
101 print " %s" % (properties[key])
104 print " %s" % (properties[key])