From d071758739ad4961b30259772f4cc1066cea369e Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 19 Jul 2009 21:44:06 +0200 Subject: Add option for offline mode to test script --- test/test-connman | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') 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 " print " disable " + print " offlinemode [on|off]" print "" print " dev " print " dev 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() -- cgit v1.2.3