test: Add ConfirmOpenChannel to test-stk-menu
authorPhilippe Nunes <philippe.nunes@linux.intel.com>
Fri, 8 Apr 2011 16:33:30 +0000 (18:33 +0200)
committerDenis Kenzior <denkenz@gmail.com>
Tue, 12 Apr 2011 04:28:26 +0000 (23:28 -0500)
test/test-stk-menu

index 1fde700..a9f92e8 100755 (executable)
@@ -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)