Skip to contentSkip to conversation

test-stk-menu: Extend to support DisplayAbortableActionInfo

PATCH In review Philippe Nunes 1 participant 1 message Mar 28, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 test-stk-menu: Extend to support DisplayAbortableActionInfo

---
 test/test-stk-menu |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
test/test-stk-menu +10 -0
index 639fe77..6c1774f 100755
@@ -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 DisplayAbortableActionInfo(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)
 
Signature · 1 line
1.7.1