Skip to contentSkip to conversation

test-stk-menu: Extend to support DisplayAction method

PATCH Applied Philippe Nunes 1 participant 1 message Mar 30, 2011

lore
Share & tools
lore
#0 lore raw

PATCH v2 4/4 test-stk-menu: Extend to support DisplayAction method

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