---
 test/test-stk-menu |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/test/test-stk-menu b/test/test-stk-menu
index 916a527..db3f8b7 100755
--- a/test/test-stk-menu
+++ b/test/test-stk-menu
@@ -134,6 +134,42 @@ class StkAgent(dbus.service.Object):
                        return False
 
        @dbus.service.method("org.ofono.SimToolkitAgent",
+                               in_signature="", out_signature="iyyyyyi")
+       def RequestTime(self):
+               print "Time should be in format: year, month, day, hour, 
minute, second[, timezone]"
+               userin = raw_input("Enter Time (t, b, time):")
+
+               if userin == 'b':
+                       raise GoBack("User wishes to go back");
+               elif userin == 't':
+                       raise EndSession("User wishes to terminate session");
+               else:
+                       time = userin.split(',')
+
+                       if len(time) != 6 and len(time) != 7:
+                               raise GoBack("The input time is invalid");
+
+                       if len(time) == 6:
+                               timezone = -48;
+                       else:
+                               timezone = int(time[6])
+
+                       return int(time[0]), int(time[1]), int(time[2]), 
int(time[3]), int(time[4]), int(time[5]), timezone
+
+       @dbus.service.method("org.ofono.SimToolkitAgent",
+                               in_signature="", out_signature="s")
+       def RequestLanguage(self):
+               print "Follow ISO 639-1 to input language, that is, a pair of 
alpha-numeric characters"
+               userin = raw_input("Enter Language (t, b):")
+
+               if userin == 'b':
+                       raise GoBack("User wishes to go back");
+               elif userin == 't':
+                       raise EndSession("User wishes to terminate session");
+               else:
+                       return userin
+
+       @dbus.service.method("org.ofono.SimToolkitAgent",
                                        in_signature="", out_signature="")
        def Cancel(self):
                print "Cancel"
-- 
1.7.2.3

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to