summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-11-21 11:37:12 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-11-21 11:37:12 +0100
commitf85760b45531dda34f493e3839535255920c397b (patch)
tree3814a3ab00d6f4572a2334f860aa2169fdba1387
parentc6786d2581be3c67f47050fb78248cd22aa83b7a (diff)
Add support for discoverable option
-rwxr-xr-xtest/test-adapter15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test-adapter b/test/test-adapter
index a0249010..4b53540e 100755
--- a/test/test-adapter
+++ b/test/test-adapter
@@ -19,6 +19,7 @@ if (len(sys.argv) < 2):
print " mode [mode]"
print " requestmode <mode>"
print " pairable [on/off]"
+ print " discoverable [on/off]"
print " discoverabletimeout [timeout]"
print " periodicdiscovery [on/off]"
sys.exit(1)
@@ -65,6 +66,20 @@ if (sys.argv[1] == "pairable"):
adapter.SetProperty("Pairable", value)
sys.exit(0)
+if (sys.argv[1] == "discoverable"):
+ if (len(sys.argv) < 3):
+ properties = adapter.GetProperties()
+ print properties["Discoverable"]
+ 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("Discoverable", value)
+ sys.exit(0)
+
if (sys.argv[1] == "discoverabletimeout"):
if (len(sys.argv) < 3):
properties = adapter.GetProperties()