summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-11-21 11:34:28 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-11-21 11:34:28 +0100
commitc6786d2581be3c67f47050fb78248cd22aa83b7a (patch)
tree5b5d94374a165e2f57e035ae57b67c6badf1d3bd /test
parent0c561f77956654c654f14daea35e90ad0ba20164 (diff)
Add support for pairable option
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-adapter15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test-adapter b/test/test-adapter
index 44cd97bf..a0249010 100755
--- a/test/test-adapter
+++ b/test/test-adapter
@@ -18,6 +18,7 @@ if (len(sys.argv) < 2):
print " name [name]"
print " mode [mode]"
print " requestmode <mode>"
+ print " pairable [on/off]"
print " discoverabletimeout [timeout]"
print " periodicdiscovery [on/off]"
sys.exit(1)
@@ -50,6 +51,20 @@ if (sys.argv[1] == "requestmode"):
adapter.RequestMode(sys.argv[2])
sys.exit(0)
+if (sys.argv[1] == "pairable"):
+ if (len(sys.argv) < 3):
+ properties = adapter.GetProperties()
+ print properties["Pairable"]
+ else:
+ if (sys.argv[2] == "on"):
+ value = dbus.Boolean(1)
+ elif (sys.argv[2] == "off"):
+ value = dbus.Boolean(0)
+ else:
+ value = dbus.Boolean(sys.argv[2])
+ adapter.SetProperty("Pairable", value)
+ sys.exit(0)
+
if (sys.argv[1] == "discoverabletimeout"):
if (len(sys.argv) < 3):
properties = adapter.GetProperties()