summaryrefslogtreecommitdiff
path: root/test/test-connman
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-connman')
-rwxr-xr-xtest/test-connman14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test-connman b/test/test-connman
index bbe47bc0..dff1a257 100755
--- a/test/test-connman
+++ b/test/test-connman
@@ -21,6 +21,7 @@ if len(sys.argv) < 2:
print " scan [type]"
print " enable <type>"
print " disable <type>"
+ print " offlinemode [on|off]"
print ""
print " dev <interface>"
print " dev <interface> scan"
@@ -255,6 +256,19 @@ elif sys.argv[1] == "disable":
else:
manager.DisableTechnology("")
+elif sys.argv[1] in ["offlinemode", "flightmode"]:
+ if len(sys.argv) > 2:
+ if sys.argv[2] == "on":
+ active = dbus.Boolean(1)
+ elif sys.argv[2] == "off":
+ active = dbus.Boolean(0)
+ else:
+ active = dbus.Boolean(sys.argv[2])
+ manager.SetProperty("OfflineMode", active)
+ else:
+ properties = manager.GetProperties()
+ print "Offline mode is %s" % (properties["OfflineMode"])
+
elif sys.argv[1] == "dev":
properties = manager.GetProperties()