test: Add DisplayAction method in test-stk-menu
authorPhilippe Nunes <philippe.nunes@linux.intel.com>
Wed, 30 Mar 2011 10:27:44 +0000 (12:27 +0200)
committerDenis Kenzior <denkenz@gmail.com>
Wed, 30 Mar 2011 17:07:49 +0000 (12:07 -0500)
test/test-stk-menu

index 639fe77..1fde700 100755 (executable)
@@ -198,6 +198,16 @@ class StkAgent(dbus.service.Object):
                print "Text: %s" % (text)
                print "Icon: %d" % (icon)
 
+       @dbus.service.method("org.ofono.SimToolkitAgent",
+                                       in_signature="sy", out_signature="")
+       def DisplayAction(self, text, icon):
+               print "Text: (%s)" % (text)
+               print "Icon: (%d)" % (icon)
+               key = raw_input("Press 't' to terminate the session ")
+
+               if key == 't':
+                       raise EndSession("User wishes to terminate session")
+
 def property_changed(name, value):
        print "SimToolKit property: %s changed to '%s'" % (name, value)