summaryrefslogtreecommitdiff
path: root/test/simple-agent
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz-von@nokia.com>2010-09-02 13:44:05 +0300
committerLuiz Augusto von Dentz <luiz.dentz-von@nokia.com>2010-09-02 13:44:05 +0300
commit1a1c9456fdc5f60b0f9edd88243c179bc41e1318 (patch)
treea841bf175b4297132732d365e25d24dd0d04b1c0 /test/simple-agent
parent16a1efb43dc63651e601345862130f90ba200348 (diff)
downloadbluez-1a1c9456fdc5f60b0f9edd88243c179bc41e1318.tar.gz
Make simple-agent to ask user to authorize mode changes
Diffstat (limited to 'test/simple-agent')
-rwxr-xr-xtest/simple-agent4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/simple-agent b/test/simple-agent
index d569829e9..f2cc3dde9 100755
--- a/test/simple-agent
+++ b/test/simple-agent
@@ -63,6 +63,10 @@ class Agent(dbus.service.Object):
in_signature="s", out_signature="")
def ConfirmModeChange(self, mode):
print "ConfirmModeChange (%s)" % (mode)
+ authorize = raw_input("Authorize mode change (yes/no): ")
+ if (authorize == "yes"):
+ return
+ raise Rejected("Mode change by user")
@dbus.service.method("org.bluez.Agent",
in_signature="", out_signature="")