Open Source Telephony
 help / color / mirror / Atom feed
From: Yang Gu <yang.gu@intel.com>
To: ofono@ofono.org
Subject: [PATCH 3/3] test-stk: Add provide local info
Date: Thu, 25 Nov 2010 20:29:02 +0800	[thread overview]
Message-ID: <1290688142-14726-4-git-send-email-yang.gu@intel.com> (raw)
In-Reply-To: <1290688142-14726-1-git-send-email-yang.gu@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]

---
 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


  parent reply	other threads:[~2010-11-25 12:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25 12:28 [PATCH 0/3] Patch Description Yang Gu
2010-11-25 12:29 ` [PATCH 1/3] network: Use bit as size instead of byte Yang Gu
2010-11-26 20:02   ` Denis Kenzior
2010-11-25 12:29 ` [PATCH 2/3] stk: Handle provide local info proactive command Yang Gu
2010-11-25 23:36   ` andrzej zaborowski
2010-11-26 20:49   ` Denis Kenzior
2010-11-29  2:47     ` Gu, Yang
2010-11-29 13:47       ` Denis Kenzior
2010-11-25 12:29 ` Yang Gu [this message]
2010-11-25 23:25 ` [PATCH 0/3] Patch Description andrzej zaborowski
2010-11-26  3:29   ` Gu, Yang
2010-11-26 20:44   ` Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1290688142-14726-4-git-send-email-yang.gu@intel.com \
    --to=yang.gu@intel.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox