test: Add ConfirmOpenChannel to test-stk-menu

This commit is contained in:
Philippe Nunes 2011-04-08 18:33:30 +02:00 committed by Denis Kenzior
parent 8cb9e8ed7b
commit 1077902694
1 changed files with 14 additions and 0 deletions

View File

@ -208,6 +208,20 @@ class StkAgent(dbus.service.Object):
if key == 't':
raise EndSession("User wishes to terminate session")
@dbus.service.method("org.ofono.SimToolkitAgent",
in_signature="sy", out_signature="b")
def ConfirmOpenChannel(self, info, icon):
print "Open channel confirmation: (%s)" % (info)
print "Icon: (%d)" % (icon)
key = raw_input("Enter Confirmation (t, y, n):")
if key == 't':
raise EndSession("User wishes to terminate session");
elif key == 'y':
return True
else:
return False
def property_changed(name, value):
print "SimToolKit property: %s changed to '%s'" % (name, value)