All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/19] stkutil: Free default text for get input parser
@ 2010-05-10 10:38 Yang Gu
  2010-05-10 10:38 ` [PATCH 02/19] test-stkutil: Add unit test " Yang Gu
                   ` (18 more replies)
  0 siblings, 19 replies; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 src/stkutil.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/stkutil.c b/src/stkutil.c
index 50fa4c1..09fbec9 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -2149,6 +2149,7 @@ static gboolean parse_get_inkey(struct stk_command *command,
 static void destroy_get_input(struct stk_command *command)
 {
 	g_free(command->get_input.text);
+	g_free(command->get_input.default_text);
 }
 
 static gboolean parse_get_input(struct stk_command *command,
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 02/19] test-stkutil: Add unit test for get input parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-11 19:25   ` Denis Kenzior
  2010-05-10 10:38 ` [PATCH 03/19] stk: Unify variable names to use abbreviation Yang Gu
                   ` (17 subsequent siblings)
  18 siblings, 1 reply; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 unit/test-stkutil.c | 1412 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 1392 insertions(+), 20 deletions(-)

diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 82f2a1c..abb82c9 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -60,9 +60,23 @@ static void check_duration(const struct stk_duration *command,
 	g_assert(command->interval == test->interval);
 }
 
+/* Defined in TS 102.223 Section 8.11 */
+static void check_response_length(const struct stk_response_length *command,
+					const struct stk_response_length *test)
+{
+	g_assert(command->min == test->min);
+	g_assert(command->max == test->max);
+}
+
 /* Defined in TS 102.223 Section 8.15 */
 static inline void check_text(const char *command, const char *test)
 {
+	if (test == NULL) {
+		g_assert(command == NULL);
+		return;
+	}
+
+	g_assert(command != NULL);
 	g_assert(g_str_equal(command, test));
 }
 
@@ -1284,11 +1298,12 @@ struct get_input_test {
 	const unsigned char *pdu;
 	unsigned int pdu_len;
 	unsigned char qualifier;
-	const char *expected;
-	unsigned char min;
-	unsigned char max;
-	unsigned char icon_qualifier;
-	unsigned char icon_id;
+	char *text;
+	struct stk_response_length response_length;
+	char *default_text;
+	struct stk_icon_id icon_id;
+	struct stk_text_attribute text_attribute;
+	struct stk_frame_id frame_id;
 };
 
 static unsigned char get_input_111[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
@@ -1298,13 +1313,1262 @@ static unsigned char get_input_111[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
 						0x32, 0x33, 0x34, 0x35, 0x91,
 						0x02, 0x05, 0x05 };
 
+static unsigned char get_input_121[] = { 0xD0, 0x1A, 0x81, 0x03, 0x01, 0x23,
+						0x08, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0B, 0x00, 0x45, 0x37,
+						0xBD, 0x2C, 0x07, 0xD9, 0x6E,
+						0xAA, 0xD1, 0x0A, 0x91, 0x02,
+						0x05, 0x05 };
+
+static unsigned char get_input_131[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x01, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x41,
+						0x62, 0x43, 0x64, 0x45, 0x91,
+						0x02, 0x05, 0x05 };
+
+static unsigned char get_input_141[] = { 0xD0, 0x27, 0x81, 0x03, 0x01, 0x23,
+						0x04, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x18, 0x04, 0x50, 0x61,
+						0x73, 0x73, 0x77, 0x6F, 0x72,
+						0x64, 0x20, 0x31, 0x3C, 0x53,
+						0x45, 0x4E, 0x44, 0x3E, 0x32,
+						0x33, 0x34, 0x35, 0x36, 0x37,
+						0x38, 0x91, 0x02, 0x04, 0x08 };
+
+static unsigned char get_input_151[] = { 0xD0, 0x24, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x15, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x2E, 0x2E, 0x39, 0x2C, 0x30,
+						0x2E, 0x2E, 0x39, 0x2C, 0x30,
+						0x28, 0x31, 0x29, 0x91, 0x02,
+						0x01, 0x14 };
+
+static unsigned char get_input_161[] = { 0xD0, 0x1E, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0F, 0x04, 0x3C, 0x47,
+						0x4F, 0x2D, 0x42, 0x41, 0x43,
+						0x4B, 0x57, 0x41, 0x52, 0x44,
+						0x53, 0x3E, 0x91, 0x02, 0x00,
+						0x08 };
+
+static unsigned char get_input_171[] = { 0xD0, 0x17, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x08, 0x04, 0x3C, 0x41,
+						0x42, 0x4F, 0x52, 0x54, 0x3E,
+						0x91, 0x02, 0x00, 0x08 };
+
+static unsigned char get_input_181[] = { 0xD0, 0x81, 0xB1, 0x81, 0x03, 0x01,
+						0x23, 0x00, 0x82, 0x02, 0x81,
+						0x82, 0x8D, 0x81, 0xA1, 0x04,
+						0x2A, 0x2A, 0x2A, 0x31, 0x31,
+						0x31, 0x31, 0x31, 0x31, 0x31,
+						0x31, 0x31, 0x31, 0x23, 0x23,
+						0x23, 0x2A, 0x2A, 0x2A, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x23,
+						0x23, 0x23, 0x2A, 0x2A, 0x2A,
+						0x33, 0x33, 0x33, 0x33, 0x33,
+						0x33, 0x33, 0x33, 0x33, 0x33,
+						0x23, 0x23, 0x23, 0x2A, 0x2A,
+						0x2A, 0x34, 0x34, 0x34, 0x34,
+						0x34, 0x34, 0x34, 0x34, 0x34,
+						0x34, 0x23, 0x23, 0x23, 0x2A,
+						0x2A, 0x2A, 0x35, 0x35, 0x35,
+						0x35, 0x35, 0x35, 0x35, 0x35,
+						0x35, 0x35, 0x23, 0x23, 0x23,
+						0x2A, 0x2A, 0x2A, 0x36, 0x36,
+						0x36, 0x36, 0x36, 0x36, 0x36,
+						0x36, 0x36, 0x36, 0x23, 0x23,
+						0x23, 0x2A, 0x2A, 0x2A, 0x37,
+						0x37, 0x37, 0x37, 0x37, 0x37,
+						0x37, 0x37, 0x37, 0x37, 0x23,
+						0x23, 0x23, 0x2A, 0x2A, 0x2A,
+						0x38, 0x38, 0x38, 0x38, 0x38,
+						0x38, 0x38, 0x38, 0x38, 0x38,
+						0x23, 0x23, 0x23, 0x2A, 0x2A,
+						0x2A, 0x39, 0x39, 0x39, 0x39,
+						0x39, 0x39, 0x39, 0x39, 0x39,
+						0x39, 0x23, 0x23, 0x23, 0x2A,
+						0x2A, 0x2A, 0x30, 0x30, 0x30,
+						0x30, 0x30, 0x30, 0x30, 0x30,
+						0x30, 0x30, 0x23, 0x23, 0x23,
+						0x91, 0x02, 0xA0, 0xA0 };
+
+static unsigned char get_input_191[] = { 0xD0, 0x16, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x07, 0x04, 0x3C, 0x53,
+						0x45, 0x4E, 0x44, 0x3E, 0x91,
+						0x02, 0x00, 0x01 };
+
+static unsigned char get_input_1101[] = { 0xD0, 0x0F, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x00, 0x91, 0x02, 0x01,
+						0x05 };
+
+static unsigned char get_input_211[] = { 0xD0, 0x1A, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0B, 0x04, 0x3C, 0x54,
+						0x49, 0x4D, 0x45, 0x2D, 0x4F,
+						0x55, 0x54, 0x3E, 0x91, 0x02,
+						0x00, 0x0A };
+
+static unsigned char get_input_311[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x23,
+						0x01, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x19, 0x08, 0x04, 0x17,
+						0x04, 0x14, 0x04, 0x20, 0x04,
+						0x10, 0x04, 0x12, 0x04, 0x21,
+						0x04, 0x22, 0x04, 0x12, 0x04,
+						0x23, 0x04, 0x19, 0x04, 0x22,
+						0x04, 0x15, 0x91, 0x02, 0x05,
+						0x05 };
+
+static unsigned char get_input_321[] = { 0xD0, 0x81, 0x9D, 0x81, 0x03, 0x01,
+						0x23, 0x01, 0x82, 0x02, 0x81,
+						0x82, 0x8D, 0x81, 0x8D, 0x08,
+						0x04, 0x17, 0x04, 0x14, 0x04,
+						0x20, 0x04, 0x10, 0x04, 0x12,
+						0x04, 0x21, 0x04, 0x22, 0x04,
+						0x12, 0x04, 0x23, 0x04, 0x19,
+						0x04, 0x22, 0x04, 0x15, 0x04,
+						0x17, 0x04, 0x14, 0x04, 0x20,
+						0x04, 0x10, 0x04, 0x12, 0x04,
+						0x21, 0x04, 0x22, 0x04, 0x12,
+						0x04, 0x23, 0x04, 0x19, 0x04,
+						0x22, 0x04, 0x15, 0x04, 0x17,
+						0x04, 0x14, 0x04, 0x20, 0x04,
+						0x10, 0x04, 0x12, 0x04, 0x21,
+						0x04, 0x22, 0x04, 0x12, 0x04,
+						0x23, 0x04, 0x19, 0x04, 0x22,
+						0x04, 0x15, 0x04, 0x17, 0x04,
+						0x14, 0x04, 0x20, 0x04, 0x10,
+						0x04, 0x12, 0x04, 0x21, 0x04,
+						0x22, 0x04, 0x12, 0x04, 0x23,
+						0x04, 0x19, 0x04, 0x22, 0x04,
+						0x15, 0x04, 0x17, 0x04, 0x14,
+						0x04, 0x20, 0x04, 0x10, 0x04,
+						0x12, 0x04, 0x21, 0x04, 0x22,
+						0x04, 0x12, 0x04, 0x23, 0x04,
+						0x19, 0x04, 0x22, 0x04, 0x15,
+						0x04, 0x17, 0x04, 0x14, 0x04,
+						0x20, 0x04, 0x10, 0x04, 0x12,
+						0x04, 0x21, 0x04, 0x22, 0x04,
+						0x12, 0x04, 0x23, 0x04, 0x19,
+						0x91, 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_411[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x03, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x48,
+						0x65, 0x6C, 0x6C, 0x6F, 0x91,
+						0x02, 0x0C, 0x0C };
+
+static unsigned char get_input_421[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x03, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x48,
+						0x65, 0x6C, 0x6C, 0x6F, 0x91,
+						0x02, 0x05, 0xFF };
+
+static unsigned char get_input_511[] = { 0xD0, 0x23, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x32, 0x33, 0x34, 0x35, 0x91,
+						0x02, 0x05, 0x05, 0x17, 0x06,
+						0x04, 0x31, 0x32, 0x33, 0x34,
+						0x35 };
+
+static unsigned char get_input_521[] = { 0xD0, 0x81, 0xBA, 0x81, 0x03, 0x01,
+						0x23, 0x00, 0x82, 0x02, 0x81,
+						0x82, 0x8D, 0x07, 0x04, 0x45,
+						0x6E, 0x74, 0x65, 0x72, 0x3A,
+						0x91, 0x02, 0xA0, 0xA0, 0x17,
+						0x81, 0xA1, 0x04, 0x2A, 0x2A,
+						0x2A, 0x31, 0x31, 0x31, 0x31,
+						0x31, 0x31, 0x31, 0x31, 0x31,
+						0x31, 0x23, 0x23, 0x23, 0x2A,
+						0x2A, 0x2A, 0x32, 0x32, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x32,
+						0x32, 0x32, 0x23, 0x23, 0x23,
+						0x2A, 0x2A, 0x2A, 0x33, 0x33,
+						0x33, 0x33, 0x33, 0x33, 0x33,
+						0x33, 0x33, 0x33, 0x23, 0x23,
+						0x23, 0x2A, 0x2A, 0x2A, 0x34,
+						0x34, 0x34, 0x34, 0x34, 0x34,
+						0x34, 0x34, 0x34, 0x34, 0x23,
+						0x23, 0x23, 0x2A, 0x2A, 0x2A,
+						0x35, 0x35, 0x35, 0x35, 0x35,
+						0x35, 0x35, 0x35, 0x35, 0x35,
+						0x23, 0x23, 0x23, 0x2A, 0x2A,
+						0x2A, 0x36, 0x36, 0x36, 0x36,
+						0x36, 0x36, 0x36, 0x36, 0x36,
+						0x36, 0x23, 0x23, 0x23, 0x2A,
+						0x2A, 0x2A, 0x37, 0x37, 0x37,
+						0x37, 0x37, 0x37, 0x37, 0x37,
+						0x37, 0x37, 0x23, 0x23, 0x23,
+						0x2A, 0x2A, 0x2A, 0x38, 0x38,
+						0x38, 0x38, 0x38, 0x38, 0x38,
+						0x38, 0x38, 0x38, 0x23, 0x23,
+						0x23, 0x2A, 0x2A, 0x2A, 0x39,
+						0x39, 0x39, 0x39, 0x39, 0x39,
+						0x39, 0x39, 0x39, 0x39, 0x23,
+						0x23, 0x23, 0x2A, 0x2A, 0x2A,
+						0x30, 0x30, 0x30, 0x30, 0x30,
+						0x30, 0x30, 0x30, 0x30, 0x30,
+						0x23, 0x23, 0x23 };
+
+static unsigned char get_input_611[] = { 0xD0, 0x1D, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0A, 0x04, 0x3C, 0x4E,
+						0x4F, 0x2D, 0x49, 0x43, 0x4F,
+						0x4E, 0x3E, 0x91, 0x02, 0x00,
+						0x0A, 0x1E, 0x02, 0x00, 0x01 };
+
+static unsigned char get_input_621[] = { 0xD0, 0x20, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0D, 0x04, 0x3C, 0x42,
+						0x41, 0x53, 0x49, 0x43, 0x2D,
+						0x49, 0x43, 0x4F, 0x4E, 0x3E,
+						0x91, 0x02, 0x00, 0x0A, 0x1E,
+						0x02, 0x01, 0x01 };
+
+static unsigned char get_input_631[] = { 0xD0, 0x1D, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0A, 0x04, 0x3C, 0x4E,
+						0x4F, 0x2D, 0x49, 0x43, 0x4F,
+						0x4E, 0x3E, 0x91, 0x02, 0x00,
+						0x0A, 0x1E, 0x02, 0x00, 0x02 };
+
+static unsigned char get_input_641[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0E, 0x04, 0x3C, 0x43,
+						0x4F, 0x4C, 0x4F, 0x55, 0x52,
+						0x2D, 0x49, 0x43, 0x4F, 0x4E,
+						0x3E, 0x91, 0x02, 0x00, 0x0A,
+						0x1E, 0x02, 0x01, 0x02 };
+
+static unsigned char get_input_711[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x80, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x32, 0x33, 0x34, 0x35, 0x91,
+						0x02, 0x05, 0x05 };
+
+static unsigned char get_input_811[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x32, 0x33, 0x34, 0x35, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_812[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x91,
+						0x02, 0x05, 0x05 };
+
+static unsigned char get_input_821[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x32, 0x33, 0x34, 0x35, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x01, 0xB4 };
+
+static unsigned char get_input_822[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x91,
+						0x02, 0x05, 0x05 };
+
+static unsigned char get_input_831[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x32, 0x33, 0x34, 0x35, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x02, 0xB4 };
+
+static unsigned char get_input_832[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x91,
+						0x02, 0x05, 0x05 };
+
+static unsigned char get_input_841[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x32, 0x33, 0x34, 0x35, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x04, 0xB4 };
+
+static unsigned char get_input_842[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_843[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x33,
+						0x33, 0x33, 0x33, 0x33, 0x91,
+						0x02, 0x05, 0x05 };
+
+static unsigned char get_input_851[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x32, 0x33, 0x34, 0x35, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x08, 0xB4 };
+
+static unsigned char get_input_852[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_853[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x33,
+						0x33, 0x33, 0x33, 0x33, 0x91,
+						0x02, 0x05, 0x05 };
+
+static unsigned char get_input_861[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x32, 0x33, 0x34, 0x35, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x10, 0xB4 };
+
+static unsigned char get_input_862[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_863[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x33,
+						0x33, 0x33, 0x33, 0x33, 0x91,
+						0x02, 0x05, 0x05 };
+
+static unsigned char get_input_871[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x32, 0x33, 0x34, 0x35, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x20, 0xB4 };
+
+static unsigned char get_input_872[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_873[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x33,
+						0x33, 0x33, 0x33, 0x33, 0x91,
+						0x02, 0x05, 0x05 };
+
+static unsigned char get_input_881[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x32, 0x33, 0x34, 0x35, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x40, 0xB4 };
+
+static unsigned char get_input_882[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_883[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x33,
+						0x33, 0x33, 0x33, 0x33, 0x91,
+						0x02, 0x05, 0x05 };
+
+static unsigned char get_input_891[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x32, 0x33, 0x34, 0x35, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x80, 0xB4 };
+
+static unsigned char get_input_892[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_893[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x33,
+						0x33, 0x33, 0x33, 0x33, 0x91,
+						0x02, 0x05, 0x05 };
+
+static unsigned char get_input_8101[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x31,
+						0x32, 0x33, 0x34, 0x35, 0x91,
+						0x02, 0x05, 0x05, 0xD0, 0x04,
+						0x00, 0x0B, 0x00, 0xB4 };
+
+static unsigned char get_input_8102[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x32,
+						0x32, 0x32, 0x32, 0x32, 0x91,
+						0x02, 0x05, 0x05 };
+
+static unsigned char get_input_911[] = { 0xD0, 0x14, 0x81, 0x03, 0x01, 0x23,
+						0x01, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x05, 0x08, 0x4F, 0x60,
+						0x59, 0x7D, 0x91, 0x02, 0x05,
+						0x05 };
+
+static unsigned char get_input_921[] = { 0xD0, 0x81, 0x9D, 0x81, 0x03, 0x01,
+						0x23, 0x01, 0x82, 0x02, 0x81,
+						0x82, 0x8D, 0x81, 0x8D, 0x08,
+						0x4F, 0x60, 0x59, 0x7D, 0x4F,
+						0x60, 0x59, 0x7D, 0x4F, 0x60,
+						0x59, 0x7D, 0x4F, 0x60, 0x59,
+						0x7D, 0x4F, 0x60, 0x59, 0x7D,
+						0x4F, 0x60, 0x59, 0x7D, 0x4F,
+						0x60, 0x59, 0x7D, 0x4F, 0x60,
+						0x59, 0x7D, 0x4F, 0x60, 0x59,
+						0x7D, 0x4F, 0x60, 0x59, 0x7D,
+						0x4F, 0x60, 0x59, 0x7D, 0x4F,
+						0x60, 0x59, 0x7D, 0x4F, 0x60,
+						0x59, 0x7D, 0x4F, 0x60, 0x59,
+						0x7D, 0x4F, 0x60, 0x59, 0x7D,
+						0x4F, 0x60, 0x59, 0x7D, 0x4F,
+						0x60, 0x59, 0x7D, 0x4F, 0x60,
+						0x59, 0x7D, 0x4F, 0x60, 0x59,
+						0x7D, 0x4F, 0x60, 0x59, 0x7D,
+						0x4F, 0x60, 0x59, 0x7D, 0x4F,
+						0x60, 0x59, 0x7D, 0x4F, 0x60,
+						0x59, 0x7D, 0x4F, 0x60, 0x59,
+						0x7D, 0x4F, 0x60, 0x59, 0x7D,
+						0x4F, 0x60, 0x59, 0x7D, 0x4F,
+						0x60, 0x59, 0x7D, 0x4F, 0x60,
+						0x59, 0x7D, 0x4F, 0x60, 0x59,
+						0x7D, 0x4F, 0x60, 0x59, 0x7D,
+						0x4F, 0x60, 0x59, 0x7D, 0x4F,
+						0x60, 0x59, 0x7D, 0x4F, 0x60,
+						0x59, 0x7D, 0x4F, 0x60, 0x59,
+						0x7D, 0x4F, 0x60, 0x59, 0x7D,
+						0x91, 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_1011[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x03, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x48,
+						0x65, 0x6C, 0x6C, 0x6F, 0x91,
+						0x02, 0x02, 0x02 };
+
+static unsigned char get_input_1021[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x03, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x48,
+						0x65, 0x6C, 0x6C, 0x6F, 0x91,
+						0x02, 0x05, 0xFF };
+
+static unsigned char get_input_1111[] = { 0xD0, 0x12, 0x81, 0x03, 0x01, 0x23,
+						0x01, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x03, 0x08, 0x30, 0xEB,
+						0x91, 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_1121[] = { 0xD0, 0x81, 0x9D, 0x81, 0x03, 0x01,
+						0x23, 0x01, 0x82, 0x02, 0x81,
+						0x82, 0x8D, 0x81, 0x8D, 0x08,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x30, 0xEB, 0x30, 0xEB, 0x30,
+						0xEB, 0x30, 0xEB, 0x30, 0xEB,
+						0x91, 0x02, 0x05, 0x05 };
+
+static unsigned char get_input_1211[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x03, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x48,
+						0x65, 0x6C, 0x6C, 0x6F, 0x91,
+						0x02, 0x02, 0x02 };
+
+static unsigned char get_input_1221[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x23,
+						0x03, 0x82, 0x02, 0x81, 0x82,
+						0x8D, 0x0C, 0x04, 0x45, 0x6E,
+						0x74, 0x65, 0x72, 0x20, 0x48,
+						0x65, 0x6C, 0x6C, 0x6F, 0x91,
+						0x02, 0x05, 0xFF };
+
 static struct get_input_test get_input_data_111 = {
 	.pdu = get_input_111,
 	.pdu_len = sizeof(get_input_111),
-	.expected = "Enter 12345",
 	.qualifier = 0x00,
-	.min = 5,
-	.max = 5
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_121 = {
+	.pdu = get_input_121,
+	.pdu_len = sizeof(get_input_121),
+	.qualifier = 0x08,
+	.text = "Enter 67*#+",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_131 = {
+	.pdu = get_input_131,
+	.pdu_len = sizeof(get_input_131),
+	.qualifier = 0x01,
+	.text = "Enter AbCdE",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_141 = {
+	.pdu = get_input_141,
+	.pdu_len = sizeof(get_input_141),
+	.qualifier = 0x04,
+	.text = "Password 1<SEND>2345678",
+	.response_length = {
+		.min = 4,
+		.max = 8
+	}
+};
+
+static struct get_input_test get_input_data_151 = {
+	.pdu = get_input_151,
+	.pdu_len = sizeof(get_input_151),
+	.qualifier = 0x00,
+	.text = "Enter 1..9,0..9,0(1)",
+	.response_length = {
+		.min = 1,
+		.max = 20
+	}
+};
+
+static struct get_input_test get_input_data_161 = {
+	.pdu = get_input_161,
+	.pdu_len = sizeof(get_input_161),
+	.qualifier = 0x00,
+	.text = "<GO-BACKWARDS>",
+	.response_length = {
+		.min = 0,
+		.max = 8
+	}
+};
+
+static struct get_input_test get_input_data_171 = {
+	.pdu = get_input_171,
+	.pdu_len = sizeof(get_input_171),
+	.qualifier = 0x00,
+	.text = "<ABORT>",
+	.response_length = {
+		.min = 0,
+		.max = 8
+	}
+};
+
+static struct get_input_test get_input_data_181 = {
+	.pdu = get_input_181,
+	.pdu_len = sizeof(get_input_181),
+	.qualifier = 0x00,
+	.text = "***1111111111###***2222222222###***3333333333###"
+		"***4444444444###***5555555555###***6666666666###"
+		"***7777777777###***8888888888###***9999999999###"
+		"***0000000000###",
+	.response_length = {
+		.min = 160,
+		.max = 160
+	}
+};
+
+static struct get_input_test get_input_data_191 = {
+	.pdu = get_input_191,
+	.pdu_len = sizeof(get_input_191),
+	.qualifier = 0x00,
+	.text = "<SEND>",
+	.response_length = {
+		.min = 0,
+		.max = 1
+	}
+};
+
+static struct get_input_test get_input_data_1101 = {
+	.pdu = get_input_1101,
+	.pdu_len = sizeof(get_input_1101),
+	.qualifier = 0x00,
+	.text = NULL,
+	.response_length = {
+		.min = 1,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_211 = {
+	.pdu = get_input_211,
+	.pdu_len = sizeof(get_input_211),
+	.qualifier = 0x00,
+	.text = "<TIME-OUT>",
+	.response_length = {
+		.min = 0,
+		.max = 10
+	}
+};
+
+static struct get_input_test get_input_data_311 = {
+	.pdu = get_input_311,
+	.pdu_len = sizeof(get_input_311),
+	.qualifier = 0x01,
+	.text = "ЗДРАВСТВУЙТЕ",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_321 = {
+	.pdu = get_input_321,
+	.pdu_len = sizeof(get_input_321),
+	.qualifier = 0x01,
+	.text = "ЗДРАВСТВУЙТЕЗДРАВСТВУЙТЕ"
+		"ЗДРАВСТВУЙТЕЗДРАВСТВУЙТЕ"
+		"ЗДРАВСТВУЙТЕЗДРАВСТВУЙ",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_411 = {
+	.pdu = get_input_411,
+	.pdu_len = sizeof(get_input_411),
+	.qualifier = 0x03,
+	.text = "Enter Hello",
+	.response_length = {
+		.min = 12,
+		.max = 12
+	}
+};
+
+static struct get_input_test get_input_data_421 = {
+	.pdu = get_input_421,
+	.pdu_len = sizeof(get_input_421),
+	.qualifier = 0x03,
+	.text = "Enter Hello",
+	.response_length = {
+		.min = 5,
+		.max = 0xFF
+	}
+};
+
+static struct get_input_test get_input_data_511 = {
+	.pdu = get_input_511,
+	.pdu_len = sizeof(get_input_511),
+	.qualifier = 0x00,
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.default_text = "12345"
+};
+
+static struct get_input_test get_input_data_521 = {
+	.pdu = get_input_521,
+	.pdu_len = sizeof(get_input_521),
+	.qualifier = 0x00,
+	.text = "Enter:",
+	.response_length = {
+		.min = 160,
+		.max = 160
+	},
+	.default_text = "***1111111111###***2222222222###***3333333333###"
+			"***4444444444###***5555555555###***6666666666###"
+			"***7777777777###***8888888888###***9999999999###"
+			"***0000000000###"
+};
+
+static struct get_input_test get_input_data_611 = {
+	.pdu = get_input_611,
+	.pdu_len = sizeof(get_input_611),
+	.qualifier = 0x00,
+	.text = "<NO-ICON>",
+	.response_length = {
+		.min = 0,
+		.max = 10
+	},
+	.icon_id = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+		.id = 0x01
+	}
+};
+
+static struct get_input_test get_input_data_621 = {
+	.pdu = get_input_621,
+	.pdu_len = sizeof(get_input_621),
+	.qualifier = 0x00,
+	.text = "<BASIC-ICON>",
+	.response_length = {
+		.min = 0,
+		.max = 10
+	},
+	.icon_id = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+		.id = 0x01
+	}
+};
+
+static struct get_input_test get_input_data_631 = {
+	.pdu = get_input_631,
+	.pdu_len = sizeof(get_input_631),
+	.qualifier = 0x00,
+	.text = "<NO-ICON>",
+	.response_length = {
+		.min = 0,
+		.max = 10
+	},
+	.icon_id = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+		.id = 0x02
+	}
+};
+
+static struct get_input_test get_input_data_641 = {
+	.pdu = get_input_641,
+	.pdu_len = sizeof(get_input_641),
+	.qualifier = 0x00,
+	.text = "<COLOUR-ICON>",
+	.response_length = {
+		.min = 0,
+		.max = 10
+	},
+	.icon_id = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+		.id = 0x02
+	}
+};
+
+static struct get_input_test get_input_data_711 = {
+	.pdu = get_input_711,
+	.pdu_len = sizeof(get_input_711),
+	.qualifier = 0x80,
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_811 = {
+	.pdu = get_input_811,
+	.pdu_len = sizeof(get_input_811),
+	.qualifier = 0x00,
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_812 = {
+	.pdu = get_input_812,
+	.pdu_len = sizeof(get_input_812),
+	.qualifier = 0x00,
+	.text = "Enter 22222",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_821 = {
+	.pdu = get_input_821,
+	.pdu_len = sizeof(get_input_821),
+	.qualifier = 0x00,
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x01, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_822 = {
+	.pdu = get_input_822,
+	.pdu_len = sizeof(get_input_822),
+	.qualifier = 0x00,
+	.text = "Enter 22222",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_831 = {
+	.pdu = get_input_831,
+	.pdu_len = sizeof(get_input_831),
+	.qualifier = 0x00,
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x02, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_832 = {
+	.pdu = get_input_832,
+	.pdu_len = sizeof(get_input_832),
+	.qualifier = 0x00,
+	.text = "Enter 22222",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_841 = {
+	.pdu = get_input_841,
+	.pdu_len = sizeof(get_input_841),
+	.qualifier = 0x00,
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x04, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_842 = {
+	.pdu = get_input_842,
+	.pdu_len = sizeof(get_input_842),
+	.qualifier = 0x00,
+	.text = "Enter 22222",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_843 = {
+	.pdu = get_input_843,
+	.pdu_len = sizeof(get_input_843),
+	.qualifier = 0x00,
+	.text = "Enter 33333",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_851 = {
+	.pdu = get_input_851,
+	.pdu_len = sizeof(get_input_851),
+	.qualifier = 0x00,
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x08, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_852 = {
+	.pdu = get_input_852,
+	.pdu_len = sizeof(get_input_852),
+	.qualifier = 0x00,
+	.text = "Enter 22222",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_853 = {
+	.pdu = get_input_853,
+	.pdu_len = sizeof(get_input_853),
+	.qualifier = 0x00,
+	.text = "Enter 33333",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_861 = {
+	.pdu = get_input_861,
+	.pdu_len = sizeof(get_input_861),
+	.qualifier = 0x00,
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x10, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_862 = {
+	.pdu = get_input_862,
+	.pdu_len = sizeof(get_input_862),
+	.qualifier = 0x00,
+	.text = "Enter 22222",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_863 = {
+	.pdu = get_input_863,
+	.pdu_len = sizeof(get_input_863),
+	.qualifier = 0x00,
+	.text = "Enter 33333",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_871 = {
+	.pdu = get_input_871,
+	.pdu_len = sizeof(get_input_871),
+	.qualifier = 0x00,
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x20, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_872 = {
+	.pdu = get_input_872,
+	.pdu_len = sizeof(get_input_872),
+	.qualifier = 0x00,
+	.text = "Enter 22222",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_873 = {
+	.pdu = get_input_873,
+	.pdu_len = sizeof(get_input_873),
+	.qualifier = 0x00,
+	.text = "Enter 33333",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_881 = {
+	.pdu = get_input_881,
+	.pdu_len = sizeof(get_input_881),
+	.qualifier = 0x00,
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x40, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_882 = {
+	.pdu = get_input_882,
+	.pdu_len = sizeof(get_input_882),
+	.qualifier = 0x00,
+	.text = "Enter 22222",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_883 = {
+	.pdu = get_input_883,
+	.pdu_len = sizeof(get_input_883),
+	.qualifier = 0x00,
+	.text = "Enter 33333",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_891 = {
+	.pdu = get_input_891,
+	.pdu_len = sizeof(get_input_891),
+	.qualifier = 0x00,
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x80, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_892 = {
+	.pdu = get_input_892,
+	.pdu_len = sizeof(get_input_892),
+	.qualifier = 0x00,
+	.text = "Enter 22222",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_893 = {
+	.pdu = get_input_893,
+	.pdu_len = sizeof(get_input_893),
+	.qualifier = 0x00,
+	.text = "Enter 33333",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_8101 = {
+	.pdu = get_input_8101,
+	.pdu_len = sizeof(get_input_8101),
+	.qualifier = 0x00,
+	.text = "Enter 12345",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	},
+	.text_attribute = {
+		.len = 4,
+		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
+	}
+};
+
+static struct get_input_test get_input_data_8102 = {
+	.pdu = get_input_8102,
+	.pdu_len = sizeof(get_input_8102),
+	.qualifier = 0x00,
+	.text = "Enter 22222",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_911 = {
+	.pdu = get_input_911,
+	.pdu_len = sizeof(get_input_911),
+	.qualifier = 0x01,
+	.text = "你好",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_921 = {
+	.pdu = get_input_921,
+	.pdu_len = sizeof(get_input_921),
+	.qualifier = 0x01,
+	.text = "你好你好你好你好你好你好你好你好你好你好"
+		"你好你好你好你好你好你好你好你好你好你好"
+		"你好你好你好你好你好你好你好你好你好你好"
+		"你好你好你好你好你好",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_1011 = {
+	.pdu = get_input_1011,
+	.pdu_len = sizeof(get_input_1011),
+	.qualifier = 0x03,
+	.text = "Enter Hello",
+	.response_length = {
+		.min = 2,
+		.max = 2
+	}
+};
+
+static struct get_input_test get_input_data_1021 = {
+	.pdu = get_input_1021,
+	.pdu_len = sizeof(get_input_1021),
+	.qualifier = 0x03,
+	.text = "Enter Hello",
+	.response_length = {
+		.min = 5,
+		.max = 0xFF
+	}
+};
+
+static struct get_input_test get_input_data_1111 = {
+	.pdu = get_input_1111,
+	.pdu_len = sizeof(get_input_1111),
+	.qualifier = 0x01,
+	.text = "ル",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_1121 = {
+	.pdu = get_input_1121,
+	.pdu_len = sizeof(get_input_1121),
+	.qualifier = 0x01,
+	.text = "ルルルルルルルルルルルルルルルルルルルル"
+		"ルルルルルルルルルルルルルルルルルルルル"
+		"ルルルルルルルルルルルルルルルルルルルル"
+		"ルルルルルルルルルル",
+	.response_length = {
+		.min = 5,
+		.max = 5
+	}
+};
+
+static struct get_input_test get_input_data_1211 = {
+	.pdu = get_input_1211,
+	.pdu_len = sizeof(get_input_1211),
+	.qualifier = 0x03,
+	.text = "Enter Hello",
+	.response_length = {
+		.min = 2,
+		.max = 2
+	}
+};
+
+static struct get_input_test get_input_data_1221 = {
+	.pdu = get_input_1221,
+	.pdu_len = sizeof(get_input_1221),
+	.qualifier = 0x03,
+	.text = "Enter Hello",
+	.response_length = {
+		.min = 5,
+		.max = 0xFF
+	}
 };
 
 /* Defined in TS 102.384 Section 27.22.4.3 */
@@ -1324,18 +2588,16 @@ static void test_get_input(gconstpointer data)
 	g_assert(command->src == STK_DEVICE_IDENTITY_TYPE_UICC);
 	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_TERMINAL);
 
-	g_assert(command->get_input.text);
-
-	g_assert(g_str_equal(test->expected, command->get_input.text));
-
-	g_assert(command->get_input.response_length.min == test->min);
-	g_assert(command->get_input.response_length.max == test->max);
-
-	if (test->icon_id > 0) {
-		g_assert(command->get_input.icon_id.id == test->icon_id);
-		g_assert(command->get_input.icon_id.qualifier ==
-				test->icon_qualifier);
-	}
+	if (test->text)
+		g_assert(command->get_input.text);
+	check_text(command->get_input.text, test->text);
+	check_response_length(&command->get_input.response_length,
+				&test->response_length);
+	check_text(command->get_input.default_text, test->default_text);
+	check_icon_id(&command->get_input.icon_id, &test->icon_id);
+	check_text_attr(&command->get_input.text_attribute,
+						&test->text_attribute);
+	check_frame_id(&command->get_input.frame_id, &test->frame_id);
 
 	stk_command_free(command);
 }
@@ -1590,6 +2852,116 @@ int main(int argc, char **argv)
 
 	g_test_add_data_func("/teststk/Get Input 1.1.1",
 				&get_input_data_111, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 1.2.1",
+				&get_input_data_121, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 1.3.1",
+				&get_input_data_131, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 1.4.1",
+				&get_input_data_141, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 1.5.1",
+				&get_input_data_151, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 1.6.1",
+				&get_input_data_161, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 1.7.1",
+				&get_input_data_171, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 1.8.1",
+				&get_input_data_181, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 1.9.1",
+				&get_input_data_191, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 1.10.1",
+				&get_input_data_1101, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 2.1.1",
+				&get_input_data_211, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 3.1.1",
+				&get_input_data_311, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 3.2.1",
+				&get_input_data_321, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 4.1.1",
+				&get_input_data_411, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 4.2.1",
+				&get_input_data_421, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 5.1.1",
+				&get_input_data_511, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 5.2.1",
+				&get_input_data_521, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 6.1.1",
+				&get_input_data_611, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 6.2.1",
+				&get_input_data_621, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 6.3.1",
+				&get_input_data_631, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 6.4.1",
+				&get_input_data_641, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 7.1.1",
+				&get_input_data_711, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.1.1",
+				&get_input_data_811, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.1.2",
+				&get_input_data_812, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.2.1",
+				&get_input_data_821, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.2.2",
+				&get_input_data_822, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.3.1",
+				&get_input_data_831, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.3.2",
+				&get_input_data_832, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.4.1",
+				&get_input_data_841, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.4.2",
+				&get_input_data_842, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.4.3",
+				&get_input_data_843, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.5.1",
+				&get_input_data_851, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.5.2",
+				&get_input_data_852, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.5.3",
+				&get_input_data_853, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.6.1",
+				&get_input_data_861, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.6.2",
+				&get_input_data_862, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.6.3",
+				&get_input_data_863, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.7.1",
+				&get_input_data_871, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.7.2",
+				&get_input_data_872, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.7.3",
+				&get_input_data_873, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.8.1",
+				&get_input_data_881, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.8.2",
+				&get_input_data_882, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.8.3",
+				&get_input_data_883, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.9.1",
+				&get_input_data_891, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.9.2",
+				&get_input_data_892, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.9.3",
+				&get_input_data_893, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.10.1",
+				&get_input_data_8101, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 8.10.2",
+				&get_input_data_8102, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 9.1.1",
+				&get_input_data_911, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 9.2.1",
+				&get_input_data_921, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 10.1.1",
+				&get_input_data_1011, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 10.2.1",
+				&get_input_data_1021, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 11.1.1",
+				&get_input_data_1111, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 11.2.1",
+				&get_input_data_1121, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 12.1.1",
+				&get_input_data_1211, test_get_input);
+	g_test_add_data_func("/teststk/Get Input 12.2.1",
+				&get_input_data_1221, test_get_input);
 
 	g_test_add_data_func("/teststk/More Time 1.1.1",
 				&more_time_data_111, test_more_time);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 03/19] stk: Unify variable names to use abbreviation
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
  2010-05-10 10:38 ` [PATCH 02/19] test-stkutil: Add unit test " Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-11 19:25   ` Denis Kenzior
  2010-05-10 10:38 ` [PATCH 04/19] test-stkutil: Use enum for icon_id Yang Gu
                   ` (16 subsequent siblings)
  18 siblings, 1 reply; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 src/stkutil.c       |    8 +-
 src/stkutil.h       |    8 +-
 unit/test-stkutil.c |  161 +++++++++++++++++++++++++--------------------------
 3 files changed, 88 insertions(+), 89 deletions(-)

diff --git a/src/stkutil.c b/src/stkutil.c
index 09fbec9..5bddb93 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -2095,7 +2095,7 @@ static gboolean parse_display_text(struct stk_command *command,
 				STK_DATA_OBJECT_TYPE_DURATION, 0,
 				&obj->duration,
 				STK_DATA_OBJECT_TYPE_TEXT_ATTRIBUTE, 0,
-				&obj->text_attribute,
+				&obj->text_attr,
 				STK_DATA_OBJECT_TYPE_FRAME_ID, 0,
 				&obj->frame_id,
 				STK_DATA_OBJECT_TYPE_INVALID);
@@ -2169,13 +2169,13 @@ static gboolean parse_get_input(struct stk_command *command,
 				&obj->text,
 				STK_DATA_OBJECT_TYPE_RESPONSE_LENGTH,
 				DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM,
-				&obj->response_length,
+				&obj->resp_len,
 				STK_DATA_OBJECT_TYPE_DEFAULT_TEXT, 0,
 				&obj->default_text,
 				STK_DATA_OBJECT_TYPE_ICON_ID, 0,
 				&obj->icon_id,
 				STK_DATA_OBJECT_TYPE_TEXT_ATTRIBUTE, 0,
-				&obj->text_attribute,
+				&obj->text_attr,
 				STK_DATA_OBJECT_TYPE_FRAME_ID, 0,
 				&obj->frame_id,
 				STK_DATA_OBJECT_TYPE_INVALID);
@@ -2228,7 +2228,7 @@ static gboolean parse_send_sms(struct stk_command *command,
 				STK_DATA_OBJECT_TYPE_ICON_ID, 0,
 				&obj->icon_id,
 				STK_DATA_OBJECT_TYPE_TEXT_ATTRIBUTE, 0,
-				&obj->text_attribute,
+				&obj->text_attr,
 				STK_DATA_OBJECT_TYPE_FRAME_ID, 0,
 				&obj->frame_id,
 				STK_DATA_OBJECT_TYPE_INVALID);
diff --git a/src/stkutil.h b/src/stkutil.h
index 41c03a7..70c6b01 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -794,7 +794,7 @@ struct stk_command_display_text {
 	struct stk_icon_id icon_id;
 	ofono_bool_t immediate_response;
 	struct stk_duration duration;
-	struct stk_text_attribute text_attribute;
+	struct stk_text_attribute text_attr;
 	struct stk_frame_id frame_id;
 };
 
@@ -808,10 +808,10 @@ struct stk_command_get_inkey {
 
 struct stk_command_get_input {
 	char *text;
-	struct stk_response_length response_length;
+	struct stk_response_length resp_len;
 	char *default_text;
 	struct stk_icon_id icon_id;
-	struct stk_text_attribute text_attribute;
+	struct stk_text_attribute text_attr;
 	struct stk_frame_id frame_id;
 };
 
@@ -820,7 +820,7 @@ struct stk_command_send_sms {
 	struct stk_address address;
 	struct sms gsm_sms;
 	struct stk_icon_id icon_id;
-	struct stk_text_attribute text_attribute;
+	struct stk_text_attribute text_attr;
 	struct stk_frame_id frame_id;
 };
 
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index abb82c9..6d57109 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -113,7 +113,7 @@ struct display_text_test {
 	struct stk_icon_id icon_id;
 	ofono_bool_t immediate_response;
 	struct stk_duration duration;
-	struct stk_text_attribute text_attribute;
+	struct stk_text_attribute text_attr;
 	struct stk_frame_id frame_id;
 };
 
@@ -352,8 +352,8 @@ static void test_display_text(gconstpointer data)
 	check_common_bool(command->display_text.immediate_response,
 						test->immediate_response);
 	check_duration(&command->display_text.duration, &test->duration);
-	check_text_attr(&command->display_text.text_attribute,
-						&test->text_attribute);
+	check_text_attr(&command->display_text.text_attr,
+						&test->text_attr);
 	check_frame_id(&command->display_text.frame_id, &test->frame_id);
 
 	stk_command_free(command);
@@ -1299,10 +1299,10 @@ struct get_input_test {
 	unsigned int pdu_len;
 	unsigned char qualifier;
 	char *text;
-	struct stk_response_length response_length;
+	struct stk_response_length resp_len;
 	char *default_text;
 	struct stk_icon_id icon_id;
-	struct stk_text_attribute text_attribute;
+	struct stk_text_attribute text_attr;
 	struct stk_frame_id frame_id;
 };
 
@@ -1864,7 +1864,7 @@ static struct get_input_test get_input_data_111 = {
 	.pdu_len = sizeof(get_input_111),
 	.qualifier = 0x00,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -1875,7 +1875,7 @@ static struct get_input_test get_input_data_121 = {
 	.pdu_len = sizeof(get_input_121),
 	.qualifier = 0x08,
 	.text = "Enter 67*#+",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -1886,7 +1886,7 @@ static struct get_input_test get_input_data_131 = {
 	.pdu_len = sizeof(get_input_131),
 	.qualifier = 0x01,
 	.text = "Enter AbCdE",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -1897,7 +1897,7 @@ static struct get_input_test get_input_data_141 = {
 	.pdu_len = sizeof(get_input_141),
 	.qualifier = 0x04,
 	.text = "Password 1<SEND>2345678",
-	.response_length = {
+	.resp_len = {
 		.min = 4,
 		.max = 8
 	}
@@ -1908,7 +1908,7 @@ static struct get_input_test get_input_data_151 = {
 	.pdu_len = sizeof(get_input_151),
 	.qualifier = 0x00,
 	.text = "Enter 1..9,0..9,0(1)",
-	.response_length = {
+	.resp_len = {
 		.min = 1,
 		.max = 20
 	}
@@ -1919,7 +1919,7 @@ static struct get_input_test get_input_data_161 = {
 	.pdu_len = sizeof(get_input_161),
 	.qualifier = 0x00,
 	.text = "<GO-BACKWARDS>",
-	.response_length = {
+	.resp_len = {
 		.min = 0,
 		.max = 8
 	}
@@ -1930,7 +1930,7 @@ static struct get_input_test get_input_data_171 = {
 	.pdu_len = sizeof(get_input_171),
 	.qualifier = 0x00,
 	.text = "<ABORT>",
-	.response_length = {
+	.resp_len = {
 		.min = 0,
 		.max = 8
 	}
@@ -1944,7 +1944,7 @@ static struct get_input_test get_input_data_181 = {
 		"***4444444444###***5555555555###***6666666666###"
 		"***7777777777###***8888888888###***9999999999###"
 		"***0000000000###",
-	.response_length = {
+	.resp_len = {
 		.min = 160,
 		.max = 160
 	}
@@ -1955,7 +1955,7 @@ static struct get_input_test get_input_data_191 = {
 	.pdu_len = sizeof(get_input_191),
 	.qualifier = 0x00,
 	.text = "<SEND>",
-	.response_length = {
+	.resp_len = {
 		.min = 0,
 		.max = 1
 	}
@@ -1966,7 +1966,7 @@ static struct get_input_test get_input_data_1101 = {
 	.pdu_len = sizeof(get_input_1101),
 	.qualifier = 0x00,
 	.text = NULL,
-	.response_length = {
+	.resp_len = {
 		.min = 1,
 		.max = 5
 	}
@@ -1977,7 +1977,7 @@ static struct get_input_test get_input_data_211 = {
 	.pdu_len = sizeof(get_input_211),
 	.qualifier = 0x00,
 	.text = "<TIME-OUT>",
-	.response_length = {
+	.resp_len = {
 		.min = 0,
 		.max = 10
 	}
@@ -1988,7 +1988,7 @@ static struct get_input_test get_input_data_311 = {
 	.pdu_len = sizeof(get_input_311),
 	.qualifier = 0x01,
 	.text = "ЗДРАВСТВУЙТЕ",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2001,7 +2001,7 @@ static struct get_input_test get_input_data_321 = {
 	.text = "ЗДРАВСТВУЙТЕЗДРАВСТВУЙТЕ"
 		"ЗДРАВСТВУЙТЕЗДРАВСТВУЙТЕ"
 		"ЗДРАВСТВУЙТЕЗДРАВСТВУЙ",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2012,7 +2012,7 @@ static struct get_input_test get_input_data_411 = {
 	.pdu_len = sizeof(get_input_411),
 	.qualifier = 0x03,
 	.text = "Enter Hello",
-	.response_length = {
+	.resp_len = {
 		.min = 12,
 		.max = 12
 	}
@@ -2023,7 +2023,7 @@ static struct get_input_test get_input_data_421 = {
 	.pdu_len = sizeof(get_input_421),
 	.qualifier = 0x03,
 	.text = "Enter Hello",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 0xFF
 	}
@@ -2034,7 +2034,7 @@ static struct get_input_test get_input_data_511 = {
 	.pdu_len = sizeof(get_input_511),
 	.qualifier = 0x00,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
@@ -2046,7 +2046,7 @@ static struct get_input_test get_input_data_521 = {
 	.pdu_len = sizeof(get_input_521),
 	.qualifier = 0x00,
 	.text = "Enter:",
-	.response_length = {
+	.resp_len = {
 		.min = 160,
 		.max = 160
 	},
@@ -2061,7 +2061,7 @@ static struct get_input_test get_input_data_611 = {
 	.pdu_len = sizeof(get_input_611),
 	.qualifier = 0x00,
 	.text = "<NO-ICON>",
-	.response_length = {
+	.resp_len = {
 		.min = 0,
 		.max = 10
 	},
@@ -2076,7 +2076,7 @@ static struct get_input_test get_input_data_621 = {
 	.pdu_len = sizeof(get_input_621),
 	.qualifier = 0x00,
 	.text = "<BASIC-ICON>",
-	.response_length = {
+	.resp_len = {
 		.min = 0,
 		.max = 10
 	},
@@ -2091,7 +2091,7 @@ static struct get_input_test get_input_data_631 = {
 	.pdu_len = sizeof(get_input_631),
 	.qualifier = 0x00,
 	.text = "<NO-ICON>",
-	.response_length = {
+	.resp_len = {
 		.min = 0,
 		.max = 10
 	},
@@ -2106,7 +2106,7 @@ static struct get_input_test get_input_data_641 = {
 	.pdu_len = sizeof(get_input_641),
 	.qualifier = 0x00,
 	.text = "<COLOUR-ICON>",
-	.response_length = {
+	.resp_len = {
 		.min = 0,
 		.max = 10
 	},
@@ -2121,7 +2121,7 @@ static struct get_input_test get_input_data_711 = {
 	.pdu_len = sizeof(get_input_711),
 	.qualifier = 0x80,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2132,11 +2132,11 @@ static struct get_input_test get_input_data_811 = {
 	.pdu_len = sizeof(get_input_811),
 	.qualifier = 0x00,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
 	}
@@ -2147,7 +2147,7 @@ static struct get_input_test get_input_data_812 = {
 	.pdu_len = sizeof(get_input_812),
 	.qualifier = 0x00,
 	.text = "Enter 22222",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2158,11 +2158,11 @@ static struct get_input_test get_input_data_821 = {
 	.pdu_len = sizeof(get_input_821),
 	.qualifier = 0x00,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x01, 0xB4 }
 	}
@@ -2173,7 +2173,7 @@ static struct get_input_test get_input_data_822 = {
 	.pdu_len = sizeof(get_input_822),
 	.qualifier = 0x00,
 	.text = "Enter 22222",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2184,11 +2184,11 @@ static struct get_input_test get_input_data_831 = {
 	.pdu_len = sizeof(get_input_831),
 	.qualifier = 0x00,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x02, 0xB4 }
 	}
@@ -2199,7 +2199,7 @@ static struct get_input_test get_input_data_832 = {
 	.pdu_len = sizeof(get_input_832),
 	.qualifier = 0x00,
 	.text = "Enter 22222",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2210,11 +2210,11 @@ static struct get_input_test get_input_data_841 = {
 	.pdu_len = sizeof(get_input_841),
 	.qualifier = 0x00,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x04, 0xB4 }
 	}
@@ -2225,11 +2225,11 @@ static struct get_input_test get_input_data_842 = {
 	.pdu_len = sizeof(get_input_842),
 	.qualifier = 0x00,
 	.text = "Enter 22222",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
 	}
@@ -2240,7 +2240,7 @@ static struct get_input_test get_input_data_843 = {
 	.pdu_len = sizeof(get_input_843),
 	.qualifier = 0x00,
 	.text = "Enter 33333",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2251,11 +2251,11 @@ static struct get_input_test get_input_data_851 = {
 	.pdu_len = sizeof(get_input_851),
 	.qualifier = 0x00,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x08, 0xB4 }
 	}
@@ -2266,11 +2266,11 @@ static struct get_input_test get_input_data_852 = {
 	.pdu_len = sizeof(get_input_852),
 	.qualifier = 0x00,
 	.text = "Enter 22222",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
 	}
@@ -2281,7 +2281,7 @@ static struct get_input_test get_input_data_853 = {
 	.pdu_len = sizeof(get_input_853),
 	.qualifier = 0x00,
 	.text = "Enter 33333",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2292,11 +2292,11 @@ static struct get_input_test get_input_data_861 = {
 	.pdu_len = sizeof(get_input_861),
 	.qualifier = 0x00,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x10, 0xB4 }
 	}
@@ -2307,11 +2307,11 @@ static struct get_input_test get_input_data_862 = {
 	.pdu_len = sizeof(get_input_862),
 	.qualifier = 0x00,
 	.text = "Enter 22222",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
 	}
@@ -2322,7 +2322,7 @@ static struct get_input_test get_input_data_863 = {
 	.pdu_len = sizeof(get_input_863),
 	.qualifier = 0x00,
 	.text = "Enter 33333",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2333,11 +2333,11 @@ static struct get_input_test get_input_data_871 = {
 	.pdu_len = sizeof(get_input_871),
 	.qualifier = 0x00,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x20, 0xB4 }
 	}
@@ -2348,11 +2348,11 @@ static struct get_input_test get_input_data_872 = {
 	.pdu_len = sizeof(get_input_872),
 	.qualifier = 0x00,
 	.text = "Enter 22222",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
 	}
@@ -2363,7 +2363,7 @@ static struct get_input_test get_input_data_873 = {
 	.pdu_len = sizeof(get_input_873),
 	.qualifier = 0x00,
 	.text = "Enter 33333",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2374,11 +2374,11 @@ static struct get_input_test get_input_data_881 = {
 	.pdu_len = sizeof(get_input_881),
 	.qualifier = 0x00,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x40, 0xB4 }
 	}
@@ -2389,11 +2389,11 @@ static struct get_input_test get_input_data_882 = {
 	.pdu_len = sizeof(get_input_882),
 	.qualifier = 0x00,
 	.text = "Enter 22222",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
 	}
@@ -2404,7 +2404,7 @@ static struct get_input_test get_input_data_883 = {
 	.pdu_len = sizeof(get_input_883),
 	.qualifier = 0x00,
 	.text = "Enter 33333",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2415,11 +2415,11 @@ static struct get_input_test get_input_data_891 = {
 	.pdu_len = sizeof(get_input_891),
 	.qualifier = 0x00,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x80, 0xB4 }
 	}
@@ -2430,11 +2430,11 @@ static struct get_input_test get_input_data_892 = {
 	.pdu_len = sizeof(get_input_892),
 	.qualifier = 0x00,
 	.text = "Enter 22222",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
 	}
@@ -2445,7 +2445,7 @@ static struct get_input_test get_input_data_893 = {
 	.pdu_len = sizeof(get_input_893),
 	.qualifier = 0x00,
 	.text = "Enter 33333",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2456,11 +2456,11 @@ static struct get_input_test get_input_data_8101 = {
 	.pdu_len = sizeof(get_input_8101),
 	.qualifier = 0x00,
 	.text = "Enter 12345",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	},
-	.text_attribute = {
+	.text_attr = {
 		.len = 4,
 		.attributes = { 0x00, 0x0B, 0x00, 0xB4 }
 	}
@@ -2471,7 +2471,7 @@ static struct get_input_test get_input_data_8102 = {
 	.pdu_len = sizeof(get_input_8102),
 	.qualifier = 0x00,
 	.text = "Enter 22222",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2482,7 +2482,7 @@ static struct get_input_test get_input_data_911 = {
 	.pdu_len = sizeof(get_input_911),
 	.qualifier = 0x01,
 	.text = "你好",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2496,7 +2496,7 @@ static struct get_input_test get_input_data_921 = {
 		"你好你好你好你好你好你好你好你好你好你好"
 		"你好你好你好你好你好你好你好你好你好你好"
 		"你好你好你好你好你好",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2507,7 +2507,7 @@ static struct get_input_test get_input_data_1011 = {
 	.pdu_len = sizeof(get_input_1011),
 	.qualifier = 0x03,
 	.text = "Enter Hello",
-	.response_length = {
+	.resp_len = {
 		.min = 2,
 		.max = 2
 	}
@@ -2518,7 +2518,7 @@ static struct get_input_test get_input_data_1021 = {
 	.pdu_len = sizeof(get_input_1021),
 	.qualifier = 0x03,
 	.text = "Enter Hello",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 0xFF
 	}
@@ -2529,7 +2529,7 @@ static struct get_input_test get_input_data_1111 = {
 	.pdu_len = sizeof(get_input_1111),
 	.qualifier = 0x01,
 	.text = "ル",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2543,7 +2543,7 @@ static struct get_input_test get_input_data_1121 = {
 		"ルルルルルルルルルルルルルルルルルルルル"
 		"ルルルルルルルルルルルルルルルルルルルル"
 		"ルルルルルルルルルル",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 5
 	}
@@ -2554,7 +2554,7 @@ static struct get_input_test get_input_data_1211 = {
 	.pdu_len = sizeof(get_input_1211),
 	.qualifier = 0x03,
 	.text = "Enter Hello",
-	.response_length = {
+	.resp_len = {
 		.min = 2,
 		.max = 2
 	}
@@ -2565,7 +2565,7 @@ static struct get_input_test get_input_data_1221 = {
 	.pdu_len = sizeof(get_input_1221),
 	.qualifier = 0x03,
 	.text = "Enter Hello",
-	.response_length = {
+	.resp_len = {
 		.min = 5,
 		.max = 0xFF
 	}
@@ -2591,12 +2591,11 @@ static void test_get_input(gconstpointer data)
 	if (test->text)
 		g_assert(command->get_input.text);
 	check_text(command->get_input.text, test->text);
-	check_response_length(&command->get_input.response_length,
-				&test->response_length);
+	check_response_length(&command->get_input.resp_len, &test->resp_len);
 	check_text(command->get_input.default_text, test->default_text);
 	check_icon_id(&command->get_input.icon_id, &test->icon_id);
-	check_text_attr(&command->get_input.text_attribute,
-						&test->text_attribute);
+	check_text_attr(&command->get_input.text_attr,
+						&test->text_attr);
 	check_frame_id(&command->get_input.frame_id, &test->frame_id);
 
 	stk_command_free(command);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 04/19] test-stkutil: Use enum for icon_id
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
  2010-05-10 10:38 ` [PATCH 02/19] test-stkutil: Add unit test " Yang Gu
  2010-05-10 10:38 ` [PATCH 03/19] stk: Unify variable names to use abbreviation Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-11 19:25   ` Denis Kenzior
  2010-05-10 10:38 ` [PATCH 05/19] stkutil: Add play tone proactive command parser Yang Gu
                   ` (15 subsequent siblings)
  18 siblings, 1 reply; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 unit/test-stkutil.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 6d57109..e1f6a3e 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -270,7 +270,7 @@ static struct display_text_test display_text_data_511 = {
 	.qualifier = 0x80,
 	.text = "Basic Icon",
 	.icon_id = {
-		.qualifier = 0x00,
+		.qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
 		.id = 0x01
 	}
 };
@@ -281,7 +281,7 @@ static struct display_text_test display_text_data_521 = {
 	.qualifier = 0x80,
 	.text = "Colour Icon",
 	.icon_id = {
-		.qualifier = 0x00,
+		.qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
 		.id = 0x02
 	}
 };
@@ -292,7 +292,7 @@ static struct display_text_test display_text_data_531 = {
 	.qualifier = 0x80,
 	.text = "Basic Icon",
 	.icon_id = {
-		.qualifier = 0x01,
+		.qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
 		.id = 0x01
 	}
 };
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 05/19] stkutil: Add play tone proactive command parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (2 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 04/19] test-stkutil: Use enum for icon_id Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-11 19:26   ` Denis Kenzior
  2010-05-10 10:38 ` [PATCH 06/19] Replace check_text with check_common_text Yang Gu
                   ` (14 subsequent siblings)
  18 siblings, 1 reply; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 src/stkutil.c |   42 ++++++++++++++++++++++++++++++++++++++++++
 src/stkutil.h |   10 ++++++++++
 2 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/src/stkutil.c b/src/stkutil.c
index 5bddb93..0f0ea34 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -2200,6 +2200,45 @@ static gboolean parse_more_time(struct stk_command *command,
 	return TRUE;
 }
 
+static void destroy_play_tone(struct stk_command *command)
+{
+	g_free(command->play_tone.alpha_id);
+}
+
+static gboolean parse_play_tone(struct stk_command *command,
+					struct comprehension_tlv_iter *iter)
+{
+	struct stk_command_play_tone *obj = &command->play_tone;
+	gboolean ret;
+
+	if (command->src != STK_DEVICE_IDENTITY_TYPE_UICC)
+		return FALSE;
+
+	if (command->dst != STK_DEVICE_IDENTITY_TYPE_EARPIECE)
+		return FALSE;
+
+	ret = parse_dataobj(iter, STK_DATA_OBJECT_TYPE_ALPHA_ID, 0,
+				&obj->alpha_id,
+				STK_DATA_OBJECT_TYPE_TONE, 0,
+				&obj->tone,
+				STK_DATA_OBJECT_TYPE_DURATION, 0,
+				&obj->duration,
+				STK_DATA_OBJECT_TYPE_ICON_ID, 0,
+				&obj->icon_id,
+				STK_DATA_OBJECT_TYPE_TEXT_ATTRIBUTE, 0,
+				&obj->text_attr,
+				STK_DATA_OBJECT_TYPE_FRAME_ID, 0,
+				&obj->frame_id,
+				STK_DATA_OBJECT_TYPE_INVALID);
+
+	if (ret == FALSE)
+		return FALSE;
+
+	command->destructor = destroy_play_tone;
+
+	return TRUE;
+}
+
 static void destroy_send_sms(struct stk_command *command)
 {
 	g_free(command->send_sms.alpha_id);
@@ -2317,6 +2356,9 @@ struct stk_command *stk_command_new_from_pdu(const unsigned char *pdu,
 	case STK_COMMAND_TYPE_MORE_TIME:
 		ok = parse_more_time(command, &iter);
 		break;
+	case STK_COMMAND_TYPE_PLAY_TONE:
+		ok = parse_play_tone(command, &iter);
+		break;
 	case STK_COMMAND_TYPE_SEND_SMS:
 		ok = parse_send_sms(command, &iter);
 		break;
diff --git a/src/stkutil.h b/src/stkutil.h
index 70c6b01..00c001b 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -815,6 +815,15 @@ struct stk_command_get_input {
 	struct stk_frame_id frame_id;
 };
 
+struct stk_command_play_tone {
+	char *alpha_id;
+	unsigned char tone;
+	struct stk_duration duration;
+	struct stk_icon_id icon_id;
+	struct stk_text_attribute text_attr;
+	struct stk_frame_id frame_id;
+};
+
 struct stk_command_send_sms {
 	char *alpha_id;
 	struct stk_address address;
@@ -835,6 +844,7 @@ struct stk_command {
 		struct stk_command_display_text display_text;
 		struct stk_command_get_inkey get_inkey;
 		struct stk_command_get_input get_input;
+		struct stk_command_play_tone play_tone;
 		struct stk_command_send_sms send_sms;
 	};
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 06/19] Replace check_text with check_common_text
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (3 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 05/19] stkutil: Add play tone proactive command parser Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-11 19:26   ` Denis Kenzior
  2010-05-10 10:38 ` [PATCH 07/19] stkutil: Refactor parser for tone objects Yang Gu
                   ` (13 subsequent siblings)
  18 siblings, 1 reply; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 unit/test-stkutil.c |   31 +++++++++++++++----------------
 1 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index e1f6a3e..11b088b 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -52,6 +52,17 @@ static inline void check_common_bool(const ofono_bool_t command,
 	g_assert(command == test);
 }
 
+static inline void check_common_text(const char *command, const char *test)
+{
+	if (test == NULL) {
+		g_assert(command == NULL);
+		return;
+	}
+
+	g_assert(command != NULL);
+	g_assert(g_str_equal(command, test));
+}
+
 /* Defined in TS 102.223 Section 8.8 */
 static void check_duration(const struct stk_duration *command,
 					const struct stk_duration *test)
@@ -68,18 +79,6 @@ static void check_response_length(const struct stk_response_length *command,
 	g_assert(command->max == test->max);
 }
 
-/* Defined in TS 102.223 Section 8.15 */
-static inline void check_text(const char *command, const char *test)
-{
-	if (test == NULL) {
-		g_assert(command == NULL);
-		return;
-	}
-
-	g_assert(command != NULL);
-	g_assert(g_str_equal(command, test));
-}
-
 /* Defined in TS 102.223 Section 8.31 */
 static void check_icon_id(const struct stk_icon_id *command,
 					const struct stk_icon_id *test)
@@ -347,7 +346,7 @@ static void test_display_text(gconstpointer data)
 	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_DISPLAY);
 
 	g_assert(command->display_text.text);
-	check_text(command->display_text.text, test->text);
+	check_common_text(command->display_text.text, test->text);
 	check_icon_id(&command->display_text.icon_id, &test->icon_id);
 	check_common_bool(command->display_text.immediate_response,
 						test->immediate_response);
@@ -1284,7 +1283,7 @@ static void test_get_inkey(gconstpointer data)
 	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_TERMINAL);
 
 	g_assert(command->get_inkey.text);
-	check_text(command->get_inkey.text, test->text);
+	check_common_text(command->get_inkey.text, test->text);
 	check_icon_id(&command->get_inkey.icon_id, &test->icon_id);
 	check_duration(&command->get_inkey.duration, &test->duration);
 	check_text_attr(&command->get_inkey.text_attr,
@@ -2590,9 +2589,9 @@ static void test_get_input(gconstpointer data)
 
 	if (test->text)
 		g_assert(command->get_input.text);
-	check_text(command->get_input.text, test->text);
+	check_common_text(command->get_input.text, test->text);
 	check_response_length(&command->get_input.resp_len, &test->resp_len);
-	check_text(command->get_input.default_text, test->default_text);
+	check_common_text(command->get_input.default_text, test->default_text);
 	check_icon_id(&command->get_input.icon_id, &test->icon_id);
 	check_text_attr(&command->get_input.text_attr,
 						&test->text_attr);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 07/19] stkutil: Refactor parser for tone objects
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (4 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 06/19] Replace check_text with check_common_text Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-11 19:26   ` Denis Kenzior
  2010-05-10 10:38 ` [PATCH 08/19] test-stkutil: Add unit test for play tone parser Yang Gu
                   ` (12 subsequent siblings)
  18 siblings, 1 reply; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 src/stkutil.c |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/stkutil.c b/src/stkutil.c
index 0f0ea34..44cef10 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -511,17 +511,8 @@ static gboolean parse_dataobj_text(struct comprehension_tlv_iter *iter,
 static gboolean parse_dataobj_tone(struct comprehension_tlv_iter *iter,
 					void *user)
 {
-	unsigned char *tone = user;
-	const unsigned char *data;
-
-	if (comprehension_tlv_iter_get_length(iter) !=  1)
-		return FALSE;
-
-	data = comprehension_tlv_iter_get_data(iter);
-
-	*tone = data[0];
-
-	return TRUE;
+	unsigned char *byte = user;
+	return parse_dataobj_common_byte(iter, byte);
 }
 
 /* Defined in TS 102.223 Section 8.18 */
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 08/19] test-stkutil: Add unit test for play tone parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (5 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 07/19] stkutil: Refactor parser for tone objects Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-11 19:27   ` Denis Kenzior
  2010-05-10 10:38 ` [PATCH 09/19] stkutil: Add poll interval proactive command parser Yang Gu
                   ` (11 subsequent siblings)
  18 siblings, 1 reply; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 unit/test-stkutil.c | 1356 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 1356 insertions(+), 0 deletions(-)

diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 11b088b..65688ea 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -52,6 +52,12 @@ static inline void check_common_bool(const ofono_bool_t command,
 	g_assert(command == test);
 }
 
+static inline void check_common_byte(const unsigned char command,
+					const unsigned char test)
+{
+	g_assert(command == test);
+}
+
 static inline void check_common_text(const char *command, const char *test)
 {
 	if (test == NULL) {
@@ -2635,6 +2641,1247 @@ static void test_more_time(gconstpointer data)
 	stk_command_free(command);
 }
 
+struct play_tone_test {
+	const unsigned char *pdu;
+	unsigned int pdu_len;
+	unsigned char qualifier;
+	char *alpha_id;
+	unsigned char tone;
+	struct stk_duration duration;
+	struct stk_icon_id icon_id;
+	struct stk_text_attribute text_attr;
+	struct stk_frame_id frame_id;
+};
+
+static unsigned char play_tone_111[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x09, 0x44, 0x69, 0x61,
+						0x6C, 0x20, 0x54, 0x6F, 0x6E,
+						0x65, 0x8E, 0x01, 0x01, 0x84,
+						0x02, 0x01, 0x05 };
+
+static unsigned char play_tone_112[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x09, 0x53, 0x75, 0x62,
+						0x2E, 0x20, 0x42, 0x75, 0x73,
+						0x79, 0x8E, 0x01, 0x02, 0x84,
+						0x02, 0x01, 0x05 };
+
+static unsigned char play_tone_113[] = { 0xD0, 0x1C, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x0A, 0x43, 0x6F, 0x6E,
+						0x67, 0x65, 0x73, 0x74, 0x69,
+						0x6F, 0x6E, 0x8E, 0x01, 0x03,
+						0x84, 0x02, 0x01, 0x05 };
+
+static unsigned char play_tone_114[] = { 0xD0, 0x18, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x06, 0x52, 0x50, 0x20,
+						0x41, 0x63, 0x6B, 0x8E, 0x01,
+						0x04, 0x84, 0x02, 0x01, 0x05 };
+
+static unsigned char play_tone_115[] = { 0xD0, 0x17, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x05, 0x4E, 0x6F, 0x20,
+						0x52, 0x50, 0x8E, 0x01, 0x05,
+						0x84, 0x02, 0x01, 0x05 };
+
+static unsigned char play_tone_116[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x09, 0x53, 0x70, 0x65,
+						0x63, 0x20, 0x49, 0x6E, 0x66,
+						0x6F, 0x8E, 0x01, 0x06, 0x84,
+						0x02, 0x01, 0x05 };
+
+static unsigned char play_tone_117[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x09, 0x43, 0x61, 0x6C,
+						0x6C, 0x20, 0x57, 0x61, 0x69,
+						0x74, 0x8E, 0x01, 0x07, 0x84,
+						0x02, 0x01, 0x05 };
+
+static unsigned char play_tone_118[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x09, 0x52, 0x69, 0x6E,
+						0x67, 0x20, 0x54, 0x6F, 0x6E,
+						0x65, 0x8E, 0x01, 0x08, 0x84,
+						0x02, 0x01, 0x05 };
+
+static unsigned char play_tone_119[] = { 0xD0, 0x81, 0xFD, 0x81, 0x03, 0x01,
+						0x20, 0x00, 0x82, 0x02, 0x81,
+						0x03, 0x85, 0x81, 0xF1, 0x54,
+						0x68, 0x69, 0x73, 0x20, 0x63,
+						0x6F, 0x6D, 0x6D, 0x61, 0x6E,
+						0x64, 0x20, 0x69, 0x6E, 0x73,
+						0x74, 0x72, 0x75, 0x63, 0x74,
+						0x73, 0x20, 0x74, 0x68, 0x65,
+						0x20, 0x4D, 0x45, 0x20, 0x74,
+						0x6F, 0x20, 0x70, 0x6C, 0x61,
+						0x79, 0x20, 0x61, 0x6E, 0x20,
+						0x61, 0x75, 0x64, 0x69, 0x6F,
+						0x20, 0x74, 0x6F, 0x6E, 0x65,
+						0x2E, 0x20, 0x55, 0x70, 0x6F,
+						0x6E, 0x20, 0x72, 0x65, 0x63,
+						0x65, 0x69, 0x76, 0x69, 0x6E,
+						0x67, 0x20, 0x74, 0x68, 0x69,
+						0x73, 0x20, 0x63, 0x6F, 0x6D,
+						0x6D, 0x61, 0x6E, 0x64, 0x2C,
+						0x20, 0x74, 0x68, 0x65, 0x20,
+						0x4D, 0x45, 0x20, 0x73, 0x68,
+						0x61, 0x6C, 0x6C, 0x20, 0x63,
+						0x68, 0x65, 0x63, 0x6B, 0x20,
+						0x69, 0x66, 0x20, 0x69, 0x74,
+						0x20, 0x69, 0x73, 0x20, 0x63,
+						0x75, 0x72, 0x72, 0x65, 0x6E,
+						0x74, 0x6C, 0x79, 0x20, 0x69,
+						0x6E, 0x2C, 0x20, 0x6F, 0x72,
+						0x20, 0x69, 0x6E, 0x20, 0x74,
+						0x68, 0x65, 0x20, 0x70, 0x72,
+						0x6F, 0x63, 0x65, 0x73, 0x73,
+						0x20, 0x6F, 0x66, 0x20, 0x73,
+						0x65, 0x74, 0x74, 0x69, 0x6E,
+						0x67, 0x20, 0x75, 0x70, 0x20,
+						0x28, 0x53, 0x45, 0x54, 0x2D,
+						0x55, 0x50, 0x20, 0x6D, 0x65,
+						0x73, 0x73, 0x61, 0x67, 0x65,
+						0x20, 0x73, 0x65, 0x6E, 0x74,
+						0x20, 0x74, 0x6F, 0x20, 0x74,
+						0x68, 0x65, 0x20, 0x6E, 0x65,
+						0x74, 0x77, 0x6F, 0x72, 0x6B,
+						0x2C, 0x20, 0x73, 0x65, 0x65,
+						0x20, 0x47, 0x53, 0x4D, 0x22,
+						0x30, 0x34, 0x2E, 0x30, 0x38,
+						0x22, 0x28, 0x38, 0x29, 0x29,
+						0x2C, 0x20, 0x61, 0x20, 0x73,
+						0x70, 0x65, 0x65, 0x63, 0x68,
+						0x20, 0x63, 0x61, 0x6C, 0x6C,
+						0x2E, 0x20, 0x2D, 0x20, 0x49,
+						0x66, 0x20, 0x74, 0x68, 0x65,
+						0x20, 0x4D, 0x45, 0x20, 0x49 };
+
+static unsigned char play_tone_1110[] = { 0xD0, 0x16, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x04, 0x42, 0x65, 0x65,
+						0x70, 0x8E, 0x01, 0x10, 0x84,
+						0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_1111[] = { 0xD0, 0x1A, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x08, 0x50, 0x6F, 0x73,
+						0x69, 0x74, 0x69, 0x76, 0x65,
+						0x8E, 0x01, 0x11, 0x84, 0x02,
+						0x01, 0x01 };
+
+static unsigned char play_tone_1112[] = { 0xD0, 0x1A, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x08, 0x4E, 0x65, 0x67,
+						0x61, 0x74, 0x69, 0x76, 0x65,
+						0x8E, 0x01, 0x12, 0x84, 0x02,
+						0x01, 0x01 };
+
+static unsigned char play_tone_1113[] = { 0xD0, 0x17, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x05, 0x51, 0x75, 0x69,
+						0x63, 0x6B, 0x8E, 0x01, 0x10,
+						0x84, 0x02, 0x02, 0x02 };
+
+static unsigned char play_tone_1114[] = { 0xD0, 0x19, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x07, 0x3C, 0x41, 0x42,
+						0x4F, 0x52, 0x54, 0x3E, 0x8E,
+						0x01, 0x06, 0x84, 0x02, 0x00,
+						0x01 };
+
+static unsigned char play_tone_1115[] = { 0xD0, 0x09, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03 };
+
+static unsigned char play_tone_211[] = { 0xD0, 0x2B, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x19, 0x80, 0x04, 0x17,
+						0x04, 0x14, 0x04, 0x20, 0x04,
+						0x10, 0x04, 0x12, 0x04, 0x21,
+						0x04, 0x22, 0x04, 0x12, 0x04,
+						0x23, 0x04, 0x19, 0x04, 0x22,
+						0x04, 0x15, 0x8E, 0x01, 0x11,
+						0x84, 0x02, 0x01, 0x01 };
+
+
+static unsigned char play_tone_212[] = { 0xD0, 0x21, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x0F, 0x81, 0x0C, 0x08,
+						0x97, 0x94, 0xA0, 0x90, 0x92,
+						0xA1, 0xA2, 0x92, 0xA3, 0x99,
+						0xA2, 0x95, 0x8E, 0x01, 0x11,
+						0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_213[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x82, 0x0C, 0x04,
+						0x10, 0x87, 0x84, 0x90, 0x80,
+						0x82, 0x91, 0x92, 0x82, 0x93,
+						0x89, 0x92, 0x85, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_311[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x0C, 0x3C, 0x42, 0x41,
+						0x53, 0x49, 0x43, 0x2D, 0x49,
+						0x43, 0x4F, 0x4E, 0x3E, 0x8E,
+						0x01, 0x11, 0x84, 0x02, 0x01,
+						0x01, 0x1E, 0x02, 0x00, 0x01 };
+
+static unsigned char play_tone_321[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x0C, 0x3C, 0x42, 0x41,
+						0x53, 0x49, 0x43, 0x2D, 0x49,
+						0x43, 0x4F, 0x4E, 0x3E, 0x8E,
+						0x01, 0x11, 0x84, 0x02, 0x01,
+						0x01, 0x1E, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_331[] = { 0xD0, 0x23, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x0D, 0x3C, 0x43, 0x4F,
+						0x4C, 0x4F, 0x55, 0x52, 0x2D,
+						0x49, 0x43, 0x4F, 0x4E, 0x3E,
+						0x8E, 0x01, 0x11, 0x84, 0x02,
+						0x01, 0x01, 0x1E, 0x02, 0x00,
+						0x02 };
+
+static unsigned char play_tone_341[] = { 0xD0, 0x23, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x0D, 0x3C, 0x43, 0x4F,
+						0x4C, 0x4F, 0x55, 0x52, 0x2D,
+						0x49, 0x43, 0x4F, 0x4E, 0x3E,
+						0x8E, 0x01, 0x11, 0x84, 0x02,
+						0x01, 0x01, 0x1E, 0x02, 0x01,
+						0x02 };
+
+static unsigned char play_tone_411[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x00,
+						0xB4 };
+
+static unsigned char play_tone_412[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_421[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x01,
+						0xB4 };
+
+static unsigned char play_tone_422[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_431[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x02,
+						0xB4 };
+
+static unsigned char play_tone_432[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_441[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x04,
+						0xB4 };
+
+static unsigned char play_tone_442[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x00,
+						0xB4 };
+
+static unsigned char play_tone_443[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x33, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_451[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x08,
+						0xB4 };
+
+static unsigned char play_tone_452[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x00,
+						0xB4 };
+
+static unsigned char play_tone_453[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x33, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_461[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x0E, 0x10,
+						0xB4 };
+
+static unsigned char play_tone_462[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x00,
+						0xB4 };
+
+static unsigned char play_tone_463[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x33, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_471[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x0E, 0x20,
+						0xB4 };
+
+static unsigned char play_tone_472[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x00,
+						0xB4 };
+
+static unsigned char play_tone_473[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x33, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_481[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x40,
+						0xB4 };
+
+static unsigned char play_tone_482[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x00,
+						0xB4 };
+
+static unsigned char play_tone_483[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x33, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_491[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x80,
+						0xB4 };
+
+static unsigned char play_tone_492[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x00,
+						0xB4 };
+
+static unsigned char play_tone_493[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x33, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_4101[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01,
+						0xD0, 0x04, 0x00, 0x10, 0x00,
+						0xB4 };
+
+static unsigned char play_tone_4102[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_511[] = { 0xD0, 0x17, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x05, 0x80, 0x4E, 0x2D,
+						0x4E, 0x00, 0x8E, 0x01, 0x11,
+						0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_512[] = { 0xD0, 0x17, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x05, 0x81, 0x02, 0x9C,
+						0xAD, 0x80, 0x8E, 0x01, 0x11,
+						0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_513[] = { 0xD0, 0x18, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x06, 0x82, 0x02, 0x4E,
+						0x00, 0xAD, 0x80, 0x8E, 0x01,
+						0x11, 0x84, 0x02, 0x01, 0x01 };
+
+static unsigned char play_tone_611[] = { 0xD0, 0x1B, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x09, 0x80, 0x00, 0x38,
+						0x00, 0x30, 0x30, 0xEB, 0x00,
+						0x30, 0x8E, 0x01, 0x01, 0x84,
+						0x02, 0x01, 0x05 };
+
+static unsigned char play_tone_612[] = { 0xD0, 0x19, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x07, 0x81, 0x04, 0x61,
+						0x38, 0x31, 0xEB, 0x31, 0x8E,
+						0x01, 0x01, 0x84, 0x02, 0x01,
+						0x05 };
+
+static unsigned char play_tone_613[] = { 0xD0, 0x1A, 0x81, 0x03, 0x01, 0x20,
+						0x00, 0x82, 0x02, 0x81, 0x03,
+						0x85, 0x08, 0x82, 0x04, 0x30,
+						0xA0, 0x38, 0x32, 0xCB, 0x32,
+						0x8E, 0x01, 0x01, 0x84, 0x02,
+						0x01, 0x05 };
+
+static struct play_tone_test play_tone_data_111 = {
+	.pdu = play_tone_111,
+	.pdu_len = sizeof(play_tone_111),
+	.qualifier = 0x00,
+	.alpha_id = "Dial Tone",
+	.tone = STK_TONE_TYPE_DIAL_TONE,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 5
+	}
+};
+
+static struct play_tone_test play_tone_data_112 = {
+	.pdu = play_tone_112,
+	.pdu_len = sizeof(play_tone_112),
+	.qualifier = 0x00,
+	.alpha_id = "Sub. Busy",
+	.tone = STK_TONE_TYPE_BUSY_TONE,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 5
+	}
+};
+
+static struct play_tone_test play_tone_data_113 = {
+	.pdu = play_tone_113,
+	.pdu_len = sizeof(play_tone_113),
+	.qualifier = 0x00,
+	.alpha_id = "Congestion",
+	.tone = STK_TONE_TYPE_CONGESTION,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 5
+	}
+};
+
+static struct play_tone_test play_tone_data_114 = {
+	.pdu = play_tone_114,
+	.pdu_len = sizeof(play_tone_114),
+	.qualifier = 0x00,
+	.alpha_id = "RP Ack",
+	.tone = STK_TONE_TYPE_RP_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 5
+	}
+};
+
+static struct play_tone_test play_tone_data_115 = {
+	.pdu = play_tone_115,
+	.pdu_len = sizeof(play_tone_115),
+	.qualifier = 0x00,
+	.alpha_id = "No RP",
+	.tone = STK_TONE_TYPE_CALL_DROPPED,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 5
+	}
+};
+
+static struct play_tone_test play_tone_data_116 = {
+	.pdu = play_tone_116,
+	.pdu_len = sizeof(play_tone_116),
+	.qualifier = 0x00,
+	.alpha_id = "Spec Info",
+	.tone = STK_TONE_TYPE_ERROR,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 5
+	}
+};
+
+static struct play_tone_test play_tone_data_117 = {
+	.pdu = play_tone_117,
+	.pdu_len = sizeof(play_tone_117),
+	.qualifier = 0x00,
+	.alpha_id = "Call Wait",
+	.tone = STK_TONE_TYPE_CALL_WAITING,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 5
+	}
+};
+
+static struct play_tone_test play_tone_data_118 = {
+	.pdu = play_tone_118,
+	.pdu_len = sizeof(play_tone_118),
+	.qualifier = 0x00,
+	.alpha_id = "Ring Tone",
+	.tone = STK_TONE_TYPE_RINGING,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 5
+	}
+};
+
+static struct play_tone_test play_tone_data_119 = {
+	.pdu = play_tone_119,
+	.pdu_len = sizeof(play_tone_119),
+	.qualifier = 0x00,
+	.alpha_id = "This command instructs the ME to play an audio tone. \
+Upon receiving this command, the ME shall check if it is currently in, or \
+in the process of setting up (SET-UP message sent to the network, \
+see GSM\"04.08\"(8)), a speech call. - If the ME I"
+};
+
+static struct play_tone_test play_tone_data_1110 = {
+	.pdu = play_tone_1110,
+	.pdu_len = sizeof(play_tone_1110),
+	.qualifier = 0x00,
+	.alpha_id = "Beep",
+	.tone = STK_TONE_TYPE_GENERAL_BEEP,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_1111 = {
+	.pdu = play_tone_1111,
+	.pdu_len = sizeof(play_tone_1111),
+	.qualifier = 0x00,
+	.alpha_id = "Positive",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_1112 = {
+	.pdu = play_tone_1112,
+	.pdu_len = sizeof(play_tone_1112),
+	.qualifier = 0x00,
+	.alpha_id = "Negative",
+	.tone = STK_TONE_TYPE_NEGATIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_1113 = {
+	.pdu = play_tone_1113,
+	.pdu_len = sizeof(play_tone_1113),
+	.qualifier = 0x00,
+	.alpha_id = "Quick",
+	.tone = STK_TONE_TYPE_GENERAL_BEEP,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECOND_TENTHS,
+		.interval = 2
+	}
+};
+
+static struct play_tone_test play_tone_data_1114 = {
+	.pdu = play_tone_1114,
+	.pdu_len = sizeof(play_tone_1114),
+	.qualifier = 0x00,
+	.alpha_id = "<ABORT>",
+	.tone = STK_TONE_TYPE_ERROR,
+	.duration = {
+		.unit = STK_DURATION_TYPE_MINUTES,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_1115 = {
+	.pdu = play_tone_1115,
+	.pdu_len = sizeof(play_tone_1115),
+	.qualifier = 0x00
+};
+
+static struct play_tone_test play_tone_data_211 = {
+	.pdu = play_tone_211,
+	.pdu_len = sizeof(play_tone_211),
+	.qualifier = 0x00,
+	.alpha_id = "ЗДРАВСТВУЙТЕ",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_212 = {
+	.pdu = play_tone_212,
+	.pdu_len = sizeof(play_tone_212),
+	.qualifier = 0x00,
+	.alpha_id = "ЗДРАВСТВУЙТЕ",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_213 = {
+	.pdu = play_tone_213,
+	.pdu_len = sizeof(play_tone_213),
+	.qualifier = 0x00,
+	.alpha_id = "ЗДРАВСТВУЙТЕ",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_311 = {
+	.pdu = play_tone_311,
+	.pdu_len = sizeof(play_tone_311),
+	.qualifier = 0x00,
+	.alpha_id = "<BASIC-ICON>",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.icon_id = {
+	    .qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+	    .id = 0x01
+	}
+};
+
+static struct play_tone_test play_tone_data_321 = {
+	.pdu = play_tone_321,
+	.pdu_len = sizeof(play_tone_321),
+	.qualifier = 0x00,
+	.alpha_id = "<BASIC-ICON>",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.icon_id = {
+	    .qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+	    .id = 0x01
+	}
+};
+
+static struct play_tone_test play_tone_data_331 = {
+	.pdu = play_tone_331,
+	.pdu_len = sizeof(play_tone_331),
+	.qualifier = 0x00,
+	.alpha_id = "<COLOUR-ICON>",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.icon_id = {
+	    .qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+	    .id = 0x02
+	}
+};
+
+static struct play_tone_test play_tone_data_341 = {
+	.pdu = play_tone_341,
+	.pdu_len = sizeof(play_tone_341),
+	.qualifier = 0x00,
+	.alpha_id = "<COLOUR-ICON>",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.icon_id = {
+	    .qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+	    .id = 0x02
+	}
+};
+
+static struct play_tone_test play_tone_data_411 = {
+	.pdu = play_tone_411,
+	.pdu_len = sizeof(play_tone_411),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_412 = {
+	.pdu = play_tone_412,
+	.pdu_len = sizeof(play_tone_412),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_421 = {
+	.pdu = play_tone_421,
+	.pdu_len = sizeof(play_tone_421),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x01, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_422 = {
+	.pdu = play_tone_422,
+	.pdu_len = sizeof(play_tone_422),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_431 = {
+	.pdu = play_tone_431,
+	.pdu_len = sizeof(play_tone_431),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x02, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_432 = {
+	.pdu = play_tone_432,
+	.pdu_len = sizeof(play_tone_432),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_441 = {
+	.pdu = play_tone_441,
+	.pdu_len = sizeof(play_tone_441),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x04, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_442 = {
+	.pdu = play_tone_442,
+	.pdu_len = sizeof(play_tone_442),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_443 = {
+	.pdu = play_tone_443,
+	.pdu_len = sizeof(play_tone_443),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 3",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_451 = {
+	.pdu = play_tone_451,
+	.pdu_len = sizeof(play_tone_451),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x08, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_452 = {
+	.pdu = play_tone_452,
+	.pdu_len = sizeof(play_tone_452),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_453 = {
+	.pdu = play_tone_453,
+	.pdu_len = sizeof(play_tone_453),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 3",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_461 = {
+	.pdu = play_tone_461,
+	.pdu_len = sizeof(play_tone_461),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x10, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_462 = {
+	.pdu = play_tone_462,
+	.pdu_len = sizeof(play_tone_462),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_463 = {
+	.pdu = play_tone_463,
+	.pdu_len = sizeof(play_tone_463),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 3",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_471 = {
+	.pdu = play_tone_471,
+	.pdu_len = sizeof(play_tone_471),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x20, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_472 = {
+	.pdu = play_tone_472,
+	.pdu_len = sizeof(play_tone_472),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_473 = {
+	.pdu = play_tone_473,
+	.pdu_len = sizeof(play_tone_473),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 3",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_481 = {
+	.pdu = play_tone_481,
+	.pdu_len = sizeof(play_tone_481),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x40, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_482 = {
+	.pdu = play_tone_482,
+	.pdu_len = sizeof(play_tone_482),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_483 = {
+	.pdu = play_tone_483,
+	.pdu_len = sizeof(play_tone_483),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 3",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_491 = {
+	.pdu = play_tone_491,
+	.pdu_len = sizeof(play_tone_491),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x80, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_492 = {
+	.pdu = play_tone_492,
+	.pdu_len = sizeof(play_tone_492),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_493 = {
+	.pdu = play_tone_493,
+	.pdu_len = sizeof(play_tone_493),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 3",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_4101 = {
+	.pdu = play_tone_4101,
+	.pdu_len = sizeof(play_tone_4101),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct play_tone_test play_tone_data_4102 = {
+	.pdu = play_tone_4102,
+	.pdu_len = sizeof(play_tone_4102),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_511 = {
+	.pdu = play_tone_511,
+	.pdu_len = sizeof(play_tone_511),
+	.qualifier = 0x00,
+	.alpha_id = "中一",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_512 = {
+	.pdu = play_tone_512,
+	.pdu_len = sizeof(play_tone_512),
+	.qualifier = 0x00,
+	.alpha_id = "中一",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_513 = {
+	.pdu = play_tone_513,
+	.pdu_len = sizeof(play_tone_513),
+	.qualifier = 0x00,
+	.alpha_id = "中一",
+	.tone = STK_TONE_TYPE_POSITIVE_ACK,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 1
+	}
+};
+
+static struct play_tone_test play_tone_data_611 = {
+	.pdu = play_tone_611,
+	.pdu_len = sizeof(play_tone_611),
+	.qualifier = 0x00,
+	.alpha_id = "80ル0",
+	.tone = STK_TONE_TYPE_DIAL_TONE,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 5
+	}
+};
+
+static struct play_tone_test play_tone_data_612 = {
+	.pdu = play_tone_612,
+	.pdu_len = sizeof(play_tone_612),
+	.qualifier = 0x00,
+	.alpha_id = "81ル1",
+	.tone = STK_TONE_TYPE_DIAL_TONE,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 5
+	}
+};
+
+static struct play_tone_test play_tone_data_613 = {
+	.pdu = play_tone_613,
+	.pdu_len = sizeof(play_tone_613),
+	.qualifier = 0x00,
+	.alpha_id = "82ル2",
+	.tone = STK_TONE_TYPE_DIAL_TONE,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 5
+	}
+};
+
+/* Defined in TS 102.384 Section 27.22.4.5 */
+static void test_play_tone(gconstpointer data)
+{
+	const struct play_tone_test *test = data;
+	struct stk_command *command;
+
+	command = stk_command_new_from_pdu(test->pdu, test->pdu_len);
+
+	g_assert(command);
+
+	g_assert(command->number == 1);
+	g_assert(command->type == STK_COMMAND_TYPE_PLAY_TONE);
+	g_assert(command->qualifier == test->qualifier);
+
+	g_assert(command->src == STK_DEVICE_IDENTITY_TYPE_UICC);
+	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_EARPIECE);
+
+	check_common_text(command->play_tone.alpha_id, test->alpha_id);
+	check_common_byte(command->play_tone.tone, test->tone);
+	check_duration(&command->play_tone.duration, &test->duration);
+	check_icon_id(&command->play_tone.icon_id, &test->icon_id);
+	check_text_attr(&command->play_tone.text_attr, &test->text_attr);
+	check_frame_id(&command->play_tone.frame_id, &test->frame_id);
+
+	stk_command_free(command);
+}
+
 struct send_sms_test {
 	const unsigned char *pdu;
 	unsigned int pdu_len;
@@ -2964,6 +4211,115 @@ int main(int argc, char **argv)
 	g_test_add_data_func("/teststk/More Time 1.1.1",
 				&more_time_data_111, test_more_time);
 
+	g_test_add_data_func("/teststk/Play Tone 1.1.1",
+				&play_tone_data_111, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.2",
+				&play_tone_data_112, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.3",
+				&play_tone_data_113, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.4",
+				&play_tone_data_114, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.5",
+				&play_tone_data_115, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.6",
+				&play_tone_data_116, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.7",
+				&play_tone_data_117, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.8",
+				&play_tone_data_118, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.9",
+				&play_tone_data_119, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.10",
+				&play_tone_data_1110, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.11",
+				&play_tone_data_1111, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.12",
+				&play_tone_data_1112, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.13",
+				&play_tone_data_1113, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.14",
+				&play_tone_data_1114, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 1.1.15",
+				&play_tone_data_1115, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 2.1.1",
+				&play_tone_data_211, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 2.1.2",
+				&play_tone_data_212, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 2.1.3",
+				&play_tone_data_213, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 3.1.1",
+				&play_tone_data_311, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 3.2.1",
+				&play_tone_data_321, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 3.3.1",
+				&play_tone_data_331, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 3.4.1",
+				&play_tone_data_341, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.1.1",
+				&play_tone_data_411, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.1.2",
+				&play_tone_data_412, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.2.1",
+				&play_tone_data_421, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.2.2",
+				&play_tone_data_422, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.3.1",
+				&play_tone_data_431, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.3.2",
+				&play_tone_data_432, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.4.1",
+				&play_tone_data_441, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.4.2",
+				&play_tone_data_442, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.4.3",
+				&play_tone_data_443, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.5.1",
+				&play_tone_data_451, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.5.2",
+				&play_tone_data_452, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.5.3",
+				&play_tone_data_453, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.6.1",
+				&play_tone_data_461, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.6.2",
+				&play_tone_data_462, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.6.3",
+				&play_tone_data_463, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.7.1",
+				&play_tone_data_471, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.7.2",
+				&play_tone_data_472, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.7.3",
+				&play_tone_data_473, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.8.1",
+				&play_tone_data_481, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.8.2",
+				&play_tone_data_482, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.8.3",
+				&play_tone_data_483, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.9.1",
+				&play_tone_data_491, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.9.2",
+				&play_tone_data_492, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.9.3",
+				&play_tone_data_493, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.10.1",
+				&play_tone_data_4101, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 4.10.2",
+				&play_tone_data_4102, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 5.1.1",
+				&play_tone_data_511, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 5.1.2",
+				&play_tone_data_512, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 5.1.3",
+				&play_tone_data_513, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 6.1.1",
+				&play_tone_data_611, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 6.1.2",
+				&play_tone_data_612, test_play_tone);
+	g_test_add_data_func("/teststk/Play Tone 6.1.3",
+				&play_tone_data_613, test_play_tone);
+
 	g_test_add_data_func("/teststk/Send SMS 1.1",
 				&send_sms_data_11, test_send_sms);
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 09/19] stkutil: Add poll interval proactive command parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (6 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 08/19] test-stkutil: Add unit test for play tone parser Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-11 19:23   ` Denis Kenzior
  2010-05-10 10:38 ` [PATCH 10/19] test-stkutil: Add unit test for poll interval parser Yang Gu
                   ` (10 subsequent siblings)
  18 siblings, 1 reply; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 src/stkutil.c |   27 +++++++++++++++++++++++++++
 src/stkutil.h |    1 +
 2 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/stkutil.c b/src/stkutil.c
index 44cef10..2074d19 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -2230,6 +2230,30 @@ static gboolean parse_play_tone(struct stk_command *command,
 	return TRUE;
 }
 
+static gboolean parse_poll_interval(struct stk_command *command,
+					struct comprehension_tlv_iter *iter)
+{
+	gboolean ret;
+
+	if (command->src != STK_DEVICE_IDENTITY_TYPE_UICC)
+		return FALSE;
+
+	if (command->dst != STK_DEVICE_IDENTITY_TYPE_TERMINAL)
+		return FALSE;
+
+	ret = parse_dataobj(iter, STK_DATA_OBJECT_TYPE_DURATION,
+				DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM,
+				&command->duration,
+				STK_DATA_OBJECT_TYPE_INVALID);
+
+	if (ret == FALSE)
+		return FALSE;
+
+	command->destructor = NULL;
+
+	return TRUE;
+}
+
 static void destroy_send_sms(struct stk_command *command)
 {
 	g_free(command->send_sms.alpha_id);
@@ -2350,6 +2374,9 @@ struct stk_command *stk_command_new_from_pdu(const unsigned char *pdu,
 	case STK_COMMAND_TYPE_PLAY_TONE:
 		ok = parse_play_tone(command, &iter);
 		break;
+	case STK_COMMAND_TYPE_POLL_INTERVAL:
+		ok = parse_poll_interval(command, &iter);
+		break;
 	case STK_COMMAND_TYPE_SEND_SMS:
 		ok = parse_send_sms(command, &iter);
 		break;
diff --git a/src/stkutil.h b/src/stkutil.h
index 00c001b..dc25f99 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -841,6 +841,7 @@ struct stk_command {
 	enum stk_device_identity_type dst;
 
 	union {
+		struct stk_duration duration;
 		struct stk_command_display_text display_text;
 		struct stk_command_get_inkey get_inkey;
 		struct stk_command_get_input get_input;
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 10/19] test-stkutil: Add unit test for poll interval parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (7 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 09/19] stkutil: Add poll interval proactive command parser Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-10 10:38 ` [PATCH 11/19] stkutil: Add setup menu proactive command parser Yang Gu
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 unit/test-stkutil.c |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 65688ea..fdfaf68 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -3882,6 +3882,49 @@ static void test_play_tone(gconstpointer data)
 	stk_command_free(command);
 }
 
+struct poll_interval_test {
+	const unsigned char *pdu;
+	unsigned int pdu_len;
+	unsigned char qualifier;
+	struct stk_duration duration;
+};
+
+static unsigned char poll_interval_111[] = { 0xD0, 0x0D, 0x81, 0x03, 0x01, 0x03,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x84, 0x02, 0x01, 0x14 };
+
+static struct poll_interval_test poll_interval_data_111 = {
+	.pdu = poll_interval_111,
+	.pdu_len = sizeof(poll_interval_111),
+	.qualifier = 0x00,
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 20
+	}
+};
+
+/* Defined in TS 102.384 Section 27.22.4.6 */
+static void test_poll_interval(gconstpointer data)
+{
+	const struct poll_interval_test *test = data;
+	struct stk_command *command;
+
+	command = stk_command_new_from_pdu(test->pdu, test->pdu_len);
+
+	g_assert(command);
+
+	g_assert(command->number == 1);
+	g_assert(command->type == STK_COMMAND_TYPE_POLL_INTERVAL);
+	g_assert(command->qualifier == test->qualifier);
+
+	g_assert(command->src == STK_DEVICE_IDENTITY_TYPE_UICC);
+	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_TERMINAL);
+
+	check_duration(&command->duration, &test->duration);
+
+	stk_command_free(command);
+}
+
 struct send_sms_test {
 	const unsigned char *pdu;
 	unsigned int pdu_len;
@@ -4320,6 +4363,9 @@ int main(int argc, char **argv)
 	g_test_add_data_func("/teststk/Play Tone 6.1.3",
 				&play_tone_data_613, test_play_tone);
 
+	g_test_add_data_func("/teststk/Poll Interval 1.1.1",
+				&poll_interval_data_111, test_poll_interval);
+
 	g_test_add_data_func("/teststk/Send SMS 1.1",
 				&send_sms_data_11, test_send_sms);
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 11/19] stkutil: Add setup menu proactive command parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (8 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 10/19] test-stkutil: Add unit test for poll interval parser Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-11 19:21   ` Denis Kenzior
  2010-05-10 10:38 ` [PATCH 12/19] test-stkutil: Add unit test for setup menu parser Yang Gu
                   ` (8 subsequent siblings)
  18 siblings, 1 reply; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 src/stkutil.c |  133 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
 src/stkutil.h |   11 +++++
 2 files changed, 132 insertions(+), 12 deletions(-)

diff --git a/src/stkutil.c b/src/stkutil.c
index 2074d19..45bb285 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -281,8 +281,9 @@ static gboolean parse_dataobj_alpha_id(struct comprehension_tlv_iter *iter,
 	char *utf8;
 
 	len = comprehension_tlv_iter_get_length(iter);
-	if (len < 1)
-		return FALSE;
+
+	if (len == 0)
+		return TRUE;
 
 	data = comprehension_tlv_iter_get_data(iter);
 	utf8 = sim_string_to_utf8(data, len);
@@ -373,8 +374,10 @@ static gboolean parse_dataobj_item(struct comprehension_tlv_iter *iter,
 	char *utf8;
 
 	len = comprehension_tlv_iter_get_length(iter);
-	if (len < 2)
-		return FALSE;
+
+	if (len == 0)
+		return TRUE;
+
 
 	data = comprehension_tlv_iter_get_data(iter);
 
@@ -2006,6 +2009,7 @@ static gboolean parse_dataobj(struct comprehension_tlv_iter *iter,
 	GSList *l;
 	va_list args;
 	gboolean minimum_set = TRUE;
+	GSList **list = NULL;
 
 	va_start(args, type);
 
@@ -2022,29 +2026,74 @@ static gboolean parse_dataobj(struct comprehension_tlv_iter *iter,
 		entries = g_slist_prepend(entries, entry);
 	}
 
-
 	if (comprehension_tlv_iter_next(iter) != TRUE)
 		goto out;
 
 	entries = g_slist_reverse(entries);
 
-	for (l = entries; l; l = l->next) {
+	for (l = entries; l;) {
 		dataobj_handler handler;
 		struct dataobj_handler_entry *entry = l->data;
+		unsigned short tag;
+		gboolean ret;
+		void *dataobj;
 
 		handler = handler_for_type(entry->type);
-		if (handler == NULL)
+		if (handler == NULL) {
+			l = l->next;
 			continue;
+		}
 
-		if (comprehension_tlv_iter_get_tag(iter) == entry->type) {
-			if (handler(iter, entry->data))
-				entry->parsed = TRUE;
-			if (comprehension_tlv_iter_next(iter) == FALSE)
-				break;
+		tag = comprehension_tlv_iter_get_tag(iter);
+		if (tag != entry->type) {
+			l = l->next;
+			continue;
 		}
+
+		if (tag == STK_DATA_OBJECT_TYPE_PROVISIONING_FILE_REFERENCE ||
+			tag == STK_DATA_OBJECT_TYPE_ITEM) {
+
+			if (tag == STK_DATA_OBJECT_TYPE_ITEM)
+				dataobj = g_try_new0(struct stk_item, 1);
+			else
+				dataobj = g_try_new0(struct stk_file, 1);
+
+			if (!dataobj)
+				goto out;
+
+			if (!list)
+				list = entry->data;
+
+			ret = handler(iter, dataobj);
+		} else
+			ret = handler(iter, entry->data);
+
+		if (ret)
+			entry->parsed = TRUE;
+
+		if (tag == STK_DATA_OBJECT_TYPE_PROVISIONING_FILE_REFERENCE ||
+			tag == STK_DATA_OBJECT_TYPE_ITEM) {
+
+			if (tag == STK_DATA_OBJECT_TYPE_ITEM) {
+				struct stk_item *item = dataobj;
+				/* either return is FALSE or item is empty */
+				if (item->id == 0)
+					g_free(item);
+				else
+					*list = g_slist_prepend(*list, item);
+			} else
+				*list = g_slist_prepend(*list, dataobj);
+		} else
+			l = l->next;
+
+		if (comprehension_tlv_iter_next(iter) == FALSE)
+			break;
 	}
 
 out:
+	if (list)
+		*list = g_slist_reverse(*list);
+
 	for (l = entries; l; l = l->next) {
 		struct dataobj_handler_entry *entry = l->data;
 
@@ -2254,6 +2303,63 @@ static gboolean parse_poll_interval(struct stk_command *command,
 	return TRUE;
 }
 
+static void destroy_stk_item(struct stk_item *item)
+{
+	g_free(item->text);
+	g_free(item);
+}
+
+static void destroy_setup_menu(struct stk_command *command)
+{
+	g_free(command->setup_menu.alpha_id);
+	g_slist_foreach(command->setup_menu.items,
+				(GFunc)destroy_stk_item, NULL);
+	g_slist_free(command->setup_menu.items);
+}
+
+static gboolean parse_setup_menu(struct stk_command *command,
+					struct comprehension_tlv_iter *iter)
+{
+	struct stk_command_setup_menu *obj = &command->setup_menu;
+	gboolean ret;
+
+	if (command->src != STK_DEVICE_IDENTITY_TYPE_UICC)
+		goto error;
+
+	if (command->dst != STK_DEVICE_IDENTITY_TYPE_TERMINAL)
+		goto error;
+
+	ret = parse_dataobj(iter,
+			STK_DATA_OBJECT_TYPE_ALPHA_ID,
+			DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM,
+			&obj->alpha_id,
+			STK_DATA_OBJECT_TYPE_ITEM,
+			DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM,
+			&obj->items,
+			STK_DATA_OBJECT_TYPE_ITEMS_NEXT_ACTION_INDICATOR, 0,
+			&obj->next_act,
+			STK_DATA_OBJECT_TYPE_ICON_ID, 0,
+			&obj->icon_id,
+			STK_DATA_OBJECT_TYPE_ITEM_ICON_ID_LIST, 0,
+			&obj->item_icon_id_list,
+			STK_DATA_OBJECT_TYPE_TEXT_ATTRIBUTE, 0,
+			&obj->text_attr,
+			STK_DATA_OBJECT_TYPE_ITEM_TEXT_ATTRIBUTE_LIST, 0,
+			&obj->item_text_attr_list,
+			STK_DATA_OBJECT_TYPE_INVALID);
+
+	if (ret == FALSE)
+		goto error;
+
+	command->destructor = destroy_setup_menu;
+
+	return TRUE;
+
+error:
+	destroy_setup_menu(command);
+	return FALSE;
+}
+
 static void destroy_send_sms(struct stk_command *command)
 {
 	g_free(command->send_sms.alpha_id);
@@ -2377,6 +2483,9 @@ struct stk_command *stk_command_new_from_pdu(const unsigned char *pdu,
 	case STK_COMMAND_TYPE_POLL_INTERVAL:
 		ok = parse_poll_interval(command, &iter);
 		break;
+	case STK_COMMAND_TYPE_SETUP_MENU:
+		ok = parse_setup_menu(command, &iter);
+		break;
 	case STK_COMMAND_TYPE_SEND_SMS:
 		ok = parse_send_sms(command, &iter);
 		break;
diff --git a/src/stkutil.h b/src/stkutil.h
index dc25f99..d91ac66 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -824,6 +824,16 @@ struct stk_command_play_tone {
 	struct stk_frame_id frame_id;
 };
 
+struct stk_command_setup_menu {
+	char *alpha_id;
+	GSList *items;
+	struct stk_items_next_action_indicator next_act;
+	struct stk_icon_id icon_id;
+	struct stk_item_icon_id_list item_icon_id_list;
+	struct stk_text_attribute text_attr;
+	struct stk_item_text_attribute_list item_text_attr_list;
+};
+
 struct stk_command_send_sms {
 	char *alpha_id;
 	struct stk_address address;
@@ -846,6 +856,7 @@ struct stk_command {
 		struct stk_command_get_inkey get_inkey;
 		struct stk_command_get_input get_input;
 		struct stk_command_play_tone play_tone;
+		struct stk_command_setup_menu setup_menu;
 		struct stk_command_send_sms send_sms;
 	};
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 12/19] test-stkutil: Add unit test for setup menu parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (9 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 11/19] stkutil: Add setup menu proactive command parser Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-10 10:38 ` [PATCH 13/19] stkutil: Add select item proactive command parser Yang Gu
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 unit/test-stkutil.c | 1617 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 1616 insertions(+), 1 deletions(-)

diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index fdfaf68..941c443 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -23,7 +23,6 @@
 #include <config.h>
 #endif
 
-#include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
@@ -35,6 +34,8 @@
 #include "smsutil.h"
 #include "stkutil.h"
 
+#define MAX_ITEM 100
+
 static gboolean g_mem_equal(const unsigned char *v1, const unsigned char *v2,
 				unsigned int len)
 {
@@ -77,6 +78,28 @@ static void check_duration(const struct stk_duration *command,
 	g_assert(command->interval == test->interval);
 }
 
+/* Defined in TS 102.223 Section 8.9 */
+static void check_item(const struct stk_item *command,
+					const struct stk_item *test)
+{
+	g_assert(command->id == test->id);
+	g_assert(g_str_equal(command->text, test->text));
+}
+
+static void check_items(GSList *command, const struct stk_item *test)
+{
+	struct stk_item *si;
+	GSList *l;
+	unsigned int i = 0;
+
+	for (l = command; l; l = l->next) {
+		si = l->data;
+		check_item(si, &test[i++]);
+	}
+
+	g_assert(test[i].id == 0);
+}
+
 /* Defined in TS 102.223 Section 8.11 */
 static void check_response_length(const struct stk_response_length *command,
 					const struct stk_response_length *test)
@@ -85,6 +108,15 @@ static void check_response_length(const struct stk_response_length *command,
 	g_assert(command->max == test->max);
 }
 
+/* Defined in TS 102.223 Section 8.24 */
+static void check_items_next_action_indicator(
+			const struct stk_items_next_action_indicator *command,
+			const struct stk_items_next_action_indicator *test)
+{
+	g_assert(command->len == test->len);
+	g_assert(g_mem_equal(command->list, test->list, test->len));
+}
+
 /* Defined in TS 102.223 Section 8.31 */
 static void check_icon_id(const struct stk_icon_id *command,
 					const struct stk_icon_id *test)
@@ -93,6 +125,15 @@ static void check_icon_id(const struct stk_icon_id *command,
 	g_assert(command->qualifier == test->qualifier);
 }
 
+/* Defined in TS 102.223 Section 8.32 */
+static void check_item_icon_id_list(const struct stk_item_icon_id_list *command,
+				const struct stk_item_icon_id_list *test)
+{
+	g_assert(command->qualifier == test->qualifier);
+	g_assert(command->len == test->len);
+	g_assert(g_mem_equal(command->list, test->list, test->len));
+}
+
 /* Defined in TS 102.223 Section 8.72 */
 static void check_text_attr(const struct stk_text_attribute *command,
 					const struct stk_text_attribute *test)
@@ -101,6 +142,15 @@ static void check_text_attr(const struct stk_text_attribute *command,
 	g_assert(g_mem_equal(command->attributes, test->attributes, test->len));
 }
 
+/* Defined in TS 102.223 Section 8.73 */
+static void check_item_text_attribute_list(
+			const struct stk_item_text_attribute_list *command,
+			const struct stk_item_text_attribute_list *test)
+{
+	g_assert(command->len == test->len);
+	g_assert(g_mem_equal(command->list, test->list, test->len));
+}
+
 /* Defined in TS 102.223 Section 8.80 */
 static void check_frame_id(const struct stk_frame_id *command,
 					const struct stk_frame_id *test)
@@ -3925,6 +3975,1500 @@ static void test_poll_interval(gconstpointer data)
 	stk_command_free(command);
 }
 
+struct setup_menu_test {
+	const unsigned char *pdu;
+	unsigned int pdu_len;
+	unsigned char qualifier;
+	char *alpha_id;
+	struct stk_item items[MAX_ITEM];
+	struct stk_items_next_action_indicator next_act;
+	struct stk_icon_id icon_id;
+	struct stk_item_icon_id_list item_icon_id_list;
+	struct stk_text_attribute text_attr;
+	struct stk_item_text_attribute_list item_text_attr_list;
+};
+
+static unsigned char setup_menu_111[] = { 0xD0, 0x3B, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0C, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x8F,
+						0x07, 0x01, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x31, 0x8F, 0x07,
+						0x02, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x32, 0x8F, 0x07, 0x03,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x33, 0x8F, 0x07, 0x04, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x34 };
+
+static unsigned char setup_menu_112[] = { 0xD0, 0x23, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0C, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x8F,
+						0x04, 0x11, 0x4F, 0x6E, 0x65,
+						0x8F, 0x04, 0x12, 0x54, 0x77,
+						0x6F };
+
+static unsigned char setup_menu_113[] = { 0xD0, 0x0D, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x00, 0x8F, 0x00 };
+
+static unsigned char setup_menu_121[] = { 0xD0, 0x81, 0xFC, 0x81, 0x03, 0x01,
+						0x25, 0x00, 0x82, 0x02, 0x81,
+						0x82, 0x85, 0x0A, 0x4C, 0x61,
+						0x72, 0x67, 0x65, 0x4D, 0x65,
+						0x6E, 0x75, 0x31, 0x8F, 0x05,
+						0x50, 0x5A, 0x65, 0x72, 0x6F,
+						0x8F, 0x04, 0x4F, 0x4F, 0x6E,
+						0x65, 0x8F, 0x04, 0x4E, 0x54,
+						0x77, 0x6F, 0x8F, 0x06, 0x4D,
+						0x54, 0x68, 0x72, 0x65, 0x65,
+						0x8F, 0x05, 0x4C, 0x46, 0x6F,
+						0x75, 0x72, 0x8F, 0x05, 0x4B,
+						0x46, 0x69, 0x76, 0x65, 0x8F,
+						0x04, 0x4A, 0x53, 0x69, 0x78,
+						0x8F, 0x06, 0x49, 0x53, 0x65,
+						0x76, 0x65, 0x6E, 0x8F, 0x06,
+						0x48, 0x45, 0x69, 0x67, 0x68,
+						0x74, 0x8F, 0x05, 0x47, 0x4E,
+						0x69, 0x6E, 0x65, 0x8F, 0x06,
+						0x46, 0x41, 0x6C, 0x70, 0x68,
+						0x61, 0x8F, 0x06, 0x45, 0x42,
+						0x72, 0x61, 0x76, 0x6F, 0x8F,
+						0x08, 0x44, 0x43, 0x68, 0x61,
+						0x72, 0x6C, 0x69, 0x65, 0x8F,
+						0x06, 0x43, 0x44, 0x65, 0x6C,
+						0x74, 0x61, 0x8F, 0x05, 0x42,
+						0x45, 0x63, 0x68, 0x6F, 0x8F,
+						0x09, 0x41, 0x46, 0x6F, 0x78,
+						0x2D, 0x74, 0x72, 0x6F, 0x74,
+						0x8F, 0x06, 0x40, 0x42, 0x6C,
+						0x61, 0x63, 0x6B, 0x8F, 0x06,
+						0x3F, 0x42, 0x72, 0x6F, 0x77,
+						0x6E, 0x8F, 0x04, 0x3E, 0x52,
+						0x65, 0x64, 0x8F, 0x07, 0x3D,
+						0x4F, 0x72, 0x61, 0x6E, 0x67,
+						0x65, 0x8F, 0x07, 0x3C, 0x59,
+						0x65, 0x6C, 0x6C, 0x6F, 0x77,
+						0x8F, 0x06, 0x3B, 0x47, 0x72,
+						0x65, 0x65, 0x6E, 0x8F, 0x05,
+						0x3A, 0x42, 0x6C, 0x75, 0x65,
+						0x8F, 0x07, 0x39, 0x56, 0x69,
+						0x6F, 0x6C, 0x65, 0x74, 0x8F,
+						0x05, 0x38, 0x47, 0x72, 0x65,
+						0x79, 0x8F, 0x06, 0x37, 0x57,
+						0x68, 0x69, 0x74, 0x65, 0x8F,
+						0x06, 0x36, 0x6D, 0x69, 0x6C,
+						0x6C, 0x69, 0x8F, 0x06, 0x35,
+						0x6D, 0x69, 0x63, 0x72, 0x6F,
+						0x8F, 0x05, 0x34, 0x6E, 0x61,
+						0x6E, 0x6F, 0x8F, 0x05, 0x33,
+						0x70, 0x69, 0x63, 0x6F };
+
+static unsigned char setup_menu_122[] = { 0xD0, 0x81, 0xF3, 0x81, 0x03, 0x01,
+						0x25, 0x00, 0x82, 0x02, 0x81,
+						0x82, 0x85, 0x0A, 0x4C, 0x61,
+						0x72, 0x67, 0x65, 0x4D, 0x65,
+						0x6E, 0x75, 0x32, 0x8F, 0x1D,
+						0xFF, 0x31, 0x20, 0x43, 0x61,
+						0x6C, 0x6C, 0x20, 0x46, 0x6F,
+						0x72, 0x77, 0x61, 0x72, 0x64,
+						0x20, 0x55, 0x6E, 0x63, 0x6F,
+						0x6E, 0x64, 0x69, 0x74, 0x69,
+						0x6F, 0x6E, 0x61, 0x6C, 0x8F,
+						0x1C, 0xFE, 0x32, 0x20, 0x43,
+						0x61, 0x6C, 0x6C, 0x20, 0x46,
+						0x6F, 0x72, 0x77, 0x61, 0x72,
+						0x64, 0x20, 0x4F, 0x6E, 0x20,
+						0x55, 0x73, 0x65, 0x72, 0x20,
+						0x42, 0x75, 0x73, 0x79, 0x8F,
+						0x1B, 0xFD, 0x33, 0x20, 0x43,
+						0x61, 0x6C, 0x6C, 0x20, 0x46,
+						0x6F, 0x72, 0x77, 0x61, 0x72,
+						0x64, 0x20, 0x4F, 0x6E, 0x20,
+						0x4E, 0x6F, 0x20, 0x52, 0x65,
+						0x70, 0x6C, 0x79, 0x8F, 0x25,
+						0xFC, 0x34, 0x20, 0x43, 0x61,
+						0x6C, 0x6C, 0x20, 0x46, 0x6F,
+						0x72, 0x77, 0x61, 0x72, 0x64,
+						0x20, 0x4F, 0x6E, 0x20, 0x55,
+						0x73, 0x65, 0x72, 0x20, 0x4E,
+						0x6F, 0x74, 0x20, 0x52, 0x65,
+						0x61, 0x63, 0x68, 0x61, 0x62,
+						0x6C, 0x65, 0x8F, 0x20, 0xFB,
+						0x35, 0x20, 0x42, 0x61, 0x72,
+						0x72, 0x69, 0x6E, 0x67, 0x20,
+						0x4F, 0x66, 0x20, 0x41, 0x6C,
+						0x6C, 0x20, 0x4F, 0x75, 0x74,
+						0x67, 0x6F, 0x69, 0x6E, 0x67,
+						0x20, 0x43, 0x61, 0x6C, 0x6C,
+						0x73, 0x8F, 0x24, 0xFA, 0x36,
+						0x20, 0x42, 0x61, 0x72, 0x72,
+						0x69, 0x6E, 0x67, 0x20, 0x4F,
+						0x66, 0x20, 0x41, 0x6C, 0x6C,
+						0x20, 0x4F, 0x75, 0x74, 0x67,
+						0x6F, 0x69, 0x6E, 0x67, 0x20,
+						0x49, 0x6E, 0x74, 0x20, 0x43,
+						0x61, 0x6C, 0x6C, 0x73, 0x8F,
+						0x13, 0xF9, 0x37, 0x20, 0x43,
+						0x4C, 0x49, 0x20, 0x50, 0x72,
+						0x65, 0x73, 0x65, 0x6E, 0x74,
+						0x61, 0x74, 0x69, 0x6F, 0x6E };
+
+static unsigned char setup_menu_123[] = { 0xD0, 0x81, 0xFC, 0x81, 0x03, 0x01,
+						0x25, 0x00, 0x82, 0x02, 0x81,
+						0x82, 0x85, 0x81, 0xEC, 0x54,
+						0x68, 0x65, 0x20, 0x53, 0x49,
+						0x4D, 0x20, 0x73, 0x68, 0x61,
+						0x6C, 0x6C, 0x20, 0x73, 0x75,
+						0x70, 0x70, 0x6C, 0x79, 0x20,
+						0x61, 0x20, 0x73, 0x65, 0x74,
+						0x20, 0x6F, 0x66, 0x20, 0x6D,
+						0x65, 0x6E, 0x75, 0x20, 0x69,
+						0x74, 0x65, 0x6D, 0x73, 0x2C,
+						0x20, 0x77, 0x68, 0x69, 0x63,
+						0x68, 0x20, 0x73, 0x68, 0x61,
+						0x6C, 0x6C, 0x20, 0x62, 0x65,
+						0x20, 0x69, 0x6E, 0x74, 0x65,
+						0x67, 0x72, 0x61, 0x74, 0x65,
+						0x64, 0x20, 0x77, 0x69, 0x74,
+						0x68, 0x20, 0x74, 0x68, 0x65,
+						0x20, 0x6D, 0x65, 0x6E, 0x75,
+						0x20, 0x73, 0x79, 0x73, 0x74,
+						0x65, 0x6D, 0x20, 0x28, 0x6F,
+						0x72, 0x20, 0x6F, 0x74, 0x68,
+						0x65, 0x72, 0x20, 0x4D, 0x4D,
+						0x49, 0x20, 0x66, 0x61, 0x63,
+						0x69, 0x6C, 0x69, 0x74, 0x79,
+						0x29, 0x20, 0x69, 0x6E, 0x20,
+						0x6F, 0x72, 0x64, 0x65, 0x72,
+						0x20, 0x74, 0x6F, 0x20, 0x67,
+						0x69, 0x76, 0x65, 0x20, 0x74,
+						0x68, 0x65, 0x20, 0x75, 0x73,
+						0x65, 0x72, 0x20, 0x74, 0x68,
+						0x65, 0x20, 0x6F, 0x70, 0x70,
+						0x6F, 0x72, 0x74, 0x75, 0x6E,
+						0x69, 0x74, 0x79, 0x20, 0x74,
+						0x6F, 0x20, 0x63, 0x68, 0x6F,
+						0x6F, 0x73, 0x65, 0x20, 0x6F,
+						0x6E, 0x65, 0x20, 0x6F, 0x66,
+						0x20, 0x74, 0x68, 0x65, 0x73,
+						0x65, 0x20, 0x6D, 0x65, 0x6E,
+						0x75, 0x20, 0x69, 0x74, 0x65,
+						0x6D, 0x73, 0x20, 0x61, 0x74,
+						0x20, 0x68, 0x69, 0x73, 0x20,
+						0x6F, 0x77, 0x6E, 0x20, 0x64,
+						0x69, 0x73, 0x63, 0x72, 0x65,
+						0x74, 0x69, 0x6F, 0x6E, 0x2E,
+						0x20, 0x45, 0x61, 0x63, 0x68,
+						0x20, 0x69, 0x74, 0x65, 0x6D,
+						0x20, 0x63, 0x6F, 0x6D, 0x70,
+						0x72, 0x69, 0x73, 0x65, 0x73,
+						0x20, 0x61, 0x20, 0x73, 0x68,
+						0x8F, 0x02, 0x01, 0x59 };
+
+static unsigned char setup_menu_211[] = { 0xD0, 0x3B, 0x81, 0x03, 0x01, 0x25,
+						0x80, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0C, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x8F,
+						0x07, 0x01, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x31, 0x8F, 0x07,
+						0x02, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x32, 0x8F, 0x07, 0x03,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x33, 0x8F, 0x07, 0x04, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x34 };
+
+static unsigned char setup_menu_311[] = { 0xD0, 0x41, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0C, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x8F,
+						0x07, 0x01, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x31, 0x8F, 0x07,
+						0x02, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x32, 0x8F, 0x07, 0x03,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x33, 0x8F, 0x07, 0x04, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x34,
+						0x18, 0x04, 0x13, 0x10, 0x15,
+						0x26 };
+
+static unsigned char setup_menu_411[] = { 0xD0, 0x3C, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0C, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x8F,
+						0x07, 0x01, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x31, 0x8F, 0x07,
+						0x02, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x32, 0x8F, 0x07, 0x03,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x33, 0x9E, 0x02, 0x01, 0x01,
+						0x9F, 0x04, 0x01, 0x05, 0x05,
+						0x05 };
+
+static unsigned char setup_menu_421[] = { 0xD0, 0x3C, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0C, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x8F,
+						0x07, 0x01, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x31, 0x8F, 0x07,
+						0x02, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x32, 0x8F, 0x07, 0x03,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x33, 0x9E, 0x02, 0x00, 0x01,
+						0x9F, 0x04, 0x00, 0x05, 0x05,
+						0x05 };
+
+static unsigned char setup_menu_511[] = { 0xD0, 0x29, 0x81, 0x03, 0x01, 0x25,
+						0x01, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0C, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x8F,
+						0x07, 0x01, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x31, 0x8F, 0x07,
+						0x02, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x32 };
+
+static unsigned char setup_menu_611[] = { 0xD0, 0x48, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x31, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0xD0, 0x04,
+						0x00, 0x0E, 0x00, 0xB4, 0xD1,
+						0x0C, 0x00, 0x06, 0x00, 0xB4,
+						0x00, 0x06, 0x00, 0xB4, 0x00,
+						0x06, 0x00, 0xB4 };
+
+static unsigned char setup_menu_612[] = { 0xD0, 0x34, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x32, 0x8F, 0x07, 0x04, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x34,
+						0x8F, 0x07, 0x05, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x35, 0x8F,
+						0x07, 0x06, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x36 };
+
+static unsigned char setup_menu_621[] = { 0xD0, 0x48, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x31, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0xD0, 0x04,
+						0x00, 0x0E, 0x01, 0xB4, 0xD1,
+						0x0C, 0x00, 0x06, 0x01, 0xB4,
+						0x00, 0x06, 0x01, 0xB4, 0x00,
+						0x06, 0x01, 0xB4 };
+
+static unsigned char setup_menu_622[] = { 0xD0, 0x34, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x32, 0x8F, 0x07, 0x04, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x34,
+						0x8F, 0x07, 0x05, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x35, 0x8F,
+						0x07, 0x06, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x36 };
+
+static unsigned char setup_menu_631[] = { 0xD0, 0x48, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x31, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0xD0, 0x04,
+						0x00, 0x0E, 0x02, 0xB4, 0xD1,
+						0x0C, 0x00, 0x06, 0x02, 0xB4,
+						0x00, 0x06, 0x02, 0xB4, 0x00,
+						0x06, 0x02, 0xB4 };
+
+static unsigned char setup_menu_632[] = { 0xD0, 0x34, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x32, 0x8F, 0x07, 0x04, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x34,
+						0x8F, 0x07, 0x05, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x35, 0x8F,
+						0x07, 0x06, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x36 };
+
+static unsigned char setup_menu_641[] = { 0xD0, 0x48, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x31, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0xD0, 0x04,
+						0x00, 0x0E, 0x04, 0xB4, 0xD1,
+						0x0C, 0x00, 0x06, 0x04, 0xB4,
+						0x00, 0x06, 0x04, 0xB4, 0x00,
+						0x06, 0x04, 0xB4 };
+
+static unsigned char setup_menu_642[] = { 0xD0, 0x48, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x32, 0x8F, 0x07, 0x04, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x34,
+						0x8F, 0x07, 0x05, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x35, 0x8F,
+						0x07, 0x06, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x36, 0xD0, 0x04,
+						0x00, 0x0E, 0x00, 0xB4, 0xD1,
+						0x0C, 0x00, 0x06, 0x00, 0xB4,
+						0x00, 0x06, 0x00, 0xB4, 0x00,
+						0x06, 0x00, 0xB4 };
+
+static unsigned char setup_menu_643[] = { 0xD0, 0x34, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x33, 0x8F, 0x07, 0x07, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x37,
+						0x8F, 0x07, 0x08, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x38, 0x8F,
+						0x07, 0x09, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x39 };
+
+static unsigned char setup_menu_651[] = { 0xD0, 0x48, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x31, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0xD0, 0x04,
+						0x00, 0x0E, 0x08, 0xB4, 0xD1,
+						0x0C, 0x00, 0x06, 0x08, 0xB4,
+						0x00, 0x06, 0x08, 0xB4, 0x00,
+						0x06, 0x08, 0xB4 };
+
+static unsigned char setup_menu_661[] = { 0xD0, 0x48, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x31, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0xD0, 0x04,
+						0x00, 0x0E, 0x10, 0xB4, 0xD1,
+						0x0C, 0x00, 0x06, 0x10, 0xB4,
+						0x00, 0x06, 0x10, 0xB4, 0x00,
+						0x06, 0x10, 0xB4 };
+
+static unsigned char setup_menu_671[] = { 0xD0, 0x48, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x31, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0xD0, 0x04,
+						0x00, 0x0E, 0x20, 0xB4, 0xD1,
+						0x0C, 0x00, 0x06, 0x20, 0xB4,
+						0x00, 0x06, 0x20, 0xB4, 0x00,
+						0x06, 0x20, 0xB4 };
+
+static unsigned char setup_menu_681[] = { 0xD0, 0x48, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x31, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0xD0, 0x04,
+						0x00, 0x0E, 0x40, 0xB4, 0xD1,
+						0x0C, 0x00, 0x06, 0x40, 0xB4,
+						0x00, 0x06, 0x40, 0xB4, 0x00,
+						0x06, 0x40, 0xB4 };
+
+static unsigned char setup_menu_691[] = { 0xD0, 0x48, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x20,
+						0x31, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0xD0, 0x04,
+						0x00, 0x0E, 0x80, 0xB4, 0xD1,
+						0x0C, 0x00, 0x06, 0x80, 0xB4,
+						0x00, 0x06, 0x80, 0xB4, 0x00,
+						0x06, 0x80, 0xB4 };
+
+static unsigned char setup_menu_6101[] = { 0xD0, 0x46, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0C, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x4D, 0x65, 0x6E, 0x75, 0x8F,
+						0x07, 0x01, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x31, 0x8F, 0x07,
+						0x02, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x32, 0x8F, 0x07, 0x03,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x33, 0xD0, 0x04, 0x00, 0x0C,
+						0x00, 0xB4, 0xD1, 0x0C, 0x00,
+						0x06, 0x00, 0xB4, 0x00, 0x06,
+						0x00, 0xB4, 0x00, 0x06, 0x00,
+						0xB4 };
+
+static unsigned char setup_menu_711[] = { 0xD0, 0x81, 0x9C, 0x81, 0x03, 0x01,
+						0x25, 0x00, 0x82, 0x02, 0x81,
+						0x82, 0x85, 0x19, 0x80, 0x04,
+						0x17, 0x04, 0x14, 0x04, 0x20,
+						0x04, 0x10, 0x04, 0x12, 0x04,
+						0x21, 0x04, 0x22, 0x04, 0x12,
+						0x04, 0x23, 0x04, 0x19, 0x04,
+						0x22, 0x04, 0x15, 0x8F, 0x1C,
+						0x01, 0x80, 0x04, 0x17, 0x04,
+						0x14, 0x04, 0x20, 0x04, 0x10,
+						0x04, 0x12, 0x04, 0x21, 0x04,
+						0x22, 0x04, 0x12, 0x04, 0x23,
+						0x04, 0x19, 0x04, 0x22, 0x04,
+						0x15, 0x00, 0x31, 0x8F, 0x1C,
+						0x02, 0x80, 0x04, 0x17, 0x04,
+						0x14, 0x04, 0x20, 0x04, 0x10,
+						0x04, 0x12, 0x04, 0x21, 0x04,
+						0x22, 0x04, 0x12, 0x04, 0x23,
+						0x04, 0x19, 0x04, 0x22, 0x04,
+						0x15, 0x00, 0x32, 0x8F, 0x1C,
+						0x03, 0x80, 0x04, 0x17, 0x04,
+						0x14, 0x04, 0x20, 0x04, 0x10,
+						0x04, 0x12, 0x04, 0x21, 0x04,
+						0x22, 0x04, 0x12, 0x04, 0x23,
+						0x04, 0x19, 0x04, 0x22, 0x04,
+						0x15, 0x00, 0x33, 0x8F, 0x1C,
+						0x04, 0x80, 0x04, 0x17, 0x04,
+						0x14, 0x04, 0x20, 0x04, 0x10,
+						0x04, 0x12, 0x04, 0x21, 0x04,
+						0x22, 0x04, 0x12, 0x04, 0x23,
+						0x04, 0x19, 0x04, 0x22, 0x04,
+						0x15, 0x00, 0x34 };
+
+static unsigned char setup_menu_712[] = { 0xD0, 0x60, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x19, 0x80, 0x04, 0x17,
+						0x04, 0x14, 0x04, 0x20, 0x04,
+						0x10, 0x04, 0x12, 0x04, 0x21,
+						0x04, 0x22, 0x04, 0x12, 0x04,
+						0x23, 0x04, 0x19, 0x04, 0x22,
+						0x04, 0x15, 0x8F, 0x1C, 0x11,
+						0x80, 0x04, 0x17, 0x04, 0x14,
+						0x04, 0x20, 0x04, 0x10, 0x04,
+						0x12, 0x04, 0x21, 0x04, 0x22,
+						0x04, 0x12, 0x04, 0x23, 0x04,
+						0x19, 0x04, 0x22, 0x04, 0x15,
+						0x00, 0x35, 0x8F, 0x1C, 0x12,
+						0x80, 0x04, 0x17, 0x04, 0x14,
+						0x04, 0x20, 0x04, 0x10, 0x04,
+						0x12, 0x04, 0x21, 0x04, 0x22,
+						0x04, 0x12, 0x04, 0x23, 0x04,
+						0x19, 0x04, 0x22, 0x04, 0x15,
+						0x00, 0x36 };
+
+static unsigned char setup_menu_713[] = { 0xD0, 0x0D, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x00, 0x8F, 0x00 };
+
+static unsigned char setup_menu_811[] = { 0xD0, 0x3C, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x09, 0x80, 0x5D, 0xE5,
+						0x51, 0x77, 0x7B, 0xB1, 0x53,
+						0x55, 0x8F, 0x08, 0x01, 0x80,
+						0x98, 0x79, 0x76, 0xEE, 0x4E,
+						0x00, 0x8F, 0x08, 0x02, 0x80,
+						0x98, 0x79, 0x76, 0xEE, 0x4E,
+						0x8C, 0x8F, 0x08, 0x03, 0x80,
+						0x98, 0x79, 0x76, 0xEE, 0x4E,
+						0x09, 0x8F, 0x08, 0x04, 0x80,
+						0x98, 0x79, 0x76, 0xEE, 0x56,
+						0xDB };
+
+static unsigned char setup_menu_812[] = { 0xD0, 0x20, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x09, 0x80, 0x5D, 0xE5,
+						0x51, 0x77, 0x7B, 0xB1, 0x53,
+						0x55, 0x8F, 0x04, 0x11, 0x80,
+						0x4E, 0x00, 0x8F, 0x04, 0x12,
+						0x80, 0x4E, 0x8C };
+
+static unsigned char setup_menu_813[] = { 0xD0, 0x0D, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x00, 0x8F, 0x00 };
+
+static unsigned char setup_menu_911[] = { 0xD0, 0x44, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x09, 0x80, 0x00, 0x38,
+						0x00, 0x30, 0x30, 0xEB, 0x00,
+						0x30, 0x8F, 0x0A, 0x01, 0x80,
+						0x00, 0x38, 0x00, 0x30, 0x30,
+						0xEB, 0x00, 0x31, 0x8F, 0x0A,
+						0x02, 0x80, 0x00, 0x38, 0x00,
+						0x30, 0x30, 0xEB, 0x00, 0x32,
+						0x8F, 0x0A, 0x03, 0x80, 0x00,
+						0x38, 0x00, 0x30, 0x30, 0xEB,
+						0x00, 0x33, 0x8F, 0x0A, 0x04,
+						0x80, 0x00, 0x38, 0x00, 0x30,
+						0x30, 0xEB, 0x00, 0x34 };
+
+static unsigned char setup_menu_912[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x09, 0x80, 0x00, 0x38,
+						0x00, 0x30, 0x30, 0xEB, 0x00,
+						0x30, 0x8F, 0x0A, 0x11, 0x80,
+						0x00, 0x38, 0x00, 0x30, 0x30,
+						0xEB, 0x00, 0x35, 0x8F, 0x0A,
+						0x12, 0x80, 0x00, 0x38, 0x00,
+						0x30, 0x30, 0xEB, 0x00, 0x36 };
+
+static unsigned char setup_menu_913[] = { 0xD0, 0x0D, 0x81, 0x03, 0x01, 0x25,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x00, 0x8F, 0x00 };
+
+static struct setup_menu_test setup_menu_data_111 = {
+	.pdu = setup_menu_111,
+	.pdu_len = sizeof(setup_menu_111),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.items[3] = {
+		.id = 4,
+		.text = "Item 4"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_112 = {
+	.pdu = setup_menu_112,
+	.pdu_len = sizeof(setup_menu_112),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu",
+	.items[0] = {
+		.id = 0x11,
+		.text = "One"
+	},
+	.items[1] = {
+		.id = 0x12,
+		.text = "Two"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_113 = {
+	.pdu = setup_menu_113,
+	.pdu_len = sizeof(setup_menu_113),
+	.qualifier = 0x00
+};
+
+static struct setup_menu_test setup_menu_data_121 = {
+	.pdu = setup_menu_121,
+	.pdu_len = sizeof(setup_menu_121),
+	.qualifier = 0x00,
+	.alpha_id = "LargeMenu1",
+	.items[0] = {
+		.id = 0x50,
+		.text = "Zero"
+	},
+	.items[1] = {
+		.id = 0x4F,
+		.text = "One"
+	},
+	.items[2] = {
+		.id = 0x4E,
+		.text = "Two"
+	},
+	.items[3] = {
+		.id = 0x4D,
+		.text = "Three"
+	},
+	.items[4] = {
+		.id = 0x4C,
+		.text = "Four"
+	},
+	.items[5] = {
+		.id = 0x4B,
+		.text = "Five"
+	},
+	.items[6] = {
+		.id = 0x4A,
+		.text = "Six"
+	},
+	.items[7] = {
+		.id = 0x49,
+		.text = "Seven"
+	},
+	.items[8] = {
+		.id = 0x48,
+		.text = "Eight"
+	},
+	.items[9] = {
+		.id = 0x47,
+		.text = "Nine"
+	},
+	.items[10] = {
+		.id = 0x46,
+		.text = "Alpha"
+	},
+	.items[11] = {
+		.id = 0x45,
+		.text = "Bravo"
+	},
+	.items[12] = {
+		.id = 0x44,
+		.text = "Charlie"
+	},
+	.items[13] = {
+		.id = 0x43,
+		.text = "Delta"
+	},
+	.items[14] = {
+		.id = 0x42,
+		.text = "Echo"
+	},
+	.items[15] = {
+		.id = 0x41,
+		.text = "Fox-trot"
+	},
+	.items[16] = {
+		.id = 0x40,
+		.text = "Black"
+	},
+	.items[17] = {
+		.id = 0x3F,
+		.text = "Brown"
+	},
+	.items[18] = {
+		.id = 0x3E,
+		.text = "Red"
+	},
+	.items[19] = {
+		.id = 0x3D,
+		.text = "Orange"
+	},
+	.items[20] = {
+		.id = 0x3C,
+		.text = "Yellow"
+	},
+	.items[21] = {
+		.id = 0x3B,
+		.text = "Green"
+	},
+	.items[22] = {
+		.id = 0x3A,
+		.text = "Blue"
+	},
+	.items[23] = {
+		.id = 0x39,
+		.text = "Violet"
+	},
+	.items[24] = {
+		.id = 0x38,
+		.text = "Grey"
+	},
+	.items[25] = {
+		.id = 0x37,
+		.text = "White"
+	},
+	.items[26] = {
+		.id = 0x36,
+		.text = "milli"
+	},
+	.items[27] = {
+		.id = 0x35,
+		.text = "micro"
+	},
+	.items[28] = {
+		.id = 0x34,
+		.text = "nano"
+	},
+	.items[29] = {
+		.id = 0x33,
+		.text = "pico"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_122 = {
+	.pdu = setup_menu_122,
+	.pdu_len = sizeof(setup_menu_122),
+	.qualifier = 0x00,
+	.alpha_id = "LargeMenu2",
+	.items[0] = {
+		.id = 0xFF,
+		.text = "1 Call Forward Unconditional"
+	},
+	.items[1] = {
+		.id = 0xFE,
+		.text = "2 Call Forward On User Busy"
+	},
+	.items[2] = {
+		.id = 0xFD,
+		.text = "3 Call Forward On No Reply"
+	},
+	.items[3] = {
+		.id = 0xFC,
+		.text = "4 Call Forward On User Not Reachable"
+	},
+	.items[4] = {
+		.id = 0xFB,
+		.text = "5 Barring Of All Outgoing Calls"
+	},
+	.items[5] = {
+		.id = 0xFA,
+		.text = "6 Barring Of All Outgoing Int Calls"
+	},
+	.items[6] = {
+		.id = 0xF9,
+		.text = "7 CLI Presentation"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_123 = {
+	.pdu = setup_menu_123,
+	.pdu_len = sizeof(setup_menu_123),
+	.qualifier = 0x00,
+	.alpha_id = "The SIM shall supply a set of menu items, which shall "
+			"be integrated with the menu system (or other MMI "
+			"facility) in order to give the user the opportunity "
+			"to choose one of these menu items at his own "
+			"discretion. Each item comprises a sh",
+	.items[0] = {
+		.id = 0x01,
+		.text = "Y"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_211 = {
+	.pdu = setup_menu_211,
+	.pdu_len = sizeof(setup_menu_211),
+	.qualifier = 0x80,
+	.alpha_id = "Toolkit Menu",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.items[3] = {
+		.id = 4,
+		.text = "Item 4"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_311 = {
+	.pdu = setup_menu_311,
+	.pdu_len = sizeof(setup_menu_311),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.items[3] = {
+		.id = 4,
+		.text = "Item 4"
+	},
+	.next_act = {
+		.list = { STK_COMMAND_TYPE_SEND_SMS,
+				STK_COMMAND_TYPE_SETUP_CALL,
+				STK_COMMAND_TYPE_LAUNCH_BROWSER,
+				STK_COMMAND_TYPE_PROVIDE_LOCAL_INFO },
+		.len = 4
+	}
+};
+
+static struct setup_menu_test setup_menu_data_411 = {
+	.pdu = setup_menu_411,
+	.pdu_len = sizeof(setup_menu_411),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.icon_id = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+		.id = 1
+	},
+	.item_icon_id_list = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+		.list = { 5, 5, 5 },
+		.len = 3
+	}
+};
+
+static struct setup_menu_test setup_menu_data_421 = {
+	.pdu = setup_menu_421,
+	.pdu_len = sizeof(setup_menu_421),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.icon_id = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+		.id = 1
+	},
+	.item_icon_id_list = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+		.list = { 5, 5, 5 },
+		.len = 3
+	}
+};
+
+static struct setup_menu_test setup_menu_data_511 = {
+	.pdu = setup_menu_511,
+	.pdu_len = sizeof(setup_menu_511),
+	.qualifier = 0x01,
+	.alpha_id = "Toolkit Menu",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_611 = {
+	.pdu = setup_menu_611,
+	.pdu_len = sizeof(setup_menu_611),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x00, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 12,
+		.list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4,
+				0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct setup_menu_test setup_menu_data_612 = {
+	.pdu = setup_menu_612,
+	.pdu_len = sizeof(setup_menu_612),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 2",
+	.items[0] = {
+		.id = 4,
+		.text = "Item 4"
+	},
+	.items[1] = {
+		.id = 5,
+		.text = "Item 5"
+	},
+	.items[2] = {
+		.id = 6,
+		.text = "Item 6"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_621 = {
+	.pdu = setup_menu_621,
+	.pdu_len = sizeof(setup_menu_621),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x01, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 12,
+		.list = { 0x00, 0x06, 0x01, 0xB4, 0x00, 0x06, 0x01, 0xB4,
+				0x00, 0x06, 0x01, 0xB4 }
+	}
+};
+
+static struct setup_menu_test setup_menu_data_622 = {
+	.pdu = setup_menu_622,
+	.pdu_len = sizeof(setup_menu_622),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 2",
+	.items[0] = {
+		.id = 4,
+		.text = "Item 4"
+	},
+	.items[1] = {
+		.id = 5,
+		.text = "Item 5"
+	},
+	.items[2] = {
+		.id = 6,
+		.text = "Item 6"
+	}
+};
+
+/*
+ * Some problem with data of item #3 in item_text_attr_list
+ * and the explanation
+ */
+static struct setup_menu_test setup_menu_data_631 = {
+	.pdu = setup_menu_631,
+	.pdu_len = sizeof(setup_menu_631),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x02, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 12,
+		.list = { 0x00, 0x06, 0x02, 0xB4, 0x00, 0x06, 0x02, 0xB4,
+				0x00, 0x06, 0x02, 0xB4 }
+	}
+};
+
+static struct setup_menu_test setup_menu_data_632 = {
+	.pdu = setup_menu_632,
+	.pdu_len = sizeof(setup_menu_632),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 2",
+	.items[0] = {
+		.id = 4,
+		.text = "Item 4"
+	},
+	.items[1] = {
+		.id = 5,
+		.text = "Item 5"
+	},
+	.items[2] = {
+		.id = 6,
+		.text = "Item 6"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_641 = {
+	.pdu = setup_menu_641,
+	.pdu_len = sizeof(setup_menu_641),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x04, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 12,
+		.list = { 0x00, 0x06, 0x04, 0xB4, 0x00, 0x06, 0x04, 0xB4,
+				0x00, 0x06, 0x04, 0xB4 }
+	}
+};
+
+static struct setup_menu_test setup_menu_data_642 = {
+	.pdu = setup_menu_642,
+	.pdu_len = sizeof(setup_menu_642),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 2",
+	.items[0] = {
+		.id = 4,
+		.text = "Item 4"
+	},
+	.items[1] = {
+		.id = 5,
+		.text = "Item 5"
+	},
+	.items[2] = {
+		.id = 6,
+		.text = "Item 6"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x00, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 12,
+		.list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4,
+				0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct setup_menu_test setup_menu_data_643 = {
+	.pdu = setup_menu_643,
+	.pdu_len = sizeof(setup_menu_643),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 3",
+	.items[0] = {
+		.id = 7,
+		.text = "Item 7"
+	},
+	.items[1] = {
+		.id = 8,
+		.text = "Item 8"
+	},
+	.items[2] = {
+		.id = 9,
+		.text = "Item 9"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_651 = {
+	.pdu = setup_menu_651,
+	.pdu_len = sizeof(setup_menu_651),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x08, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 12,
+		.list = { 0x00, 0x06, 0x08, 0xB4, 0x00, 0x06, 0x08, 0xB4,
+				0x00, 0x06, 0x08, 0xB4 }
+	}
+};
+
+static struct setup_menu_test setup_menu_data_661 = {
+	.pdu = setup_menu_661,
+	.pdu_len = sizeof(setup_menu_661),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x10, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 12,
+		.list = { 0x00, 0x06, 0x10, 0xB4, 0x00, 0x06, 0x10, 0xB4,
+				0x00, 0x06, 0x10, 0xB4 }
+	}
+};
+
+static struct setup_menu_test setup_menu_data_671 = {
+	.pdu = setup_menu_671,
+	.pdu_len = sizeof(setup_menu_671),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x20, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 12,
+		.list = { 0x00, 0x06, 0x20, 0xB4, 0x00, 0x06, 0x20, 0xB4,
+				0x00, 0x06, 0x20, 0xB4 }
+	}
+};
+
+static struct setup_menu_test setup_menu_data_681 = {
+	.pdu = setup_menu_681,
+	.pdu_len = sizeof(setup_menu_681),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x40, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 12,
+		.list = { 0x00, 0x06, 0x40, 0xB4, 0x00, 0x06, 0x40, 0xB4,
+				0x00, 0x06, 0x40, 0xB4 }
+	}
+};
+
+static struct setup_menu_test setup_menu_data_691 = {
+	.pdu = setup_menu_691,
+	.pdu_len = sizeof(setup_menu_691),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x80, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 12,
+		.list = { 0x00, 0x06, 0x80, 0xB4, 0x00, 0x06, 0x80, 0xB4,
+				0x00, 0x06, 0x80, 0xB4 }
+	}
+};
+
+static struct setup_menu_test setup_menu_data_6101 = {
+	.pdu = setup_menu_6101,
+	.pdu_len = sizeof(setup_menu_6101),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Menu",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x0C, 0x00, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 12,
+		.list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4,
+				0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct setup_menu_test setup_menu_data_711 = {
+	.pdu = setup_menu_711,
+	.pdu_len = sizeof(setup_menu_711),
+	.qualifier = 0x00,
+	.alpha_id = "ЗДРАВСТВУЙТЕ",
+	.items[0] = {
+		.id = 1,
+		.text = "ЗДРАВСТВУЙТЕ1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "ЗДРАВСТВУЙТЕ2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "ЗДРАВСТВУЙТЕ3"
+	},
+	.items[3] = {
+		.id = 4,
+		.text = "ЗДРАВСТВУЙТЕ4"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_712 = {
+	.pdu = setup_menu_712,
+	.pdu_len = sizeof(setup_menu_712),
+	.qualifier = 0x00,
+	.alpha_id = "ЗДРАВСТВУЙТЕ",
+	.items[0] = {
+		.id = 0x11,
+		.text = "ЗДРАВСТВУЙТЕ5"
+	},
+	.items[1] = {
+		.id = 0x12,
+		.text = "ЗДРАВСТВУЙТЕ6"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_713 = {
+	.pdu = setup_menu_713,
+	.pdu_len = sizeof(setup_menu_713),
+	.qualifier = 0x00
+};
+
+static struct setup_menu_test setup_menu_data_811 = {
+	.pdu = setup_menu_811,
+	.pdu_len = sizeof(setup_menu_811),
+	.qualifier = 0x00,
+	.alpha_id = "工具箱单",
+	.items[0] = {
+		.id = 1,
+		.text = "项目一"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "项目二"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "项目三"
+	},
+	.items[3] = {
+		.id = 4,
+		.text = "项目四"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_812 = {
+	.pdu = setup_menu_812,
+	.pdu_len = sizeof(setup_menu_812),
+	.qualifier = 0x00,
+	.alpha_id = "工具箱单",
+	.items[0] = {
+		.id = 0x11,
+		.text = "一"
+	},
+	.items[1] = {
+		.id = 0x12,
+		.text = "二"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_813 = {
+	.pdu = setup_menu_813,
+	.pdu_len = sizeof(setup_menu_813),
+	.qualifier = 0x00
+};
+
+static struct setup_menu_test setup_menu_data_911 = {
+	.pdu = setup_menu_911,
+	.pdu_len = sizeof(setup_menu_911),
+	.qualifier = 0x00,
+	.alpha_id = "80ル0",
+	.items[0] = {
+		.id = 1,
+		.text = "80ル1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "80ル2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "80ル3"
+	},
+	.items[3] = {
+		.id = 4,
+		.text = "80ル4"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_912 = {
+	.pdu = setup_menu_912,
+	.pdu_len = sizeof(setup_menu_912),
+	.qualifier = 0x00,
+	.alpha_id = "80ル0",
+	.items[0] = {
+		.id = 0x11,
+		.text = "80ル5"
+	},
+	.items[1] = {
+		.id = 0x12,
+		.text = "80ル6"
+	}
+};
+
+static struct setup_menu_test setup_menu_data_913 = {
+	.pdu = setup_menu_913,
+	.pdu_len = sizeof(setup_menu_913),
+	.qualifier = 0x00
+};
+
+/* Defined in TS 102.384 Section 27.22.4.7 */
+static void test_setup_menu(gconstpointer data)
+{
+	const struct setup_menu_test *test = data;
+	struct stk_command *command;
+
+	command = stk_command_new_from_pdu(test->pdu, test->pdu_len);
+
+	g_assert(command);
+
+	g_assert(command->number == 1);
+	g_assert(command->type == STK_COMMAND_TYPE_SETUP_MENU);
+	g_assert(command->qualifier == test->qualifier);
+
+	g_assert(command->src == STK_DEVICE_IDENTITY_TYPE_UICC);
+	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_TERMINAL);
+
+	if (test->alpha_id)
+		g_assert(command->setup_menu.alpha_id);
+	check_common_text(command->setup_menu.alpha_id, test->alpha_id);
+	check_items(command->setup_menu.items, test->items);
+	check_items_next_action_indicator(&command->setup_menu.next_act,
+						&test->next_act);
+	check_icon_id(&command->setup_menu.icon_id, &test->icon_id);
+	check_item_icon_id_list(&command->setup_menu.item_icon_id_list,
+					&test->item_icon_id_list);
+	check_text_attr(&command->setup_menu.text_attr, &test->text_attr);
+	check_item_text_attribute_list(&command->setup_menu.item_text_attr_list,
+					&test->item_text_attr_list);
+
+	stk_command_free(command);
+}
+
 struct send_sms_test {
 	const unsigned char *pdu;
 	unsigned int pdu_len;
@@ -4366,6 +5910,77 @@ int main(int argc, char **argv)
 	g_test_add_data_func("/teststk/Poll Interval 1.1.1",
 				&poll_interval_data_111, test_poll_interval);
 
+	g_test_add_data_func("/teststk/Setup Menu 1.1.1",
+				&setup_menu_data_111, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 1.1.2",
+				&setup_menu_data_112, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 1.1.3",
+				&setup_menu_data_113, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 1.2.1",
+				&setup_menu_data_121, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 1.2.2",
+				&setup_menu_data_122, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 1.2.3",
+				&setup_menu_data_123, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 2.1.1",
+				&setup_menu_data_211, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 3.1.1",
+				&setup_menu_data_311, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 4.1.1",
+				&setup_menu_data_411, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 4.2.1",
+				&setup_menu_data_421, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 5.1.1",
+				&setup_menu_data_511, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.1.1",
+				&setup_menu_data_611, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.1.2",
+				&setup_menu_data_612, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.2.1",
+				&setup_menu_data_621, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.2.2",
+				&setup_menu_data_622, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.3.1",
+				&setup_menu_data_631, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.3.2",
+				&setup_menu_data_632, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.4.1",
+				&setup_menu_data_641, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.4.2",
+				&setup_menu_data_642, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.4.3",
+				&setup_menu_data_643, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.5.1",
+				&setup_menu_data_651, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.6.1",
+				&setup_menu_data_661, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.7.1",
+				&setup_menu_data_671, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.8.1",
+				&setup_menu_data_681, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.9.1",
+				&setup_menu_data_691, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 6.10.1",
+				&setup_menu_data_6101, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 7.1.1",
+				&setup_menu_data_711, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 7.1.2",
+				&setup_menu_data_712, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 7.1.3",
+				&setup_menu_data_713, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 8.1.1",
+				&setup_menu_data_811, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 8.1.2",
+				&setup_menu_data_812, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 8.1.3",
+				&setup_menu_data_813, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 9.1.1",
+				&setup_menu_data_911, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 9.1.2",
+				&setup_menu_data_912, test_setup_menu);
+	g_test_add_data_func("/teststk/Setup Menu 9.1.3",
+				&setup_menu_data_913, test_setup_menu);
+
 	g_test_add_data_func("/teststk/Send SMS 1.1",
 				&send_sms_data_11, test_send_sms);
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 13/19] stkutil: Add select item proactive command parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (10 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 12/19] test-stkutil: Add unit test for setup menu parser Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-10 10:38 ` [PATCH 14/19] test-stkutil: Add unit test for select item parser Yang Gu
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 src/stkutil.c |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/stkutil.h |   13 +++++++++++++
 2 files changed, 66 insertions(+), 0 deletions(-)

diff --git a/src/stkutil.c b/src/stkutil.c
index 45bb285..ebe1114 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -2360,6 +2360,56 @@ error:
 	return FALSE;
 }
 
+static void destroy_select_item(struct stk_command *command)
+{
+	g_free(command->select_item.alpha_id);
+	g_slist_foreach(command->select_item.items,
+				(GFunc)destroy_stk_item, NULL);
+	g_slist_free(command->select_item.items);
+}
+
+static gboolean parse_select_item(struct stk_command *command,
+					struct comprehension_tlv_iter *iter)
+{
+	struct stk_command_select_item *obj = &command->select_item;
+	gboolean ret;
+
+	if (command->src != STK_DEVICE_IDENTITY_TYPE_UICC)
+		return FALSE;
+
+	if (command->dst != STK_DEVICE_IDENTITY_TYPE_TERMINAL)
+		return FALSE;
+
+	ret = parse_dataobj(iter,
+			STK_DATA_OBJECT_TYPE_ALPHA_ID, 0,
+			&obj->alpha_id,
+			STK_DATA_OBJECT_TYPE_ITEM,
+			DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM,
+			&obj->items,
+			STK_DATA_OBJECT_TYPE_ITEMS_NEXT_ACTION_INDICATOR, 0,
+			&obj->next_act,
+			STK_DATA_OBJECT_TYPE_ITEM_ID, 0,
+			&obj->item_id,
+			STK_DATA_OBJECT_TYPE_ICON_ID, 0,
+			&obj->icon_id,
+			STK_DATA_OBJECT_TYPE_ITEM_ICON_ID_LIST, 0,
+			&obj->item_icon_id_list,
+			STK_DATA_OBJECT_TYPE_TEXT_ATTRIBUTE, 0,
+			&obj->text_attr,
+			STK_DATA_OBJECT_TYPE_ITEM_TEXT_ATTRIBUTE_LIST, 0,
+			&obj->item_text_attr_list,
+			STK_DATA_OBJECT_TYPE_FRAME_ID, 0,
+			&obj->frame_id,
+			STK_DATA_OBJECT_TYPE_INVALID);
+
+	if (ret == FALSE)
+		return FALSE;
+
+	command->destructor = destroy_select_item;
+
+	return TRUE;
+}
+
 static void destroy_send_sms(struct stk_command *command)
 {
 	g_free(command->send_sms.alpha_id);
@@ -2486,6 +2536,9 @@ struct stk_command *stk_command_new_from_pdu(const unsigned char *pdu,
 	case STK_COMMAND_TYPE_SETUP_MENU:
 		ok = parse_setup_menu(command, &iter);
 		break;
+	case STK_COMMAND_TYPE_SELECT_ITEM:
+		ok = parse_select_item(command, &iter);
+		break;
 	case STK_COMMAND_TYPE_SEND_SMS:
 		ok = parse_send_sms(command, &iter);
 		break;
diff --git a/src/stkutil.h b/src/stkutil.h
index d91ac66..143679f 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -834,6 +834,18 @@ struct stk_command_setup_menu {
 	struct stk_item_text_attribute_list item_text_attr_list;
 };
 
+struct stk_command_select_item {
+	char *alpha_id;
+	GSList *items;
+	struct stk_items_next_action_indicator next_act;
+	unsigned char item_id;
+	struct stk_icon_id icon_id;
+	struct stk_item_icon_id_list item_icon_id_list;
+	struct stk_text_attribute text_attr;
+	struct stk_item_text_attribute_list item_text_attr_list;
+	struct stk_frame_id frame_id;
+};
+
 struct stk_command_send_sms {
 	char *alpha_id;
 	struct stk_address address;
@@ -857,6 +869,7 @@ struct stk_command {
 		struct stk_command_get_input get_input;
 		struct stk_command_play_tone play_tone;
 		struct stk_command_setup_menu setup_menu;
+		struct stk_command_select_item select_item;
 		struct stk_command_send_sms send_sms;
 	};
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 14/19] test-stkutil: Add unit test for select item parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (11 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 13/19] stkutil: Add select item proactive command parser Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-10 10:38 ` [PATCH 15/19] test-stkutil: Use dedicated functions to check Yang Gu
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 unit/test-stkutil.c | 2035 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 2035 insertions(+), 0 deletions(-)

diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 941c443..70d87d3 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -86,6 +86,13 @@ static void check_item(const struct stk_item *command,
 	g_assert(g_str_equal(command->text, test->text));
 }
 
+/* Defined in TS 102.223 Section 8.10 */
+static inline void check_item_id(const unsigned char command,
+					const unsigned char test)
+{
+	check_common_byte(command, test);
+}
+
 static void check_items(GSList *command, const struct stk_item *test)
 {
 	struct stk_item *si;
@@ -5469,6 +5476,1937 @@ static void test_setup_menu(gconstpointer data)
 	stk_command_free(command);
 }
 
+struct select_item_test {
+	const unsigned char *pdu;
+	unsigned int pdu_len;
+	unsigned char qualifier;
+	char *alpha_id;
+	struct stk_item items[MAX_ITEM];
+	struct stk_items_next_action_indicator next_act;
+	unsigned char item_id;
+	struct stk_icon_id icon_id;
+	struct stk_item_icon_id_list item_icon_id_list;
+	struct stk_text_attribute text_attr;
+	struct stk_item_text_attribute_list item_text_attr_list;
+	struct stk_frame_id frame_id;
+};
+
+static unsigned char select_item_111[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0x8F, 0x07,
+						0x04, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x34 };
+
+static unsigned char select_item_121[] = { 0xD0, 0x81, 0xFC, 0x81, 0x03, 0x01,
+						0x24, 0x00, 0x82, 0x02, 0x81,
+						0x82, 0x85, 0x0A, 0x4C, 0x61,
+						0x72, 0x67, 0x65, 0x4D, 0x65,
+						0x6E, 0x75, 0x31, 0x8F, 0x05,
+						0x50, 0x5A, 0x65, 0x72, 0x6F,
+						0x8F, 0x04, 0x4F, 0x4F, 0x6E,
+						0x65, 0x8F, 0x04, 0x4E, 0x54,
+						0x77, 0x6F, 0x8F, 0x06, 0x4D,
+						0x54, 0x68, 0x72, 0x65, 0x65,
+						0x8F, 0x05, 0x4C, 0x46, 0x6F,
+						0x75, 0x72, 0x8F, 0x05, 0x4B,
+						0x46, 0x69, 0x76, 0x65, 0x8F,
+						0x04, 0x4A, 0x53, 0x69, 0x78,
+						0x8F, 0x06, 0x49, 0x53, 0x65,
+						0x76, 0x65, 0x6E, 0x8F, 0x06,
+						0x48, 0x45, 0x69, 0x67, 0x68,
+						0x74, 0x8F, 0x05, 0x47, 0x4E,
+						0x69, 0x6E, 0x65, 0x8F, 0x06,
+						0x46, 0x41, 0x6C, 0x70, 0x68,
+						0x61, 0x8F, 0x06, 0x45, 0x42,
+						0x72, 0x61, 0x76, 0x6F, 0x8F,
+						0x08, 0x44, 0x43, 0x68, 0x61,
+						0x72, 0x6C, 0x69, 0x65, 0x8F,
+						0x06, 0x43, 0x44, 0x65, 0x6C,
+						0x74, 0x61, 0x8F, 0x05, 0x42,
+						0x45, 0x63, 0x68, 0x6F, 0x8F,
+						0x09, 0x41, 0x46, 0x6F, 0x78,
+						0x2D, 0x74, 0x72, 0x6F, 0x74,
+						0x8F, 0x06, 0x40, 0x42, 0x6C,
+						0x61, 0x63, 0x6B, 0x8F, 0x06,
+						0x3F, 0x42, 0x72, 0x6F, 0x77,
+						0x6E, 0x8F, 0x04, 0x3E, 0x52,
+						0x65, 0x64, 0x8F, 0x07, 0x3D,
+						0x4F, 0x72, 0x61, 0x6E, 0x67,
+						0x65, 0x8F, 0x07, 0x3C, 0x59,
+						0x65, 0x6C, 0x6C, 0x6F, 0x77,
+						0x8F, 0x06, 0x3B, 0x47, 0x72,
+						0x65, 0x65, 0x6E, 0x8F, 0x05,
+						0x3A, 0x42, 0x6C, 0x75, 0x65,
+						0x8F, 0x07, 0x39, 0x56, 0x69,
+						0x6F, 0x6C, 0x65, 0x74, 0x8F,
+						0x05, 0x38, 0x47, 0x72, 0x65,
+						0x79, 0x8F, 0x06, 0x37, 0x57,
+						0x68, 0x69, 0x74, 0x65, 0x8F,
+						0x06, 0x36, 0x6D, 0x69, 0x6C,
+						0x6C, 0x69, 0x8F, 0x06, 0x35,
+						0x6D, 0x69, 0x63, 0x72, 0x6F,
+						0x8F, 0x05, 0x34, 0x6E, 0x61,
+						0x6E, 0x6F, 0x8F, 0x05, 0x33,
+						0x70, 0x69, 0x63, 0x6F };
+
+static unsigned char select_item_131[] = { 0xD0, 0x81, 0xFB, 0x81, 0x03, 0x01,
+						0x24, 0x00, 0x82, 0x02, 0x81,
+						0x82, 0x85, 0x0A, 0x4C, 0x61,
+						0x72, 0x67, 0x65, 0x4D, 0x65,
+						0x6E, 0x75, 0x32, 0x8F, 0x1E,
+						0xFF, 0x43, 0x61, 0x6C, 0x6C,
+						0x20, 0x46, 0x6F, 0x72, 0x77,
+						0x61, 0x72, 0x64, 0x69, 0x6E,
+						0x67, 0x20, 0x55, 0x6E, 0x63,
+						0x6F, 0x6E, 0x64, 0x69, 0x74,
+						0x69, 0x6F, 0x6E, 0x61, 0x6C,
+						0x8F, 0x1D, 0xFE, 0x43, 0x61,
+						0x6C, 0x6C, 0x20, 0x46, 0x6F,
+						0x72, 0x77, 0x61, 0x72, 0x64,
+						0x69, 0x6E, 0x67, 0x20, 0x4F,
+						0x6E, 0x20, 0x55, 0x73, 0x65,
+						0x72, 0x20, 0x42, 0x75, 0x73,
+						0x79, 0x8F, 0x1C, 0xFD, 0x43,
+						0x61, 0x6C, 0x6C, 0x20, 0x46,
+						0x6F, 0x72, 0x77, 0x61, 0x72,
+						0x64, 0x69, 0x6E, 0x67, 0x20,
+						0x4F, 0x6E, 0x20, 0x4E, 0x6F,
+						0x20, 0x52, 0x65, 0x70, 0x6C,
+						0x79, 0x8F, 0x26, 0xFC, 0x43,
+						0x61, 0x6C, 0x6C, 0x20, 0x46,
+						0x6F, 0x72, 0x77, 0x61, 0x72,
+						0x64, 0x69, 0x6E, 0x67, 0x20,
+						0x4F, 0x6E, 0x20, 0x55, 0x73,
+						0x65, 0x72, 0x20, 0x4E, 0x6F,
+						0x74, 0x20, 0x52, 0x65, 0x61,
+						0x63, 0x68, 0x61, 0x62, 0x6C,
+						0x65, 0x8F, 0x1E, 0xFB, 0x42,
+						0x61, 0x72, 0x72, 0x69, 0x6E,
+						0x67, 0x20, 0x4F, 0x66, 0x20,
+						0x41, 0x6C, 0x6C, 0x20, 0x4F,
+						0x75, 0x74, 0x67, 0x6F, 0x69,
+						0x6E, 0x67, 0x20, 0x43, 0x61,
+						0x6C, 0x6C, 0x73, 0x8F, 0x2C,
+						0xFA, 0x42, 0x61, 0x72, 0x72,
+						0x69, 0x6E, 0x67, 0x20, 0x4F,
+						0x66, 0x20, 0x41, 0x6C, 0x6C,
+						0x20, 0x4F, 0x75, 0x74, 0x67,
+						0x6F, 0x69, 0x6E, 0x67, 0x20,
+						0x49, 0x6E, 0x74, 0x65, 0x72,
+						0x6E, 0x61, 0x74, 0x69, 0x6F,
+						0x6E, 0x61, 0x6C, 0x20, 0x43,
+						0x61, 0x6C, 0x6C, 0x73, 0x8F,
+						0x11, 0xF9, 0x43, 0x4C, 0x49,
+						0x20, 0x50, 0x72, 0x65, 0x73,
+						0x65, 0x6E, 0x74, 0x61, 0x74,
+						0x69, 0x6F, 0x6E };
+
+static unsigned char select_item_141[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0B, 0x53, 0x65, 0x6C,
+						0x65, 0x63, 0x74, 0x20, 0x49,
+						0x74, 0x65, 0x6D, 0x8F, 0x04,
+						0x11, 0x4F, 0x6E, 0x65, 0x8F,
+						0x04, 0x12, 0x54, 0x77, 0x6F };
+
+static unsigned char select_item_151[] = { 0xD0, 0x81, 0xFD, 0x81, 0x03, 0x01,
+						0x24, 0x00, 0x82, 0x02, 0x81,
+						0x82, 0x85, 0x81, 0xED, 0x54,
+						0x68, 0x65, 0x20, 0x53, 0x49,
+						0x4D, 0x20, 0x73, 0x68, 0x61,
+						0x6C, 0x6C, 0x20, 0x73, 0x75,
+						0x70, 0x70, 0x6C, 0x79, 0x20,
+						0x61, 0x20, 0x73, 0x65, 0x74,
+						0x20, 0x6F, 0x66, 0x20, 0x69,
+						0x74, 0x65, 0x6D, 0x73, 0x20,
+						0x66, 0x72, 0x6F, 0x6D, 0x20,
+						0x77, 0x68, 0x69, 0x63, 0x68,
+						0x20, 0x74, 0x68, 0x65, 0x20,
+						0x75, 0x73, 0x65, 0x72, 0x20,
+						0x6D, 0x61, 0x79, 0x20, 0x63,
+						0x68, 0x6F, 0x6F, 0x73, 0x65,
+						0x20, 0x6F, 0x6E, 0x65, 0x2E,
+						0x20, 0x45, 0x61, 0x63, 0x68,
+						0x20, 0x69, 0x74, 0x65, 0x6D,
+						0x20, 0x63, 0x6F, 0x6D, 0x70,
+						0x72, 0x69, 0x73, 0x65, 0x73,
+						0x20, 0x61, 0x20, 0x73, 0x68,
+						0x6F, 0x72, 0x74, 0x20, 0x69,
+						0x64, 0x65, 0x6E, 0x74, 0x69,
+						0x66, 0x69, 0x65, 0x72, 0x20,
+						0x28, 0x75, 0x73, 0x65, 0x64,
+						0x20, 0x74, 0x6F, 0x20, 0x69,
+						0x6E, 0x64, 0x69, 0x63, 0x61,
+						0x74, 0x65, 0x20, 0x74, 0x68,
+						0x65, 0x20, 0x73, 0x65, 0x6C,
+						0x65, 0x63, 0x74, 0x69, 0x6F,
+						0x6E, 0x29, 0x20, 0x61, 0x6E,
+						0x64, 0x20, 0x61, 0x20, 0x74,
+						0x65, 0x78, 0x74, 0x20, 0x73,
+						0x74, 0x72, 0x69, 0x6E, 0x67,
+						0x2E, 0x20, 0x4F, 0x70, 0x74,
+						0x69, 0x6F, 0x6E, 0x61, 0x6C,
+						0x6C, 0x79, 0x20, 0x74, 0x68,
+						0x65, 0x20, 0x53, 0x49, 0x4D,
+						0x20, 0x6D, 0x61, 0x79, 0x20,
+						0x69, 0x6E, 0x63, 0x6C, 0x75,
+						0x64, 0x65, 0x20, 0x61, 0x6E,
+						0x20, 0x61, 0x6C, 0x70, 0x68,
+						0x61, 0x20, 0x69, 0x64, 0x65,
+						0x6E, 0x74, 0x69, 0x66, 0x69,
+						0x65, 0x72, 0x2E, 0x20, 0x54,
+						0x68, 0x65, 0x20, 0x61, 0x6C,
+						0x70, 0x68, 0x61, 0x20, 0x69,
+						0x64, 0x65, 0x6E, 0x74, 0x69,
+						0x66, 0x69, 0x65, 0x72, 0x20,
+						0x69, 0x8F, 0x02, 0x01, 0x59 };
+
+static unsigned char select_item_161[] = { 0xD0, 0x81, 0xF3, 0x81, 0x03, 0x01,
+						0x24, 0x00, 0x82, 0x02, 0x81,
+						0x82, 0x85, 0x0A, 0x30, 0x4C,
+						0x61, 0x72, 0x67, 0x65, 0x4D,
+						0x65, 0x6E, 0x75, 0x8F, 0x1D,
+						0xFF, 0x31, 0x20, 0x43, 0x61,
+						0x6C, 0x6C, 0x20, 0x46, 0x6F,
+						0x72, 0x77, 0x61, 0x72, 0x64,
+						0x20, 0x55, 0x6E, 0x63, 0x6F,
+						0x6E, 0x64, 0x69, 0x74, 0x69,
+						0x6F, 0x6E, 0x61, 0x6C, 0x8F,
+						0x1C, 0xFE, 0x32, 0x20, 0x43,
+						0x61, 0x6C, 0x6C, 0x20, 0x46,
+						0x6F, 0x72, 0x77, 0x61, 0x72,
+						0x64, 0x20, 0x4F, 0x6E, 0x20,
+						0x55, 0x73, 0x65, 0x72, 0x20,
+						0x42, 0x75, 0x73, 0x79, 0x8F,
+						0x1B, 0xFD, 0x33, 0x20, 0x43,
+						0x61, 0x6C, 0x6C, 0x20, 0x46,
+						0x6F, 0x72, 0x77, 0x61, 0x72,
+						0x64, 0x20, 0x4F, 0x6E, 0x20,
+						0x4E, 0x6F, 0x20, 0x52, 0x65,
+						0x70, 0x6C, 0x79, 0x8F, 0x25,
+						0xFC, 0x34, 0x20, 0x43, 0x61,
+						0x6C, 0x6C, 0x20, 0x46, 0x6F,
+						0x72, 0x77, 0x61, 0x72, 0x64,
+						0x20, 0x4F, 0x6E, 0x20, 0x55,
+						0x73, 0x65, 0x72, 0x20, 0x4E,
+						0x6F, 0x74, 0x20, 0x52, 0x65,
+						0x61, 0x63, 0x68, 0x61, 0x62,
+						0x6C, 0x65, 0x8F, 0x20, 0xFB,
+						0x35, 0x20, 0x42, 0x61, 0x72,
+						0x72, 0x69, 0x6E, 0x67, 0x20,
+						0x4F, 0x66, 0x20, 0x41, 0x6C,
+						0x6C, 0x20, 0x4F, 0x75, 0x74,
+						0x67, 0x6F, 0x69, 0x6E, 0x67,
+						0x20, 0x43, 0x61, 0x6C, 0x6C,
+						0x73, 0x8F, 0x24, 0xFA, 0x36,
+						0x20, 0x42, 0x61, 0x72, 0x72,
+						0x69, 0x6E, 0x67, 0x20, 0x4F,
+						0x66, 0x20, 0x41, 0x6C, 0x6C,
+						0x20, 0x4F, 0x75, 0x74, 0x67,
+						0x6F, 0x69, 0x6E, 0x67, 0x20,
+						0x49, 0x6E, 0x74, 0x20, 0x43,
+						0x61, 0x6C, 0x6C, 0x73, 0x8F,
+						0x13, 0xF9, 0x37, 0x20, 0x43,
+						0x4C, 0x49, 0x20, 0x50, 0x72,
+						0x65, 0x73, 0x65, 0x6E, 0x74,
+						0x61, 0x74, 0x69, 0x6F, 0x6E };
+
+static unsigned char select_item_211[] = { 0xD0, 0x39, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0x18, 0x03,
+						0x13, 0x10, 0x26 };
+
+static unsigned char select_item_311[] = { 0xD0, 0x37, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0x90, 0x01,
+						0x02 };
+
+static unsigned char select_item_411[] = { 0xD0, 0x34, 0x81, 0x03, 0x01, 0x24,
+						0x80, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33 };
+
+static unsigned char select_item_511[] = { 0xD0, 0x3E, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0x9E, 0x02,
+						0x01, 0x01, 0x9F, 0x04, 0x01,
+						0x05, 0x05, 0x05 };
+
+static unsigned char select_item_521[] = { 0xD0, 0x3E, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33, 0x9E, 0x02,
+						0x00, 0x01, 0x9F, 0x04, 0x00,
+						0x05, 0x05, 0x05 };
+
+static unsigned char select_item_611[] = { 0xD0, 0x34, 0x81, 0x03, 0x01, 0x24,
+						0x03, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33 };
+
+static unsigned char select_item_621[] = { 0xD0, 0x34, 0x81, 0x03, 0x01, 0x24,
+						0x01, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32, 0x8F,
+						0x07, 0x03, 0x49, 0x74, 0x65,
+						0x6D, 0x20, 0x33 };
+
+static unsigned char select_item_711[] = { 0xD0, 0x2B, 0x81, 0x03, 0x01, 0x24,
+						0x04, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0E, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x8F, 0x07, 0x01, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x31,
+						0x8F, 0x07, 0x02, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x32 };
+
+static unsigned char select_item_811[] = { 0xD0, 0x30, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0A, 0x3C, 0x54, 0x49,
+						0x4D, 0x45, 0x2D, 0x4F, 0x55,
+						0x54, 0x3E, 0x8F, 0x07, 0x01,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x31, 0x8F, 0x07, 0x02, 0x49,
+						0x74, 0x65, 0x6D, 0x20, 0x32,
+						0x8F, 0x07, 0x03, 0x49, 0x74,
+						0x65, 0x6D, 0x20, 0x33 };
+
+static unsigned char select_item_911[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x31, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x31, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x32, 0xD0, 0x04, 0x00, 0x10,
+						0x00, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x00, 0xB4, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char select_item_912[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x32, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x33, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x34 };
+
+static unsigned char select_item_921[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x31, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x31, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x32, 0xD0, 0x04, 0x00, 0x10,
+						0x01, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x01, 0xB4, 0x00, 0x06,
+						0x01, 0xB4 };
+
+static unsigned char select_item_922[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x32, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x33, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x34 };
+
+static unsigned char select_item_931[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x31, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x31, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x32, 0xD0, 0x04, 0x00, 0x10,
+						0x02, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x02, 0xB4, 0x00, 0x06,
+						0x02, 0xB4 };
+
+static unsigned char select_item_932[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x32, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x33, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x34 };
+
+static unsigned char select_item_941[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x31, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x31, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x32, 0xD0, 0x04, 0x00, 0x10,
+						0x04, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x04, 0xB4, 0x00, 0x06,
+						0x04, 0xB4 };
+
+static unsigned char select_item_942[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x32, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x33, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x34, 0xD0, 0x04, 0x00, 0x10,
+						0x00, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x00, 0xB4, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char select_item_943[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x33, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x35, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x36 };
+
+static unsigned char select_item_951[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x31, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x31, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x32, 0xD0, 0x04, 0x00, 0x10,
+						0x08, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x08, 0xB4, 0x00, 0x06,
+						0x08, 0xB4 };
+
+static unsigned char select_item_952[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x32, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x33, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x34, 0xD0, 0x04, 0x00, 0x10,
+						0x00, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x00, 0xB4, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char select_item_953[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x33, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x35, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x36 };
+
+static unsigned char select_item_961[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x31, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x31, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x32, 0xD0, 0x04, 0x00, 0x10,
+						0x10, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x10, 0xB4, 0x00, 0x06,
+						0x10, 0xB4 };
+
+static unsigned char select_item_962[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x32, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x33, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x34, 0xD0, 0x04, 0x00, 0x10,
+						0x00, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x00, 0xB4, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char select_item_963[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x33, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x35, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x36 };
+
+static unsigned char select_item_971[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x31, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x31, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x32, 0xD0, 0x04, 0x00, 0x10,
+						0x20, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x20, 0xB4, 0x00, 0x06,
+						0x20, 0xB4 };
+
+static unsigned char select_item_972[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x32, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x33, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x34, 0xD0, 0x04, 0x00, 0x10,
+						0x00, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x00, 0xB4, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char select_item_973[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x33, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x35, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x36 };
+
+static unsigned char select_item_981[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x31, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x31, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x32, 0xD0, 0x04, 0x00, 0x10,
+						0x40, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x40, 0xB4, 0x00, 0x06,
+						0x40, 0xB4 };
+
+static unsigned char select_item_982[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x32, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x33, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x34, 0xD0, 0x04, 0x00, 0x10,
+						0x00, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x00, 0xB4, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char select_item_983[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x33, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x35, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x36 };
+
+static unsigned char select_item_991[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x31, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x31, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x32, 0xD0, 0x04, 0x00, 0x10,
+						0x80, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x80, 0xB4, 0x00, 0x06,
+						0x80, 0xB4 };
+
+static unsigned char select_item_992[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x32, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x33, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x34, 0xD0, 0x04, 0x00, 0x10,
+						0x00, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x00, 0xB4, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char select_item_993[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x33, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x35, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x36 };
+
+static unsigned char select_item_9101[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x31, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x31, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x32, 0xD0, 0x04, 0x00, 0x10,
+						0x00, 0xB4, 0xD1, 0x08, 0x00,
+						0x06, 0x00, 0xB4, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char select_item_9102[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x54, 0x6F, 0x6F,
+						0x6C, 0x6B, 0x69, 0x74, 0x20,
+						0x53, 0x65, 0x6C, 0x65, 0x63,
+						0x74, 0x20, 0x32, 0x8F, 0x07,
+						0x01, 0x49, 0x74, 0x65, 0x6D,
+						0x20, 0x33, 0x8F, 0x07, 0x02,
+						0x49, 0x74, 0x65, 0x6D, 0x20,
+						0x34 };
+
+static unsigned char select_item_1011[] = { 0xD0, 0x7E, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x19, 0x80, 0x04, 0x17,
+						0x04, 0x14, 0x04, 0x20, 0x04,
+						0x10, 0x04, 0x12, 0x04, 0x21,
+						0x04, 0x22, 0x04, 0x12, 0x04,
+						0x23, 0x04, 0x19, 0x04, 0x22,
+						0x04, 0x15, 0x8F, 0x1C, 0x01,
+						0x80, 0x04, 0x17, 0x04, 0x14,
+						0x04, 0x20, 0x04, 0x10, 0x04,
+						0x12, 0x04, 0x21, 0x04, 0x22,
+						0x04, 0x12, 0x04, 0x23, 0x04,
+						0x19, 0x04, 0x22, 0x04, 0x15,
+						0x00, 0x31, 0x8F, 0x1C, 0x02,
+						0x80, 0x04, 0x17, 0x04, 0x14,
+						0x04, 0x20, 0x04, 0x10, 0x04,
+						0x12, 0x04, 0x21, 0x04, 0x22,
+						0x04, 0x12, 0x04, 0x23, 0x04,
+						0x19, 0x04, 0x22, 0x04, 0x15,
+						0x00, 0x32, 0x8F, 0x1C, 0x03,
+						0x80, 0x04, 0x17, 0x04, 0x14,
+						0x04, 0x20, 0x04, 0x10, 0x04,
+						0x12, 0x04, 0x21, 0x04, 0x22,
+						0x04, 0x12, 0x04, 0x23, 0x04,
+						0x19, 0x04, 0x22, 0x04, 0x15,
+						0x00, 0x33 };
+
+static unsigned char select_item_1021[] = { 0xD0, 0x53, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0F, 0x81, 0x0C, 0x08,
+						0x97, 0x94, 0xA0, 0x90, 0x92,
+						0xA1, 0xA2, 0x92, 0xA3, 0x99,
+						0xA2, 0x95, 0x8F, 0x11, 0x01,
+						0x81, 0x0D, 0x08, 0x97, 0x94,
+						0xA0, 0x90, 0x92, 0xA1, 0xA2,
+						0x92, 0xA3, 0x99, 0xA2, 0x95,
+						0x31, 0x8F, 0x11, 0x02, 0x81,
+						0x0D, 0x08, 0x97, 0x94, 0xA0,
+						0x90, 0x92, 0xA1, 0xA2, 0x92,
+						0xA3, 0x99, 0xA2, 0x95, 0x32,
+						0x8F, 0x11, 0x03, 0x81, 0x0D,
+						0x08, 0x97, 0x94, 0xA0, 0x90,
+						0x92, 0xA1, 0xA2, 0x92, 0xA3,
+						0x99, 0xA2, 0x95, 0x33 };
+
+static unsigned char select_item_1031[] = { 0xD0, 0x57, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x10, 0x82, 0x0C, 0x04,
+						0x10, 0x87, 0x84, 0x90, 0x80,
+						0x82, 0x91, 0x92, 0x82, 0x93,
+						0x89, 0x92, 0x85, 0x8F, 0x12,
+						0x01, 0x82, 0x0D, 0x04, 0x10,
+						0x87, 0x84, 0x90, 0x80, 0x82,
+						0x91, 0x92, 0x82, 0x93, 0x89,
+						0x92, 0x85, 0x31, 0x8F, 0x12,
+						0x02, 0x82, 0x0D, 0x04, 0x10,
+						0x87, 0x84, 0x90, 0x80, 0x82,
+						0x91, 0x92, 0x82, 0x93, 0x89,
+						0x92, 0x85, 0x32, 0x8F, 0x12,
+						0x03, 0x82, 0x0D, 0x04, 0x10,
+						0x87, 0x84, 0x90, 0x80, 0x82,
+						0x91, 0x92, 0x82, 0x93, 0x89,
+						0x92, 0x85, 0x33 };
+
+static unsigned char select_item_1111[] = { 0xD0, 0x3E, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x0B, 0x80, 0x5D, 0xE5,
+						0x51, 0x77, 0x7B, 0xB1, 0x90,
+						0x09, 0x62, 0xE9, 0x8F, 0x08,
+						0x01, 0x80, 0x98, 0x79, 0x76,
+						0xEE, 0x4E, 0x00, 0x8F, 0x08,
+						0x02, 0x80, 0x98, 0x79, 0x76,
+						0xEE, 0x4E, 0x8C, 0x8F, 0x08,
+						0x03, 0x80, 0x98, 0x79, 0x76,
+						0xEE, 0x4E, 0x09, 0x8F, 0x08,
+						0x04, 0x80, 0x98, 0x79, 0x76,
+						0xEE, 0x56, 0xDB };
+
+static unsigned char select_item_1211[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x09, 0x80, 0x00, 0x38,
+						0x00, 0x30, 0x30, 0xEB, 0x00,
+						0x30, 0x8F, 0x0A, 0x01, 0x80,
+						0x00, 0x38, 0x00, 0x30, 0x30,
+						0xEB, 0x00, 0x31, 0x8F, 0x0A,
+						0x02, 0x80, 0x00, 0x38, 0x00,
+						0x30, 0x30, 0xEB, 0x00, 0x32,
+						0x8F, 0x0A, 0x03, 0x80, 0x00,
+						0x38, 0x00, 0x30, 0x30, 0xEB,
+						0x00, 0x33 };
+
+static unsigned char select_item_1221[] = { 0xD0, 0x30, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x07, 0x81, 0x04, 0x61,
+						0x38, 0x31, 0xEB, 0x30, 0x8F,
+						0x08, 0x01, 0x81, 0x04, 0x61,
+						0x38, 0x31, 0xEB, 0x31, 0x8F,
+						0x08, 0x02, 0x81, 0x04, 0x61,
+						0x38, 0x31, 0xEB, 0x32, 0x8F,
+						0x08, 0x03, 0x81, 0x04, 0x61,
+						0x38, 0x31, 0xEB, 0x33 };
+
+static unsigned char select_item_1231[] = { 0xD0, 0x34, 0x81, 0x03, 0x01, 0x24,
+						0x00, 0x82, 0x02, 0x81, 0x82,
+						0x85, 0x08, 0x82, 0x04, 0x30,
+						0xA0, 0x38, 0x32, 0xCB, 0x30,
+						0x8F, 0x09, 0x01, 0x82, 0x04,
+						0x30, 0xA0, 0x38, 0x32, 0xCB,
+						0x31, 0x8F, 0x09, 0x02, 0x82,
+						0x04, 0x30, 0xA0, 0x38, 0x32,
+						0xCB, 0x32, 0x8F, 0x09, 0x03,
+						0x82, 0x04, 0x30, 0xA0, 0x38,
+						0x32, 0xCB, 0x33 };
+
+static struct select_item_test select_item_data_111 = {
+	.pdu = select_item_111,
+	.pdu_len = sizeof(select_item_111),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.items[3] = {
+		.id = 4,
+		.text = "Item 4"
+	}
+};
+
+static struct select_item_test select_item_data_121 = {
+	.pdu = select_item_121,
+	.pdu_len = sizeof(select_item_121),
+	.qualifier = 0x00,
+	.alpha_id = "LargeMenu1",
+	.items[0] = {
+		.id = 0x50,
+		.text = "Zero"
+	},
+	.items[1] = {
+		.id = 0x4F,
+		.text = "One"
+	},
+	.items[2] = {
+		.id = 0x4E,
+		.text = "Two"
+	},
+	.items[3] = {
+		.id = 0x4D,
+		.text = "Three"
+	},
+	.items[4] = {
+		.id = 0x4C,
+		.text = "Four"
+	},
+	.items[5] = {
+		.id = 0x4B,
+		.text = "Five"
+	},
+	.items[6] = {
+		.id = 0x4A,
+		.text = "Six"
+	},
+	.items[7] = {
+		.id = 0x49,
+		.text = "Seven"
+	},
+	.items[8] = {
+		.id = 0x48,
+		.text = "Eight"
+	},
+	.items[9] = {
+		.id = 0x47,
+		.text = "Nine"
+	},
+	.items[10] = {
+		.id = 0x46,
+		.text = "Alpha"
+	},
+	.items[11] = {
+		.id = 0x45,
+		.text = "Bravo"
+	},
+	.items[12] = {
+		.id = 0x44,
+		.text = "Charlie"
+	},
+	.items[13] = {
+		.id = 0x43,
+		.text = "Delta"
+	},
+	.items[14] = {
+		.id = 0x42,
+		.text = "Echo"
+	},
+	.items[15] = {
+		.id = 0x41,
+		.text = "Fox-trot"
+	},
+	.items[16] = {
+		.id = 0x40,
+		.text = "Black"
+	},
+	.items[17] = {
+		.id = 0x3F,
+		.text = "Brown"
+	},
+	.items[18] = {
+		.id = 0x3E,
+		.text = "Red"
+	},
+	.items[19] = {
+		.id = 0x3D,
+		.text = "Orange"
+	},
+	.items[20] = {
+		.id = 0x3C,
+		.text = "Yellow"
+	},
+	.items[21] = {
+		.id = 0x3B,
+		.text = "Green"
+	},
+	.items[22] = {
+		.id = 0x3A,
+		.text = "Blue"
+	},
+	.items[23] = {
+		.id = 0x39,
+		.text = "Violet"
+	},
+	.items[24] = {
+		.id = 0x38,
+		.text = "Grey"
+	},
+	.items[25] = {
+		.id = 0x37,
+		.text = "White"
+	},
+	.items[26] = {
+		.id = 0x36,
+		.text = "milli"
+	},
+	.items[27] = {
+		.id = 0x35,
+		.text = "micro"
+	},
+	.items[28] = {
+		.id = 0x34,
+		.text = "nano"
+	},
+	.items[29] = {
+		.id = 0x33,
+		.text = "pico"
+	}
+};
+
+static struct select_item_test select_item_data_131 = {
+	.pdu = select_item_131,
+	.pdu_len = sizeof(select_item_131),
+	.qualifier = 0x00,
+	.alpha_id = "LargeMenu2",
+	.items[0] = {
+		.id = 0xFF,
+		.text = "Call Forwarding Unconditional"
+	},
+	.items[1] = {
+		.id = 0xFE,
+		.text = "Call Forwarding On User Busy"
+	},
+	.items[2] = {
+		.id = 0xFD,
+		.text = "Call Forwarding On No Reply"
+	},
+	.items[3] = {
+		.id = 0xFC,
+		.text = "Call Forwarding On User Not Reachable"
+	},
+	.items[4] = {
+		.id = 0xFB,
+		.text = "Barring Of All Outgoing Calls"
+	},
+	.items[5] = {
+		.id = 0xFA,
+		.text = "Barring Of All Outgoing International Calls"
+	},
+	.items[6] = {
+		.id = 0xF9,
+		.text = "CLI Presentation"
+	}
+};
+
+static struct select_item_test select_item_data_141 = {
+	.pdu = select_item_141,
+	.pdu_len = sizeof(select_item_141),
+	.qualifier = 0x00,
+	.alpha_id = "Select Item",
+	.items[0] = {
+		.id = 0x11,
+		.text = "One"
+	},
+	.items[1] = {
+		.id = 0x12,
+		.text = "Two"
+	}
+};
+
+static struct select_item_test select_item_data_151 = {
+	.pdu = select_item_151,
+	.pdu_len = sizeof(select_item_151),
+	.qualifier = 0x00,
+	.alpha_id = "The SIM shall supply a set of items from which the user "
+		"may choose one. Each item comprises a short identifier (used "
+		"to indicate the selection) and a text string. Optionally the "
+		"SIM may include an alpha identifier. The alpha identifier i",
+	.items[0] = {
+		.id = 0x01,
+		.text = "Y"
+	}
+};
+
+static struct select_item_test select_item_data_161 = {
+	.pdu = select_item_161,
+	.pdu_len = sizeof(select_item_161),
+	.qualifier = 0x00,
+	.alpha_id = "0LargeMenu",
+	.items[0] = {
+		.id = 0xFF,
+		.text = "1 Call Forward Unconditional"
+	},
+	.items[1] = {
+		.id = 0xFE,
+		.text = "2 Call Forward On User Busy"
+	},
+	.items[2] = {
+		.id = 0xFD,
+		.text = "3 Call Forward On No Reply"
+	},
+	.items[3] = {
+		.id = 0xFC,
+		.text = "4 Call Forward On User Not Reachable"
+	},
+	.items[4] = {
+		.id = 0xFB,
+		.text = "5 Barring Of All Outgoing Calls"
+	},
+	.items[5] = {
+		.id = 0xFA,
+		.text = "6 Barring Of All Outgoing Int Calls"
+	},
+	.items[6] = {
+		.id = 0xF9,
+		.text = "7 CLI Presentation"
+	}
+};
+
+static struct select_item_test select_item_data_211 = {
+	.pdu = select_item_211,
+	.pdu_len = sizeof(select_item_211),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.next_act = {
+		.list = { STK_COMMAND_TYPE_SEND_SMS,
+				STK_COMMAND_TYPE_SETUP_CALL,
+				STK_COMMAND_TYPE_PROVIDE_LOCAL_INFO},
+		.len = 3
+	}
+};
+
+static struct select_item_test select_item_data_311 = {
+	.pdu = select_item_311,
+	.pdu_len = sizeof(select_item_311),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.item_id = 0x02
+};
+
+static struct select_item_test select_item_data_411 = {
+	.pdu = select_item_411,
+	.pdu_len = sizeof(select_item_411),
+	.qualifier = 0x80,
+	.alpha_id = "Toolkit Select",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	}
+};
+
+static struct select_item_test select_item_data_511 = {
+	.pdu = select_item_511,
+	.pdu_len = sizeof(select_item_511),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.icon_id = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+		.id = 1
+	},
+	.item_icon_id_list = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+		.list = { 5, 5, 5 },
+		.len = 3
+	}
+};
+
+static struct select_item_test select_item_data_521 = {
+	.pdu = select_item_521,
+	.pdu_len = sizeof(select_item_521),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	},
+	.icon_id = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+		.id = 1
+	},
+	.item_icon_id_list = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+		.list = { 5, 5, 5 },
+		.len = 3
+	}
+};
+
+static struct select_item_test select_item_data_611 = {
+	.pdu = select_item_611,
+	.pdu_len = sizeof(select_item_611),
+	.qualifier = 0x03,
+	.alpha_id = "Toolkit Select",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	}
+};
+
+static struct select_item_test select_item_data_621 = {
+	.pdu = select_item_621,
+	.pdu_len = sizeof(select_item_621),
+	.qualifier = 0x01,
+	.alpha_id = "Toolkit Select",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	}
+};
+
+static struct select_item_test select_item_data_711 = {
+	.pdu = select_item_711,
+	.pdu_len = sizeof(select_item_711),
+	.qualifier = 0x04,
+	.alpha_id = "Toolkit Select",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	}
+};
+
+static struct select_item_test select_item_data_811 = {
+	.pdu = select_item_811,
+	.pdu_len = sizeof(select_item_811),
+	.qualifier = 0x00,
+	.alpha_id = "<TIME-OUT>",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "Item 3"
+	}
+};
+
+static struct select_item_test select_item_data_911 = {
+	.pdu = select_item_911,
+	.pdu_len = sizeof(select_item_911),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_912 = {
+	.pdu = select_item_912,
+	.pdu_len = sizeof(select_item_912),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 2",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 3"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 4"
+	}
+};
+
+static struct select_item_test select_item_data_921 = {
+	.pdu = select_item_921,
+	.pdu_len = sizeof(select_item_921),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x01, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x01, 0xB4, 0x00, 0x06, 0x01, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_922 = {
+	.pdu = select_item_922,
+	.pdu_len = sizeof(select_item_922),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 2",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 3"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 4"
+	}
+};
+
+static struct select_item_test select_item_data_931 = {
+	.pdu = select_item_931,
+	.pdu_len = sizeof(select_item_931),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x02, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x02, 0xB4, 0x00, 0x06, 0x02, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_932 = {
+	.pdu = select_item_932,
+	.pdu_len = sizeof(select_item_932),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 2",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 3"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 4"
+	}
+};
+
+static struct select_item_test select_item_data_941 = {
+	.pdu = select_item_941,
+	.pdu_len = sizeof(select_item_941),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x04, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x04, 0xB4, 0x00, 0x06, 0x04, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_942 = {
+	.pdu = select_item_942,
+	.pdu_len = sizeof(select_item_942),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 2",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 3"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 4"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_943 = {
+	.pdu = select_item_943,
+	.pdu_len = sizeof(select_item_943),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 3",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 5"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 6"
+	}
+};
+
+static struct select_item_test select_item_data_951 = {
+	.pdu = select_item_951,
+	.pdu_len = sizeof(select_item_951),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x08, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x08, 0xB4, 0x00, 0x06, 0x08, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_952 = {
+	.pdu = select_item_952,
+	.pdu_len = sizeof(select_item_952),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 2",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 3"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 4"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_953 = {
+	.pdu = select_item_953,
+	.pdu_len = sizeof(select_item_953),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 3",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 5"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 6"
+	}
+};
+
+static struct select_item_test select_item_data_961 = {
+	.pdu = select_item_961,
+	.pdu_len = sizeof(select_item_961),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x10, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x10, 0xB4, 0x00, 0x06, 0x10, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_962 = {
+	.pdu = select_item_962,
+	.pdu_len = sizeof(select_item_962),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 2",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 3"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 4"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_963 = {
+	.pdu = select_item_963,
+	.pdu_len = sizeof(select_item_963),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 3",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 5"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 6"
+	}
+};
+
+static struct select_item_test select_item_data_971 = {
+	.pdu = select_item_971,
+	.pdu_len = sizeof(select_item_971),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x20, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x20, 0xB4, 0x00, 0x06, 0x20, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_972 = {
+	.pdu = select_item_972,
+	.pdu_len = sizeof(select_item_972),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 2",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 3"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 4"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_973 = {
+	.pdu = select_item_973,
+	.pdu_len = sizeof(select_item_973),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 3",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 5"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 6"
+	}
+};
+
+static struct select_item_test select_item_data_981 = {
+	.pdu = select_item_981,
+	.pdu_len = sizeof(select_item_981),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x40, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x40, 0xB4, 0x00, 0x06, 0x40, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_982 = {
+	.pdu = select_item_982,
+	.pdu_len = sizeof(select_item_982),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 2",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 3"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 4"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_983 = {
+	.pdu = select_item_983,
+	.pdu_len = sizeof(select_item_983),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 3",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 5"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 6"
+	}
+};
+
+static struct select_item_test select_item_data_991 = {
+	.pdu = select_item_991,
+	.pdu_len = sizeof(select_item_991),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x80, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x80, 0xB4, 0x00, 0x06, 0x80, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_992 = {
+	.pdu = select_item_992,
+	.pdu_len = sizeof(select_item_992),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 2",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 3"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 4"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_993 = {
+	.pdu = select_item_993,
+	.pdu_len = sizeof(select_item_993),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 3",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 5"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 6"
+	}
+};
+
+static struct select_item_test select_item_data_9101 = {
+	.pdu = select_item_9101,
+	.pdu_len = sizeof(select_item_9101),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 1",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 2"
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	},
+	.item_text_attr_list = {
+		.len = 8,
+		.list = { 0x00, 0x06, 0x00, 0xB4, 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct select_item_test select_item_data_9102 = {
+	.pdu = select_item_9102,
+	.pdu_len = sizeof(select_item_9102),
+	.qualifier = 0x00,
+	.alpha_id = "Toolkit Select 2",
+	.items[0] = {
+		.id = 1,
+		.text = "Item 3"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "Item 4"
+	}
+};
+
+static struct select_item_test select_item_data_1011 = {
+	.pdu = select_item_1011,
+	.pdu_len = sizeof(select_item_1011),
+	.qualifier = 0x00,
+	.alpha_id = "ЗДРАВСТВУЙТЕ",
+	.items[0] = {
+		.id = 1,
+		.text = "ЗДРАВСТВУЙТЕ1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "ЗДРАВСТВУЙТЕ2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "ЗДРАВСТВУЙТЕ3"
+	}
+};
+
+static struct select_item_test select_item_data_1021 = {
+	.pdu = select_item_1021,
+	.pdu_len = sizeof(select_item_1021),
+	.qualifier = 0x00,
+	.alpha_id = "ЗДРАВСТВУЙТЕ",
+	.items[0] = {
+		.id = 1,
+		.text = "ЗДРАВСТВУЙТЕ1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "ЗДРАВСТВУЙТЕ2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "ЗДРАВСТВУЙТЕ3"
+	}
+};
+
+static struct select_item_test select_item_data_1031 = {
+	.pdu = select_item_1031,
+	.pdu_len = sizeof(select_item_1031),
+	.qualifier = 0x00,
+	.alpha_id = "ЗДРАВСТВУЙТЕ",
+	.items[0] = {
+		.id = 1,
+		.text = "ЗДРАВСТВУЙТЕ1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "ЗДРАВСТВУЙТЕ2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "ЗДРАВСТВУЙТЕ3"
+	}
+};
+
+static struct select_item_test select_item_data_1111 = {
+	.pdu = select_item_1111,
+	.pdu_len = sizeof(select_item_1111),
+	.qualifier = 0x00,
+	.alpha_id = "工具箱选择",
+	.items[0] = {
+		.id = 1,
+		.text = "项目一"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "项目二"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "项目三"
+	},
+	.items[3] = {
+		.id = 4,
+		.text = "项目四"
+	}
+};
+
+static struct select_item_test select_item_data_1211 = {
+	.pdu = select_item_1211,
+	.pdu_len = sizeof(select_item_1211),
+	.qualifier = 0x00,
+	.alpha_id = "80ル0",
+	.items[0] = {
+		.id = 1,
+		.text = "80ル1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "80ル2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "80ル3"
+	}
+};
+
+static struct select_item_test select_item_data_1221 = {
+	.pdu = select_item_1221,
+	.pdu_len = sizeof(select_item_1221),
+	.qualifier = 0x00,
+	.alpha_id = "81ル0",
+	.items[0] = {
+		.id = 1,
+		.text = "81ル1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "81ル2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "81ル3"
+	}
+};
+
+static struct select_item_test select_item_data_1231 = {
+	.pdu = select_item_1231,
+	.pdu_len = sizeof(select_item_1231),
+	.qualifier = 0x00,
+	.alpha_id = "82ル0",
+	.items[0] = {
+		.id = 1,
+		.text = "82ル1"
+	},
+	.items[1] = {
+		.id = 2,
+		.text = "82ル2"
+	},
+	.items[2] = {
+		.id = 3,
+		.text = "82ル3"
+	}
+};
+
+static void test_select_item(gconstpointer data)
+{
+	const struct select_item_test *test = data;
+	struct stk_command *command;
+
+	command = stk_command_new_from_pdu(test->pdu, test->pdu_len);
+
+	g_assert(command);
+
+	g_assert(command->number == 1);
+	g_assert(command->type == STK_COMMAND_TYPE_SELECT_ITEM);
+	g_assert(command->qualifier == test->qualifier);
+
+	g_assert(command->src == STK_DEVICE_IDENTITY_TYPE_UICC);
+	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_TERMINAL);
+
+	check_common_text(command->select_item.alpha_id, test->alpha_id);
+	check_items(command->select_item.items, test->items);
+	check_items_next_action_indicator(&command->select_item.next_act,
+						&test->next_act);
+	check_item_id(command->select_item.item_id, test->item_id);
+	check_icon_id(&command->select_item.icon_id, &test->icon_id);
+	check_item_icon_id_list(&command->select_item.item_icon_id_list,
+					&test->item_icon_id_list);
+	check_text_attr(&command->select_item.text_attr, &test->text_attr);
+	check_item_text_attribute_list(
+				&command->select_item.item_text_attr_list,
+				&test->item_text_attr_list);
+	check_frame_id(&command->select_item.frame_id, &test->frame_id);
+
+	stk_command_free(command);
+}
+
 struct send_sms_test {
 	const unsigned char *pdu;
 	unsigned int pdu_len;
@@ -5981,6 +7919,103 @@ int main(int argc, char **argv)
 	g_test_add_data_func("/teststk/Setup Menu 9.1.3",
 				&setup_menu_data_913, test_setup_menu);
 
+	g_test_add_data_func("/teststk/Select Item 1.1.1",
+				&select_item_data_111, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 1.2.1",
+				&select_item_data_121, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 1.3.1",
+				&select_item_data_131, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 1.4.1",
+				&select_item_data_141, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 1.5.1",
+				&select_item_data_151, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 1.6.1",
+				&select_item_data_161, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 2.1.1",
+				&select_item_data_211, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 3.1.1",
+				&select_item_data_311, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 4.1.1",
+				&select_item_data_411, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 5.1.1",
+				&select_item_data_511, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 5.2.1",
+				&select_item_data_521, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 6.1.1",
+				&select_item_data_611, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 6.2.1",
+				&select_item_data_621, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 7.1.1",
+				&select_item_data_711, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 8.1.1",
+				&select_item_data_811, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.1.1",
+				&select_item_data_911, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.1.2",
+				&select_item_data_912, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.2.1",
+				&select_item_data_921, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.2.2",
+				&select_item_data_922, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.3.1",
+				&select_item_data_931, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.3.2",
+				&select_item_data_932, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.4.1",
+				&select_item_data_941, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.4.2",
+				&select_item_data_942, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.4.3",
+				&select_item_data_943, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.5.1",
+				&select_item_data_951, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.5.2",
+				&select_item_data_952, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.5.3",
+				&select_item_data_953, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.6.1",
+				&select_item_data_961, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.6.2",
+				&select_item_data_962, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.6.3",
+				&select_item_data_963, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.7.1",
+				&select_item_data_971, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.7.2",
+				&select_item_data_972, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.7.3",
+				&select_item_data_973, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.8.1",
+				&select_item_data_981, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.8.2",
+				&select_item_data_982, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.8.3",
+				&select_item_data_983, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.9.1",
+				&select_item_data_991, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.9.2",
+				&select_item_data_992, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.9.3",
+				&select_item_data_993, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.10.1",
+				&select_item_data_9101, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 9.10.2",
+				&select_item_data_9102, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 10.1.1",
+				&select_item_data_1011, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 10.2.1",
+				&select_item_data_1021, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 10.3.1",
+				&select_item_data_1031, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 11.1.1",
+				&select_item_data_1111, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 12.1.1",
+				&select_item_data_1211, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 12.2.1",
+				&select_item_data_1221, test_select_item);
+	g_test_add_data_func("/teststk/Select Item 12.3.1",
+				&select_item_data_1231, test_select_item);
+
 	g_test_add_data_func("/teststk/Send SMS 1.1",
 				&send_sms_data_11, test_send_sms);
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 15/19] test-stkutil: Use dedicated functions to check
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (12 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 14/19] test-stkutil: Add unit test for select item parser Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-10 10:38 ` [PATCH 16/19] stkutil: Parse cdma tpdu in send sms parser Yang Gu
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 unit/test-stkutil.c |   50 +++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 41 insertions(+), 9 deletions(-)

diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 70d87d3..52aa050 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -70,6 +70,12 @@ static inline void check_common_text(const char *command, const char *test)
 	g_assert(g_str_equal(command, test));
 }
 
+/* Defined in TS 102.223 Section 8.2 */
+static inline void check_alpha_id(const char *command, const char *test)
+{
+	check_common_text(command, test);
+}
+
 /* Defined in TS 102.223 Section 8.8 */
 static void check_duration(const struct stk_duration *command,
 					const struct stk_duration *test)
@@ -115,6 +121,25 @@ static void check_response_length(const struct stk_response_length *command,
 	g_assert(command->max == test->max);
 }
 
+/* Defined in TS 102.223 Section 8.15 */
+static inline void check_text(const char *command, const char *test)
+{
+	check_common_text(command, test);
+}
+
+/* Defined in TS 102.223 Section 8.16 */
+static inline void check_tone(const ofono_bool_t command,
+					const ofono_bool_t test)
+{
+	check_common_bool(command, test);
+}
+
+/* Defined in TS 102.223 Section 8.23 */
+static inline void check_default_text(const char *command, const char *test)
+{
+	check_common_text(command, test);
+}
+
 /* Defined in TS 102.223 Section 8.24 */
 static void check_items_next_action_indicator(
 			const struct stk_items_next_action_indicator *command,
@@ -141,6 +166,13 @@ static void check_item_icon_id_list(const struct stk_item_icon_id_list *command,
 	g_assert(g_mem_equal(command->list, test->list, test->len));
 }
 
+/* Defined in TS 102.223 Section 8.43 */
+static inline void check_imm_resp(const unsigned char command,
+					const unsigned char test)
+{
+	check_common_byte(command, test);
+}
+
 /* Defined in TS 102.223 Section 8.72 */
 static void check_text_attr(const struct stk_text_attribute *command,
 					const struct stk_text_attribute *test)
@@ -409,9 +441,9 @@ static void test_display_text(gconstpointer data)
 	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_DISPLAY);
 
 	g_assert(command->display_text.text);
-	check_common_text(command->display_text.text, test->text);
+	check_text(command->display_text.text, test->text);
 	check_icon_id(&command->display_text.icon_id, &test->icon_id);
-	check_common_bool(command->display_text.immediate_response,
+	check_imm_resp(command->display_text.immediate_response,
 						test->immediate_response);
 	check_duration(&command->display_text.duration, &test->duration);
 	check_text_attr(&command->display_text.text_attr,
@@ -1346,7 +1378,7 @@ static void test_get_inkey(gconstpointer data)
 	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_TERMINAL);
 
 	g_assert(command->get_inkey.text);
-	check_common_text(command->get_inkey.text, test->text);
+	check_text(command->get_inkey.text, test->text);
 	check_icon_id(&command->get_inkey.icon_id, &test->icon_id);
 	check_duration(&command->get_inkey.duration, &test->duration);
 	check_text_attr(&command->get_inkey.text_attr,
@@ -2652,9 +2684,9 @@ static void test_get_input(gconstpointer data)
 
 	if (test->text)
 		g_assert(command->get_input.text);
-	check_common_text(command->get_input.text, test->text);
+	check_text(command->get_input.text, test->text);
 	check_response_length(&command->get_input.resp_len, &test->resp_len);
-	check_common_text(command->get_input.default_text, test->default_text);
+	check_default_text(command->get_input.default_text, test->default_text);
 	check_icon_id(&command->get_input.icon_id, &test->icon_id);
 	check_text_attr(&command->get_input.text_attr,
 						&test->text_attr);
@@ -3929,8 +3961,8 @@ static void test_play_tone(gconstpointer data)
 	g_assert(command->src == STK_DEVICE_IDENTITY_TYPE_UICC);
 	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_EARPIECE);
 
-	check_common_text(command->play_tone.alpha_id, test->alpha_id);
-	check_common_byte(command->play_tone.tone, test->tone);
+	check_alpha_id(command->play_tone.alpha_id, test->alpha_id);
+	check_tone(command->play_tone.tone, test->tone);
 	check_duration(&command->play_tone.duration, &test->duration);
 	check_icon_id(&command->play_tone.icon_id, &test->icon_id);
 	check_text_attr(&command->play_tone.text_attr, &test->text_attr);
@@ -5462,7 +5494,7 @@ static void test_setup_menu(gconstpointer data)
 
 	if (test->alpha_id)
 		g_assert(command->setup_menu.alpha_id);
-	check_common_text(command->setup_menu.alpha_id, test->alpha_id);
+	check_alpha_id(command->setup_menu.alpha_id, test->alpha_id);
 	check_items(command->setup_menu.items, test->items);
 	check_items_next_action_indicator(&command->setup_menu.next_act,
 						&test->next_act);
@@ -7390,7 +7422,7 @@ static void test_select_item(gconstpointer data)
 	g_assert(command->src == STK_DEVICE_IDENTITY_TYPE_UICC);
 	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_TERMINAL);
 
-	check_common_text(command->select_item.alpha_id, test->alpha_id);
+	check_alpha_id(command->select_item.alpha_id, test->alpha_id);
 	check_items(command->select_item.items, test->items);
 	check_items_next_action_indicator(&command->select_item.next_act,
 						&test->next_act);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 16/19] stkutil: Parse cdma tpdu in send sms parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (13 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 15/19] test-stkutil: Use dedicated functions to check Yang Gu
@ 2010-05-10 10:38 ` Yang Gu
  2010-05-11 19:38   ` Denis Kenzior
  2010-05-10 10:39 ` [PATCH 17/19] test-stkutil: Refactor test for " Yang Gu
                   ` (3 subsequent siblings)
  18 siblings, 1 reply; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:38 UTC (permalink / raw)
  To: ofono

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

---
 src/stkutil.c |   16 ++++++++++++----
 src/stkutil.h |    1 +
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/stkutil.c b/src/stkutil.c
index ebe1114..b6212b3 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -2414,13 +2414,14 @@ static void destroy_send_sms(struct stk_command *command)
 {
 	g_free(command->send_sms.alpha_id);
 	g_free(command->send_sms.address.number);
+	g_free(command->send_sms.cdma_sms.array);
 }
 
 static gboolean parse_send_sms(struct stk_command *command, 
 					struct comprehension_tlv_iter *iter)
 {
 	struct stk_command_send_sms *obj = &command->send_sms;
-	struct gsm_sms_tpdu tpdu;
+	struct gsm_sms_tpdu gsm_tpdu;
 	gboolean ret;
 
 	if (command->src != STK_DEVICE_IDENTITY_TYPE_UICC)
@@ -2434,7 +2435,9 @@ static gboolean parse_send_sms(struct stk_command *command,
 				STK_DATA_OBJECT_TYPE_ADDRESS, 0,
 				&obj->address,
 				STK_DATA_OBJECT_TYPE_GSM_SMS_TPDU, 0,
-				&tpdu,
+				&gsm_tpdu,
+				STK_DATA_OBJECT_TYPE_CDMA_SMS_TPDU, 0,
+				&obj->cdma_sms,
 				STK_DATA_OBJECT_TYPE_ICON_ID, 0,
 				&obj->icon_id,
 				STK_DATA_OBJECT_TYPE_TEXT_ATTRIBUTE, 0,
@@ -2448,8 +2451,13 @@ static gboolean parse_send_sms(struct stk_command *command,
 
 	command->destructor = destroy_send_sms;
 
-	if (sms_decode(tpdu.tpdu, tpdu.len, TRUE, tpdu.len, &obj->gsm_sms)
-			== FALSE) {
+	if (gsm_tpdu.len > 0) {
+		if (sms_decode(gsm_tpdu.tpdu, gsm_tpdu.len, TRUE, gsm_tpdu.len,
+				&obj->gsm_sms) == FALSE) {
+			command->destructor(command);
+			return FALSE;
+		}
+	} else if (obj->cdma_sms.len == 0) {
 		command->destructor(command);
 		return FALSE;
 	}
diff --git a/src/stkutil.h b/src/stkutil.h
index 143679f..b936ee9 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -850,6 +850,7 @@ struct stk_command_send_sms {
 	char *alpha_id;
 	struct stk_address address;
 	struct sms gsm_sms;
+	struct stk_common_byte_array cdma_sms;
 	struct stk_icon_id icon_id;
 	struct stk_text_attribute text_attr;
 	struct stk_frame_id frame_id;
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 17/19] test-stkutil: Refactor test for send sms parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (14 preceding siblings ...)
  2010-05-10 10:38 ` [PATCH 16/19] stkutil: Parse cdma tpdu in send sms parser Yang Gu
@ 2010-05-10 10:39 ` Yang Gu
  2010-05-10 10:39 ` [PATCH 18/19] stkutil: Add setup call proactive command parser Yang Gu
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:39 UTC (permalink / raw)
  To: ofono

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

---
 unit/test-stkutil.c |  132 ++++++++++++++++++++++++++++++++------------------
 1 files changed, 84 insertions(+), 48 deletions(-)

diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 52aa050..ffe0a3f 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -70,6 +70,27 @@ static inline void check_common_text(const char *command, const char *test)
 	g_assert(g_str_equal(command, test));
 }
 
+static inline void check_common_byte_array(
+				const struct stk_common_byte_array *command,
+				const struct stk_common_byte_array *test)
+{
+	if (test->len == 0) {
+		g_assert(command->len == 0);
+		return;
+	}
+
+	g_assert(command->len != 0);
+	g_assert(g_mem_equal(command->array, test->array, test->len));
+}
+
+/* Defined in TS 102.223 Section 8.1 */
+static inline void check_address(const struct stk_address *command,
+					const struct stk_address *test)
+{
+	g_assert(command->ton_npi == test->ton_npi);
+	g_assert(g_str_equal(command->number, test->number));
+}
+
 /* Defined in TS 102.223 Section 8.2 */
 static inline void check_alpha_id(const char *command, const char *test)
 {
@@ -121,6 +142,18 @@ static void check_response_length(const struct stk_response_length *command,
 	g_assert(command->max == test->max);
 }
 
+/* Defined in TS 102.223 Section 8.13 */
+static void check_gsm_sms_tpdu(const struct sms *command,
+					const struct sms *test)
+{
+	g_assert(command->submit.mr == test->submit.mr);
+	g_assert(command->submit.udl == test->submit.udl);
+	g_assert(g_str_equal(command->submit.daddr.address,
+					test->submit.daddr.address));
+	g_assert(g_mem_equal(command->submit.ud, test->submit.ud,
+					test->submit.udl));
+}
+
 /* Defined in TS 102.223 Section 8.15 */
 static inline void check_text(const char *command, const char *test)
 {
@@ -173,6 +206,14 @@ static inline void check_imm_resp(const unsigned char command,
 	check_common_byte(command, test);
 }
 
+/* Defined in TS 102.223 Section 8.71 */
+static inline void check_cdma_sms_tpdu(
+				const struct stk_common_byte_array *command,
+				const struct stk_common_byte_array *test)
+{
+	check_common_byte_array(command, test);
+}
+
 /* Defined in TS 102.223 Section 8.72 */
 static void check_text_attr(const struct stk_text_attribute *command,
 					const struct stk_text_attribute *test)
@@ -7443,45 +7484,51 @@ struct send_sms_test {
 	const unsigned char *pdu;
 	unsigned int pdu_len;
 	unsigned char qualifier;
-	const char *alpha_id;
-	unsigned char ton_npi;
-	const char *address;
-	unsigned char sms_mr;
-	const char *sms_address;
-	unsigned char sms_udl;
-	const char *sms_ud;
+	char *alpha_id;
+	struct stk_address address;
+	struct sms gsm_sms;
+	struct stk_common_byte_array cdma_sms;
+	struct stk_icon_id icon_id;
+	struct stk_text_attribute text_attr;
+	struct stk_frame_id frame_id;
 };
 
 /* 3GPP TS 31.124 Section 27.22.4.10.1.4.2 */
-static unsigned char send_sms_11[] = { 0xD0, 0x37, 0x81, 0x03, 0x01, 0x13, 0x00,
-					0x82, 0x02, 0x81, 0x83, 0x85, 0x07,
-					0x53, 0x65, 0x6E, 0x64, 0x20, 0x53,
-					0x4D, 0x86, 0x09, 0x91, 0x11, 0x22,
-					0x33, 0x44, 0x55, 0x66, 0x77, 0xF8,
-					0x8B, 0x18, 0x01, 0x00, 0x09, 0x91,
-					0x10, 0x32, 0x54, 0x76, 0xF8, 0x40,
-					0xF4, 0x0C, 0x54, 0x65, 0x73, 0x74,
-					0x20, 0x4D, 0x65, 0x73, 0x73, 0x61,
-					0x67, 0x65 };
-
-static struct send_sms_test send_sms_data_11 = {
-	.pdu = send_sms_11,
-	.pdu_len = sizeof(send_sms_11),
+static unsigned char send_sms_111[] = { 0xD0, 0x37, 0x81, 0x03, 0x01, 0x13,
+					0x00, 0x82, 0x02, 0x81, 0x83, 0x85,
+					0x07, 0x53, 0x65, 0x6E, 0x64, 0x20,
+					0x53, 0x4D, 0x86, 0x09, 0x91, 0x11,
+					0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+					0xF8, 0x8B, 0x18, 0x01, 0x00, 0x09,
+					0x91, 0x10, 0x32, 0x54, 0x76, 0xF8,
+					0x40, 0xF4, 0x0C, 0x54, 0x65, 0x73,
+					0x74, 0x20, 0x4D, 0x65, 0x73, 0x73,
+					0x61, 0x67, 0x65 };
+
+static struct send_sms_test send_sms_data_111 = {
+	.pdu = send_sms_111,
+	.pdu_len = sizeof(send_sms_111),
 	.qualifier = 0x00,
 	.alpha_id = "Send SM",
-	.ton_npi = 0x91,
-	.address = "112233445566778",
-	.sms_mr = 0x00,
-	.sms_address = "012345678",
-	.sms_udl = 12,
-	.sms_ud = "Test Message",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.udl = 12,
+			.ud = "Test Message"
+		} }
+	}
 };
 
 static void test_send_sms(gconstpointer data)
 {
 	const struct send_sms_test *test = data;
 	struct stk_command *command;
-	int i;
 
 	command = stk_command_new_from_pdu(test->pdu, test->pdu_len);
 
@@ -7494,24 +7541,13 @@ static void test_send_sms(gconstpointer data)
 	g_assert(command->src == STK_DEVICE_IDENTITY_TYPE_UICC);
 	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_NETWORK);
 
-	if (test->alpha_id)
-		g_assert(g_str_equal(test->alpha_id,
-					command->send_sms.alpha_id));
-
-	if (test->address) {
-		g_assert(test->ton_npi == command->send_sms.address.ton_npi);
-		g_assert(g_str_equal(test->address,
-					command->send_sms.address.number));
-	}
-
-	g_assert(test->sms_mr == command->send_sms.gsm_sms.submit.mr);
-	g_assert(test->sms_udl == command->send_sms.gsm_sms.submit.udl);
-	g_assert(g_str_equal(test->sms_address,
-			command->send_sms.gsm_sms.submit.daddr.address));
-
-	for (i = 0; i < test->sms_udl; i++)
-		g_assert(test->sms_ud[i] ==
-				command->send_sms.gsm_sms.submit.ud[i]);
+	check_alpha_id(command->send_sms.alpha_id, test->alpha_id);
+	check_address(&command->send_sms.address, &test->address);
+	check_gsm_sms_tpdu(&command->send_sms.gsm_sms, &test->gsm_sms);
+	check_cdma_sms_tpdu(&command->send_sms.cdma_sms, &test->cdma_sms);
+	check_icon_id(&command->select_item.icon_id, &test->icon_id);
+	check_text_attr(&command->select_item.text_attr, &test->text_attr);
+	check_frame_id(&command->select_item.frame_id, &test->frame_id);
 
 	stk_command_free(command);
 }
@@ -8048,8 +8084,8 @@ int main(int argc, char **argv)
 	g_test_add_data_func("/teststk/Select Item 12.3.1",
 				&select_item_data_1231, test_select_item);
 
-	g_test_add_data_func("/teststk/Send SMS 1.1",
-				&send_sms_data_11, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 1.1.1",
+				&send_sms_data_111, test_send_sms);
 
 	return g_test_run();
 }
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 18/19] stkutil: Add setup call proactive command parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (15 preceding siblings ...)
  2010-05-10 10:39 ` [PATCH 17/19] test-stkutil: Refactor test for " Yang Gu
@ 2010-05-10 10:39 ` Yang Gu
  2010-05-10 10:39 ` [PATCH 19/19] test-stkutil: Add unit test for setup call parser Yang Gu
  2010-05-11 19:24 ` [PATCH 01/19] stkutil: Free default text for get input parser Denis Kenzior
  18 siblings, 0 replies; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:39 UTC (permalink / raw)
  To: ofono

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

---
 src/stkutil.c |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/stkutil.h |   15 +++++++++++++++
 2 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/src/stkutil.c b/src/stkutil.c
index b6212b3..75cfdef 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -2465,6 +2465,58 @@ static gboolean parse_send_sms(struct stk_command *command,
 	return TRUE;
 }
 
+static void destroy_setup_call(struct stk_command *command)
+{
+	g_free(command->setup_call.alpha_id_usr_cfm);
+	g_free(command->setup_call.addr.number);
+	g_free(command->setup_call.alpha_id_call_setup);
+}
+
+static gboolean parse_setup_call(struct stk_command *command,
+					struct comprehension_tlv_iter *iter)
+{
+	struct stk_command_setup_call *obj = &command->setup_call;
+	gboolean ret;
+
+	if (command->src != STK_DEVICE_IDENTITY_TYPE_UICC)
+		return FALSE;
+
+	if (command->dst != STK_DEVICE_IDENTITY_TYPE_NETWORK)
+		return FALSE;
+
+	ret = parse_dataobj(iter, STK_DATA_OBJECT_TYPE_ALPHA_ID, 0,
+				&obj->alpha_id_usr_cfm,
+				STK_DATA_OBJECT_TYPE_ADDRESS,
+				DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM,
+				&obj->addr,
+				STK_DATA_OBJECT_TYPE_CCP, 0,
+				&obj->ccp,
+				STK_DATA_OBJECT_TYPE_SUBADDRESS, 0,
+				&obj->subaddr,
+				STK_DATA_OBJECT_TYPE_DURATION, 0,
+				&obj->duration,
+				STK_DATA_OBJECT_TYPE_ICON_ID, 0,
+				&obj->icon_id_usr_cfm,
+				STK_DATA_OBJECT_TYPE_ALPHA_ID, 0,
+				&obj->alpha_id_call_setup,
+				STK_DATA_OBJECT_TYPE_ICON_ID, 0,
+				&obj->icon_id_call_setup,
+				STK_DATA_OBJECT_TYPE_TEXT_ATTRIBUTE, 0,
+				&obj->text_attr_usr_cfm,
+				STK_DATA_OBJECT_TYPE_TEXT_ATTRIBUTE, 0,
+				&obj->text_attr_call_setup,
+				STK_DATA_OBJECT_TYPE_FRAME_ID, 0,
+				&obj->frame_id,
+				STK_DATA_OBJECT_TYPE_INVALID);
+
+	if (ret == FALSE)
+		return FALSE;
+
+	command->destructor = destroy_setup_call;
+
+	return TRUE;
+}
+
 struct stk_command *stk_command_new_from_pdu(const unsigned char *pdu,
 						unsigned int len)
 {
@@ -2550,6 +2602,9 @@ struct stk_command *stk_command_new_from_pdu(const unsigned char *pdu,
 	case STK_COMMAND_TYPE_SEND_SMS:
 		ok = parse_send_sms(command, &iter);
 		break;
+	case STK_COMMAND_TYPE_SETUP_CALL:
+		ok = parse_setup_call(command, &iter);
+		break;
 	default:
 		ok = FALSE;
 		break;
diff --git a/src/stkutil.h b/src/stkutil.h
index b936ee9..17028fc 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -856,6 +856,20 @@ struct stk_command_send_sms {
 	struct stk_frame_id frame_id;
 };
 
+struct stk_command_setup_call {
+	char *alpha_id_usr_cfm;
+	struct stk_address addr;
+	struct stk_ccp ccp;
+	struct stk_subaddress subaddr;
+	struct stk_duration duration;
+	struct stk_icon_id icon_id_usr_cfm;
+	char *alpha_id_call_setup;
+	struct stk_icon_id icon_id_call_setup;
+	struct stk_text_attribute text_attr_usr_cfm;
+	struct stk_text_attribute text_attr_call_setup;
+	struct stk_frame_id frame_id;
+};
+
 struct stk_command {
 	unsigned char number;
 	unsigned char type;
@@ -872,6 +886,7 @@ struct stk_command {
 		struct stk_command_setup_menu setup_menu;
 		struct stk_command_select_item select_item;
 		struct stk_command_send_sms send_sms;
+		struct stk_command_setup_call setup_call;
 	};
 
 	void (*destructor)(struct stk_command *command);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 19/19] test-stkutil: Add unit test for setup call parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (16 preceding siblings ...)
  2010-05-10 10:39 ` [PATCH 18/19] stkutil: Add setup call proactive command parser Yang Gu
@ 2010-05-10 10:39 ` Yang Gu
  2010-05-11 19:24 ` [PATCH 01/19] stkutil: Free default text for get input parser Denis Kenzior
  18 siblings, 0 replies; 34+ messages in thread
From: Yang Gu @ 2010-05-10 10:39 UTC (permalink / raw)
  To: ofono

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

---
 unit/test-stkutil.c | 1395 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 1395 insertions(+), 0 deletions(-)

diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index ffe0a3f..428ffd4 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -97,6 +97,32 @@ static inline void check_alpha_id(const char *command, const char *test)
 	check_common_text(command, test);
 }
 
+/* Defined in TS 102.223 Section 8.3 */
+static void check_subaddress(const struct stk_subaddress *command,
+					const struct stk_subaddress *test)
+{
+	if (test->len == 0) {
+		g_assert(command->len == 0);
+		return;
+	}
+
+	g_assert(command->len != 0);
+	g_assert(g_mem_equal(command->subaddr, test->subaddr, test->len));
+}
+
+/* Defined in TS 102.223 Section 8.4 */
+static void check_ccp(const struct stk_ccp *command,
+					const struct stk_ccp *test)
+{
+	if (test->len == 0) {
+		g_assert(command->len == 0);
+		return;
+	}
+
+	g_assert(command->len != 0);
+	g_assert(g_mem_equal(command->ccp, test->ccp, test->len));
+}
+
 /* Defined in TS 102.223 Section 8.8 */
 static void check_duration(const struct stk_duration *command,
 					const struct stk_duration *test)
@@ -7552,6 +7578,1284 @@ static void test_send_sms(gconstpointer data)
 	stk_command_free(command);
 }
 
+struct setup_call_test {
+	const unsigned char *pdu;
+	unsigned int pdu_len;
+	unsigned char qualifier;
+	char *alpha_id_usr_cfm;
+	struct stk_address addr;
+	struct stk_ccp ccp;
+	struct stk_subaddress subaddr;
+	struct stk_duration duration;
+	struct stk_icon_id icon_id_usr_cfm;
+	char *alpha_id_call_setup;
+	struct stk_icon_id icon_id_call_setup;
+	struct stk_text_attribute text_attr_usr_cfm;
+	struct stk_text_attribute text_attr_call_setup;
+	struct stk_frame_id frame_id;
+};
+
+static unsigned char setup_call_111[] = { 0xD0, 0x1E, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x08, 0x4E, 0x6F, 0x74,
+						0x20, 0x62, 0x75, 0x73, 0x79,
+						0x86, 0x09, 0x91, 0x10, 0x32,
+						0x04, 0x21, 0x43, 0x65, 0x1C,
+						0x2C };
+
+static unsigned char setup_call_141[] = { 0xD0, 0x1D, 0x81, 0x03, 0x01, 0x10,
+						0x02, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x07, 0x4F, 0x6E, 0x20,
+						0x68, 0x6F, 0x6C, 0x64, 0x86,
+						0x09, 0x91, 0x10, 0x32, 0x04,
+						0x21, 0x43, 0x65, 0x1C, 0x2C };
+
+static unsigned char setup_call_151[] = { 0xD0, 0x20, 0x81, 0x03, 0x01, 0x10,
+						0x04, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0A, 0x44, 0x69, 0x73,
+						0x63, 0x6F, 0x6E, 0x6E, 0x65,
+						0x63, 0x74, 0x86, 0x09, 0x91,
+						0x10, 0x32, 0x04, 0x21, 0x43,
+						0x65, 0x1C, 0x2C };
+
+static unsigned char setup_call_181[] = { 0xD0, 0x2B, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x11, 0x43, 0x61, 0x70,
+						0x61, 0x62, 0x69, 0x6C, 0x69,
+						0x74, 0x79, 0x20, 0x63, 0x6F,
+						0x6E, 0x66, 0x69, 0x67, 0x86,
+						0x09, 0x91, 0x10, 0x32, 0x04,
+						0x21, 0x43, 0x65, 0x1C, 0x2C,
+						0x87, 0x02, 0x01, 0xA0 };
+
+static unsigned char setup_call_191[] = { 0xD0, 0x1C, 0x81, 0x03, 0x01, 0x10,
+						0x01, 0x82, 0x02, 0x81, 0x83,
+						0x86, 0x11, 0x91, 0x10, 0x32,
+						0x54, 0x76, 0x98, 0x10, 0x32,
+						0x54, 0x76, 0x98, 0x10, 0x32,
+						0x54, 0x76, 0x98, 0x10 };
+
+static unsigned char setup_call_1101[] = { 0xD0, 0x81, 0xFD, 0x81, 0x03, 0x01,
+						0x10, 0x01, 0x82, 0x02, 0x81,
+						0x83, 0x85, 0x81, 0xED, 0x54,
+						0x68, 0x72, 0x65, 0x65, 0x20,
+						0x74, 0x79, 0x70, 0x65, 0x73,
+						0x20, 0x61, 0x72, 0x65, 0x20,
+						0x64, 0x65, 0x66, 0x69, 0x6E,
+						0x65, 0x64, 0x3A, 0x20, 0x2D,
+						0x20, 0x73, 0x65, 0x74, 0x20,
+						0x75, 0x70, 0x20, 0x61, 0x20,
+						0x63, 0x61, 0x6C, 0x6C, 0x2C,
+						0x20, 0x62, 0x75, 0x74, 0x20,
+						0x6F, 0x6E, 0x6C, 0x79, 0x20,
+						0x69, 0x66, 0x20, 0x6E, 0x6F,
+						0x74, 0x20, 0x63, 0x75, 0x72,
+						0x72, 0x65, 0x6E, 0x74, 0x6C,
+						0x79, 0x20, 0x62, 0x75, 0x73,
+						0x79, 0x20, 0x6F, 0x6E, 0x20,
+						0x61, 0x6E, 0x6F, 0x74, 0x68,
+						0x65, 0x72, 0x20, 0x63, 0x61,
+						0x6C, 0x6C, 0x3B, 0x20, 0x2D,
+						0x20, 0x73, 0x65, 0x74, 0x20,
+						0x75, 0x70, 0x20, 0x61, 0x20,
+						0x63, 0x61, 0x6C, 0x6C, 0x2C,
+						0x20, 0x70, 0x75, 0x74, 0x74,
+						0x69, 0x6E, 0x67, 0x20, 0x61,
+						0x6C, 0x6C, 0x20, 0x6F, 0x74,
+						0x68, 0x65, 0x72, 0x20, 0x63,
+						0x61, 0x6C, 0x6C, 0x73, 0x20,
+						0x28, 0x69, 0x66, 0x20, 0x61,
+						0x6E, 0x79, 0x29, 0x20, 0x6F,
+						0x6E, 0x20, 0x68, 0x6F, 0x6C,
+						0x64, 0x3B, 0x20, 0x2D, 0x20,
+						0x73, 0x65, 0x74, 0x20, 0x75,
+						0x70, 0x20, 0x61, 0x20, 0x63,
+						0x61, 0x6C, 0x6C, 0x2C, 0x20,
+						0x64, 0x69, 0x73, 0x63, 0x6F,
+						0x6E, 0x6E, 0x65, 0x63, 0x74,
+						0x69, 0x6E, 0x67, 0x20, 0x61,
+						0x6C, 0x6C, 0x20, 0x6F, 0x74,
+						0x68, 0x65, 0x72, 0x20, 0x63,
+						0x61, 0x6C, 0x6C, 0x73, 0x20,
+						0x28, 0x69, 0x66, 0x20, 0x61,
+						0x6E, 0x79, 0x29, 0x20, 0x66,
+						0x69, 0x72, 0x73, 0x74, 0x2E,
+						0x20, 0x46, 0x6F, 0x72, 0x20,
+						0x65, 0x61, 0x63, 0x68, 0x20,
+						0x6F, 0x66, 0x20, 0x74, 0x68,
+						0x65, 0x73, 0x65, 0x20, 0x74,
+						0x79, 0x70, 0x65, 0x73, 0x2C,
+						0x20, 0x86, 0x02, 0x91, 0x10 };
+
+static unsigned char setup_call_1111[] = { 0xD0, 0x2B, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0C, 0x43, 0x61, 0x6C,
+						0x6C, 0x65, 0x64, 0x20, 0x70,
+						0x61, 0x72, 0x74, 0x79, 0x86,
+						0x09, 0x91, 0x10, 0x32, 0x04,
+						0x21, 0x43, 0x65, 0x1C, 0x2C,
+						0x88, 0x07, 0x80, 0x50, 0x95,
+						0x95, 0x95, 0x95, 0x95 };
+
+static unsigned char setup_call_1121[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x10,
+						0x01, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x08, 0x44, 0x75, 0x72,
+						0x61, 0x74, 0x69, 0x6F, 0x6E,
+						0x86, 0x09, 0x91, 0x10, 0x32,
+						0x04, 0x21, 0x43, 0x65, 0x1C,
+						0x2C, 0x84, 0x02, 0x01, 0x0A };
+
+static unsigned char setup_call_211[] = { 0xD0, 0x28, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0C, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x86,
+						0x09, 0x91, 0x10, 0x32, 0x04,
+						0x21, 0x43, 0x65, 0x1C, 0x2C,
+						0x85, 0x04, 0x43, 0x41, 0x4C,
+						0x4C };
+
+static unsigned char setup_call_311[] = { 0xD0, 0x30, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x16, 0x53, 0x65, 0x74,
+						0x20, 0x75, 0x70, 0x20, 0x63,
+						0x61, 0x6C, 0x6C, 0x20, 0x49,
+						0x63, 0x6F, 0x6E, 0x20, 0x33,
+						0x2E, 0x31, 0x2E, 0x31, 0x86,
+						0x09, 0x91, 0x10, 0x32, 0x04,
+						0x21, 0x43, 0x65, 0x1C, 0x2C,
+						0x9E, 0x02, 0x01, 0x01 };
+
+static unsigned char setup_call_321[] = { 0xD0, 0x30, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x16, 0x53, 0x65, 0x74,
+						0x20, 0x75, 0x70, 0x20, 0x63,
+						0x61, 0x6C, 0x6C, 0x20, 0x49,
+						0x63, 0x6F, 0x6E, 0x20, 0x33,
+						0x2E, 0x32, 0x2E, 0x31, 0x86,
+						0x09, 0x91, 0x10, 0x32, 0x04,
+						0x21, 0x43, 0x65, 0x1C, 0x2C,
+						0x9E, 0x02, 0x00, 0x01 };
+
+static unsigned char setup_call_331[] = { 0xD0, 0x30, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x16, 0x53, 0x65, 0x74,
+						0x20, 0x75, 0x70, 0x20, 0x63,
+						0x61, 0x6C, 0x6C, 0x20, 0x49,
+						0x63, 0x6F, 0x6E, 0x20, 0x33,
+						0x2E, 0x33, 0x2E, 0x31, 0x86,
+						0x09, 0x91, 0x10, 0x32, 0x04,
+						0x21, 0x43, 0x65, 0x1C, 0x2C,
+						0x9E, 0x02, 0x01, 0x02 };
+
+static unsigned char setup_call_341[] = { 0xD0, 0x4C, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x16, 0x53, 0x65, 0x74,
+						0x20, 0x75, 0x70, 0x20, 0x63,
+						0x61, 0x6C, 0x6C, 0x20, 0x49,
+						0x63, 0x6F, 0x6E, 0x20, 0x33,
+						0x2E, 0x34, 0x2E, 0x31, 0x86,
+						0x09, 0x91, 0x10, 0x32, 0x04,
+						0x21, 0x43, 0x65, 0x1C, 0x2C,
+						0x9E, 0x02, 0x00, 0x01, 0x85,
+						0x16, 0x53, 0x65, 0x74, 0x20,
+						0x75, 0x70, 0x20, 0x63, 0x61,
+						0x6C, 0x6C, 0x20, 0x49, 0x63,
+						0x6F, 0x6E, 0x20, 0x33, 0x2E,
+						0x34, 0x2E, 0x32, 0x9E, 0x02,
+						0x00, 0x01 };
+
+static unsigned char setup_call_411[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x31, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x31,
+						0xD0, 0x04, 0x00, 0x0E, 0x00,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char setup_call_412[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x32, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x32 };
+
+static unsigned char setup_call_421[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x31, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x31,
+						0xD0, 0x04, 0x00, 0x0E, 0x01,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x01, 0xB4 };
+
+static unsigned char setup_call_422[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x32, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x32 };
+
+static unsigned char setup_call_431[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x31, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x31,
+						0xD0, 0x04, 0x00, 0x0E, 0x02,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x02, 0xB4 };
+
+static unsigned char setup_call_432[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x32, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x32 };
+
+static unsigned char setup_call_441[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x31, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x31,
+						0xD0, 0x04, 0x00, 0x0E, 0x04,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x04, 0xB4 };
+
+static unsigned char setup_call_442[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x32, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x32,
+						0xD0, 0x04, 0x00, 0x0E, 0x00,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char setup_call_443[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x33, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x33 };
+
+static unsigned char setup_call_451[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x31, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x31,
+						0xD0, 0x04, 0x00, 0x0E, 0x08,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x08, 0xB4 };
+
+static unsigned char setup_call_452[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x32, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x32,
+						0xD0, 0x04, 0x00, 0x0E, 0x00,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char setup_call_453[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x33, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x33 };
+
+static unsigned char setup_call_461[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x31, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x31,
+						0xD0, 0x04, 0x00, 0x0E, 0x10,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x10, 0xB4 };
+
+static unsigned char setup_call_462[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x32, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x32,
+						0xD0, 0x04, 0x00, 0x0E, 0x00,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char setup_call_463[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x33, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x33 };
+
+static unsigned char setup_call_471[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x31, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x31,
+						0xD0, 0x04, 0x00, 0x0E, 0x20,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x20, 0xB4 };
+
+static unsigned char setup_call_472[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x32, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x32,
+						0xD0, 0x04, 0x00, 0x0E, 0x00,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char setup_call_473[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x33, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x33 };
+
+static unsigned char setup_call_481[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x31, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x31,
+						0xD0, 0x04, 0x00, 0x0E, 0x40,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x40, 0xB4 };
+
+static unsigned char setup_call_482[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x32, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x32,
+						0xD0, 0x04, 0x00, 0x0E, 0x00,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char setup_call_483[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x33, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x33 };
+
+static unsigned char setup_call_491[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x31, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x31,
+						0xD0, 0x04, 0x00, 0x0E, 0x80,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x80, 0xB4 };
+
+static unsigned char setup_call_492[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x32, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x32,
+						0xD0, 0x04, 0x00, 0x0E, 0x00,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x00, 0xB4 };
+
+static unsigned char setup_call_493[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x33, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x33 };
+
+static unsigned char setup_call_4101[] = { 0xD0, 0x38, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x31, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x31,
+						0xD0, 0x04, 0x00, 0x0E, 0x00,
+						0xB4, 0xD0, 0x04, 0x00, 0x06,
+						0x00, 0x4B };
+
+static unsigned char setup_call_4102[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0E, 0x43, 0x4F, 0x4E,
+						0x46, 0x49, 0x52, 0x4D, 0x41,
+						0x54, 0x49, 0x4F, 0x4E, 0x20,
+						0x32, 0x86, 0x09, 0x91, 0x10,
+						0x32, 0x04, 0x21, 0x43, 0x65,
+						0x1C, 0x2C, 0x85, 0x06, 0x43,
+						0x41, 0x4C, 0x4C, 0x20, 0x32 };
+
+static unsigned char setup_call_511[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x19, 0x80, 0x04, 0x17,
+						0x04, 0x14, 0x04, 0x20, 0x04,
+						0x10, 0x04, 0x12, 0x04, 0x21,
+						0x04, 0x22, 0x04, 0x12, 0x04,
+						0x23, 0x04, 0x19, 0x04, 0x22,
+						0x04, 0x15, 0x86, 0x07, 0x91,
+						0x10, 0x32, 0x04, 0x21, 0x43,
+						0x65 };
+
+static unsigned char setup_call_521[] = { 0xD0, 0x4C, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x1B, 0x80, 0x04, 0x17,
+						0x04, 0x14, 0x04, 0x20, 0x04,
+						0x10, 0x04, 0x12, 0x04, 0x21,
+						0x04, 0x22, 0x04, 0x12, 0x04,
+						0x23, 0x04, 0x19, 0x04, 0x22,
+						0x04, 0x15, 0x00, 0x31, 0x86,
+						0x07, 0x91, 0x10, 0x32, 0x04,
+						0x21, 0x43, 0x65, 0x85, 0x1B,
+						0x80, 0x04, 0x17, 0x04, 0x14,
+						0x04, 0x20, 0x04, 0x10, 0x04,
+						0x12, 0x04, 0x21, 0x04, 0x22,
+						0x04, 0x12, 0x04, 0x23, 0x04,
+						0x19, 0x04, 0x22, 0x04, 0x15,
+						0x00, 0x32 };
+
+static unsigned char setup_call_611[] = { 0xD0, 0x19, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x05, 0x80, 0x4E, 0x0D,
+						0x5F, 0xD9, 0x86, 0x07, 0x91,
+						0x10, 0x32, 0x04, 0x21, 0x43,
+						0x65 };
+
+static unsigned char setup_call_621[] = { 0xD0, 0x22, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x05, 0x80, 0x78, 0x6E,
+						0x5B, 0x9A, 0x86, 0x07, 0x91,
+						0x10, 0x32, 0x04, 0x21, 0x43,
+						0x65, 0x85, 0x07, 0x80, 0x62,
+						0x53, 0x75, 0x35, 0x8B, 0xDD };
+
+static unsigned char setup_call_711[] = { 0xD0, 0x17, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x03, 0x80, 0x30, 0xEB,
+						0x86, 0x07, 0x91, 0x10, 0x32,
+						0x04, 0x21, 0x43, 0x65 };
+
+static unsigned char setup_call_721[] = { 0xD0, 0x20, 0x81, 0x03, 0x01, 0x10,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x05, 0x80, 0x30, 0xEB,
+						0x00, 0x31, 0x86, 0x07, 0x91,
+						0x10, 0x32, 0x04, 0x21, 0x43,
+						0x65, 0x85, 0x05, 0x80, 0x30,
+						0xEB, 0x00, 0x32 };
+
+static struct setup_call_test setup_call_data_111 = {
+	.pdu = setup_call_111,
+	.pdu_len = sizeof(setup_call_111),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "Not busy",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	}
+};
+
+static struct setup_call_test setup_call_data_141 = {
+	.pdu = setup_call_141,
+	.pdu_len = sizeof(setup_call_141),
+	.qualifier = 0x02,
+	.alpha_id_usr_cfm = "On hold",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	}
+};
+
+static struct setup_call_test setup_call_data_151 = {
+	.pdu = setup_call_151,
+	.pdu_len = sizeof(setup_call_151),
+	.qualifier = 0x04,
+	.alpha_id_usr_cfm = "Disconnect",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	}
+};
+
+static struct setup_call_test setup_call_data_181 = {
+	.pdu = setup_call_181,
+	.pdu_len = sizeof(setup_call_181),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "Capability config",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.ccp = {
+		.len = 0x02,
+		.ccp = { 0x01, 0xA0 }
+	}
+};
+
+static struct setup_call_test setup_call_data_191 = {
+	.pdu = setup_call_191,
+	.pdu_len = sizeof(setup_call_191),
+	.qualifier = 0x01,
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "01234567890123456789012345678901"
+	}
+};
+
+static struct setup_call_test setup_call_data_1101 = {
+	.pdu = setup_call_1101,
+	.pdu_len = sizeof(setup_call_1101),
+	.qualifier = 0x01,
+	.alpha_id_usr_cfm = "Three types are defined: - set up a call, but "
+			"only if not currently busy on another call; - set "
+			"up a call, putting all other calls (if any) on hold; "
+			"- set up a call, disconnecting all other calls (if "
+			"any) first. For each of these types, ",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "01"
+	}
+};
+
+static struct setup_call_test setup_call_data_1111 = {
+	.pdu = setup_call_1111,
+	.pdu_len = sizeof(setup_call_1111),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "Called party",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.subaddr = {
+		.len = 0x07,
+		.subaddr = { 0x80, 0x50, 0x95, 0x95, 0x95, 0x95, 0x95 }
+	}
+};
+
+static struct setup_call_test setup_call_data_1121 = {
+	.pdu = setup_call_1121,
+	.pdu_len = sizeof(setup_call_1121),
+	.qualifier = 0x01,
+	.alpha_id_usr_cfm = "Duration",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.duration = {
+		.unit = STK_DURATION_TYPE_SECONDS,
+		.interval = 10,
+	}
+};
+
+static struct setup_call_test setup_call_data_211 = {
+	.pdu = setup_call_211,
+	.pdu_len = sizeof(setup_call_211),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL"
+};
+
+static struct setup_call_test setup_call_data_311 = {
+	.pdu = setup_call_311,
+	.pdu_len = sizeof(setup_call_311),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "Set up call Icon 3.1.1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.icon_id_usr_cfm = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+		.id = 0x01
+	}
+};
+
+static struct setup_call_test setup_call_data_321 = {
+	.pdu = setup_call_321,
+	.pdu_len = sizeof(setup_call_321),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "Set up call Icon 3.2.1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.icon_id_usr_cfm = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+		.id = 0x01
+	}
+};
+
+static struct setup_call_test setup_call_data_331 = {
+	.pdu = setup_call_331,
+	.pdu_len = sizeof(setup_call_331),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "Set up call Icon 3.3.1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.icon_id_usr_cfm = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+		.id = 0x02
+	}
+};
+
+static struct setup_call_test setup_call_data_341 = {
+	.pdu = setup_call_341,
+	.pdu_len = sizeof(setup_call_341),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "Set up call Icon 3.4.1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.icon_id_usr_cfm = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+		.id = 0x01
+	},
+	.alpha_id_call_setup = "Set up call Icon 3.4.2",
+	.icon_id_call_setup = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+		.id = 0x01
+	}
+};
+
+static struct setup_call_test setup_call_data_411 = {
+	.pdu = setup_call_411,
+	.pdu_len = sizeof(setup_call_411),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 1",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x00, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_412 = {
+	.pdu = setup_call_412,
+	.pdu_len = sizeof(setup_call_412),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 2",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 2"
+};
+
+static struct setup_call_test setup_call_data_421 = {
+	.pdu = setup_call_421,
+	.pdu_len = sizeof(setup_call_421),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 1",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x01, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x01, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_422 = {
+	.pdu = setup_call_422,
+	.pdu_len = sizeof(setup_call_422),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 2",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 2"
+};
+
+static struct setup_call_test setup_call_data_431 = {
+	.pdu = setup_call_431,
+	.pdu_len = sizeof(setup_call_431),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 1",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x02, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x02, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_432 = {
+	.pdu = setup_call_432,
+	.pdu_len = sizeof(setup_call_432),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 2",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 2"
+};
+
+static struct setup_call_test setup_call_data_441 = {
+	.pdu = setup_call_441,
+	.pdu_len = sizeof(setup_call_441),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 1",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x04, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x04, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_442 = {
+	.pdu = setup_call_442,
+	.pdu_len = sizeof(setup_call_442),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 2",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 2",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x00, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_443 = {
+	.pdu = setup_call_443,
+	.pdu_len = sizeof(setup_call_443),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 3",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 3"
+};
+
+static struct setup_call_test setup_call_data_451 = {
+	.pdu = setup_call_451,
+	.pdu_len = sizeof(setup_call_451),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 1",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x08, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x08, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_452 = {
+	.pdu = setup_call_452,
+	.pdu_len = sizeof(setup_call_452),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 2",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 2",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x00, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_453 = {
+	.pdu = setup_call_453,
+	.pdu_len = sizeof(setup_call_453),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 3",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 3"
+};
+
+static struct setup_call_test setup_call_data_461 = {
+	.pdu = setup_call_461,
+	.pdu_len = sizeof(setup_call_461),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 1",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x10, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x10, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_462 = {
+	.pdu = setup_call_462,
+	.pdu_len = sizeof(setup_call_462),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 2",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 2",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x00, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_463 = {
+	.pdu = setup_call_463,
+	.pdu_len = sizeof(setup_call_463),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 3",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 3"
+};
+
+static struct setup_call_test setup_call_data_471 = {
+	.pdu = setup_call_471,
+	.pdu_len = sizeof(setup_call_471),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 1",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x20, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x20, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_472 = {
+	.pdu = setup_call_472,
+	.pdu_len = sizeof(setup_call_472),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 2",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 2",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x00, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_473 = {
+	.pdu = setup_call_473,
+	.pdu_len = sizeof(setup_call_473),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 3",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 3"
+};
+
+static struct setup_call_test setup_call_data_481 = {
+	.pdu = setup_call_481,
+	.pdu_len = sizeof(setup_call_481),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 1",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x40, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x40, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_482 = {
+	.pdu = setup_call_482,
+	.pdu_len = sizeof(setup_call_482),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 2",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 2",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x00, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_483 = {
+	.pdu = setup_call_483,
+	.pdu_len = sizeof(setup_call_483),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 3",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 3"
+};
+
+static struct setup_call_test setup_call_data_491 = {
+	.pdu = setup_call_491,
+	.pdu_len = sizeof(setup_call_491),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 1",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x80, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x80, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_492 = {
+	.pdu = setup_call_492,
+	.pdu_len = sizeof(setup_call_492),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 2",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 2",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x00, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x00, 0xB4 }
+	}
+};
+
+static struct setup_call_test setup_call_data_493 = {
+	.pdu = setup_call_493,
+	.pdu_len = sizeof(setup_call_493),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 3",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 3"
+};
+
+static struct setup_call_test setup_call_data_4101 = {
+	.pdu = setup_call_4101,
+	.pdu_len = sizeof(setup_call_4101),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 1",
+	.text_attr_usr_cfm = {
+		.len = 4,
+		.attributes = { 0x00, 0x0E, 0x00, 0xB4 }
+	},
+	.text_attr_call_setup = {
+		.len = 4,
+		.attributes = { 0x00, 0x06, 0x00, 0x4B }
+	}
+};
+
+static struct setup_call_test setup_call_data_4102 = {
+	.pdu = setup_call_4102,
+	.pdu_len = sizeof(setup_call_4102),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "CONFIRMATION 2",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456a1a2"
+	},
+	.alpha_id_call_setup = "CALL 2"
+};
+
+static struct setup_call_test setup_call_data_511 = {
+	.pdu = setup_call_511,
+	.pdu_len = sizeof(setup_call_511),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "ЗДРАВСТВУЙТЕ",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456"
+	}
+};
+
+static struct setup_call_test setup_call_data_521 = {
+	.pdu = setup_call_521,
+	.pdu_len = sizeof(setup_call_521),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "ЗДРАВСТВУЙТЕ1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456"
+	},
+	.alpha_id_call_setup = "ЗДРАВСТВУЙТЕ2"
+};
+
+static struct setup_call_test setup_call_data_611 = {
+	.pdu = setup_call_611,
+	.pdu_len = sizeof(setup_call_611),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "不忙",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456"
+	}
+};
+
+static struct setup_call_test setup_call_data_621 = {
+	.pdu = setup_call_621,
+	.pdu_len = sizeof(setup_call_621),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "确定",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456"
+	},
+	.alpha_id_call_setup = "打电话"
+};
+
+static struct setup_call_test setup_call_data_711 = {
+	.pdu = setup_call_711,
+	.pdu_len = sizeof(setup_call_711),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "ル",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456"
+	}
+};
+
+static struct setup_call_test setup_call_data_721 = {
+	.pdu = setup_call_721,
+	.pdu_len = sizeof(setup_call_721),
+	.qualifier = 0x00,
+	.alpha_id_usr_cfm = "ル1",
+	.addr = {
+		.ton_npi = 0x91,
+		.number = "012340123456"
+	},
+	.alpha_id_call_setup = "ル2"
+};
+
+static void test_setup_call(gconstpointer data)
+{
+	const struct setup_call_test *test = data;
+	struct stk_command *command;
+
+	command = stk_command_new_from_pdu(test->pdu, test->pdu_len);
+
+	g_assert(command);
+
+	g_assert(command->number == 1);
+	g_assert(command->type == STK_COMMAND_TYPE_SETUP_CALL);
+	g_assert(command->qualifier == test->qualifier);
+
+	g_assert(command->src == STK_DEVICE_IDENTITY_TYPE_UICC);
+	g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_NETWORK);
+
+	check_alpha_id(command->setup_call.alpha_id_usr_cfm,
+					test->alpha_id_usr_cfm);
+	check_address(&command->setup_call.addr, &test->addr);
+	check_ccp(&command->setup_call.ccp, &test->ccp);
+	check_subaddress(&command->setup_call.subaddr, &test->subaddr);
+	check_duration(&command->setup_call.duration, &test->duration);
+	check_icon_id(&command->setup_call.icon_id_usr_cfm,
+					&test->icon_id_usr_cfm);
+	check_alpha_id(command->setup_call.alpha_id_call_setup,
+					test->alpha_id_call_setup);
+	check_icon_id(&command->setup_call.icon_id_call_setup,
+					&test->icon_id_call_setup);
+	check_text_attr(&command->setup_call.text_attr_usr_cfm,
+					&test->text_attr_usr_cfm);
+	check_text_attr(&command->setup_call.text_attr_call_setup,
+					&test->text_attr_call_setup);
+	check_frame_id(&command->setup_call.frame_id, &test->frame_id);
+
+	stk_command_free(command);
+}
+
 int main(int argc, char **argv)
 {
 	g_test_init(&argc, &argv, NULL);
@@ -8087,5 +9391,96 @@ int main(int argc, char **argv)
 	g_test_add_data_func("/teststk/Send SMS 1.1.1",
 				&send_sms_data_111, test_send_sms);
 
+	g_test_add_data_func("/teststk/Setup Call 1.1.1",
+				&setup_call_data_111, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 1.4.1",
+				&setup_call_data_141, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 1.5.1",
+				&setup_call_data_151, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 1.8.1",
+				&setup_call_data_181, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 1.9.1",
+				&setup_call_data_191, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 1.10.1",
+				&setup_call_data_1101, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 1.11.1",
+				&setup_call_data_1111, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 1.12.1",
+				&setup_call_data_1121, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 2.1.1",
+				&setup_call_data_211, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 3.1.1",
+				&setup_call_data_311, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 3.2.1",
+				&setup_call_data_321, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 3.3.1",
+				&setup_call_data_331, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 3.4.1",
+				&setup_call_data_341, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.1.1",
+				&setup_call_data_411, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.1.2",
+				&setup_call_data_412, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.2.1",
+				&setup_call_data_421, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.2.2",
+				&setup_call_data_422, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.3.1",
+				&setup_call_data_431, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.3.2",
+				&setup_call_data_432, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.4.1",
+				&setup_call_data_441, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.4.2",
+				&setup_call_data_442, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.4.3",
+				&setup_call_data_443, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.5.1",
+				&setup_call_data_451, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.5.2",
+				&setup_call_data_452, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.5.3",
+				&setup_call_data_453, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.6.1",
+				&setup_call_data_461, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.6.2",
+				&setup_call_data_462, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.6.3",
+				&setup_call_data_463, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.7.1",
+				&setup_call_data_471, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.7.2",
+				&setup_call_data_472, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.7.3",
+				&setup_call_data_473, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.8.1",
+				&setup_call_data_481, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.8.2",
+				&setup_call_data_482, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.8.3",
+				&setup_call_data_483, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.9.1",
+				&setup_call_data_491, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.9.2",
+				&setup_call_data_492, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.9.3",
+				&setup_call_data_493, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.10.1",
+				&setup_call_data_4101, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 4.10.2",
+				&setup_call_data_4102, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 5.1.1",
+				&setup_call_data_511, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 5.2.1",
+				&setup_call_data_521, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 6.1.1",
+				&setup_call_data_611, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 6.2.1",
+				&setup_call_data_621, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 7.1.1",
+				&setup_call_data_711, test_setup_call);
+	g_test_add_data_func("/teststk/Setup Call 7.2.1",
+				&setup_call_data_721, test_setup_call);
+
 	return g_test_run();
 }
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: [PATCH 11/19] stkutil: Add setup menu proactive command parser
  2010-05-10 10:38 ` [PATCH 11/19] stkutil: Add setup menu proactive command parser Yang Gu
@ 2010-05-11 19:21   ` Denis Kenzior
  2010-05-12  8:53     ` Gu, Yang
  0 siblings, 1 reply; 34+ messages in thread
From: Denis Kenzior @ 2010-05-11 19:21 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

> @@ -281,8 +281,9 @@ static gboolean parse_dataobj_alpha_id(struct
>  comprehension_tlv_iter *iter, char *utf8;
> 
>  	len = comprehension_tlv_iter_get_length(iter);
> -	if (len < 1)
> -		return FALSE;
> +
> +	if (len == 0)
> +		return TRUE;
> 
>  	data = comprehension_tlv_iter_get_data(iter);
>  	utf8 = sim_string_to_utf8(data, len);

There is no mention that the Alpha identifier can be present and empty, so 
returning TRUE on a len 0 is not actually correct.  The only exception so far 
seems to be text string which explicitly allows NULL strings.

> @@ -373,8 +374,10 @@ static gboolean parse_dataobj_item(struct
>  comprehension_tlv_iter *iter, char *utf8;
> 
>  	len = comprehension_tlv_iter_get_length(iter);
> -	if (len < 2)
> -		return FALSE;
> +
> +	if (len == 0)
> +		return TRUE;
> +
> 

Same with this one...

>  	data = comprehension_tlv_iter_get_data(iter);
> 
> @@ -2006,6 +2009,7 @@ static gboolean parse_dataobj(struct
>  comprehension_tlv_iter *iter, GSList *l;
>  	va_list args;
>  	gboolean minimum_set = TRUE;
> +	GSList **list = NULL;
> 
>  	va_start(args, type);
> 
> @@ -2022,29 +2026,74 @@ static gboolean parse_dataobj(struct
>  comprehension_tlv_iter *iter, entries = g_slist_prepend(entries, entry);
>  	}
> 
> -
>  	if (comprehension_tlv_iter_next(iter) != TRUE)
>  		goto out;
> 
>  	entries = g_slist_reverse(entries);
> 
> -	for (l = entries; l; l = l->next) {
> +	for (l = entries; l;) {
>  		dataobj_handler handler;
>  		struct dataobj_handler_entry *entry = l->data;
> +		unsigned short tag;
> +		gboolean ret;
> +		void *dataobj;
> 
>  		handler = handler_for_type(entry->type);
> -		if (handler == NULL)
> +		if (handler == NULL) {
> +			l = l->next;
>  			continue;
> +		}
> 
> -		if (comprehension_tlv_iter_get_tag(iter) == entry->type) {
> -			if (handler(iter, entry->data))
> -				entry->parsed = TRUE;
> -			if (comprehension_tlv_iter_next(iter) == FALSE)
> -				break;
> +		tag = comprehension_tlv_iter_get_tag(iter);
> +		if (tag != entry->type) {
> +			l = l->next;
> +			continue;
>  		}
> +
> +		if (tag == STK_DATA_OBJECT_TYPE_PROVISIONING_FILE_REFERENCE ||
> +			tag == STK_DATA_OBJECT_TYPE_ITEM) {
> +
> +			if (tag == STK_DATA_OBJECT_TYPE_ITEM)
> +				dataobj = g_try_new0(struct stk_item, 1);
> +			else
> +				dataobj = g_try_new0(struct stk_file, 1);
> +
> +			if (!dataobj)
> +				goto out;
> +
> +			if (!list)
> +				list = entry->data;
> +
> +			ret = handler(iter, dataobj);
> +		} else
> +			ret = handler(iter, entry->data);
> +
> +		if (ret)
> +			entry->parsed = TRUE;
> +
> +		if (tag == STK_DATA_OBJECT_TYPE_PROVISIONING_FILE_REFERENCE ||
> +			tag == STK_DATA_OBJECT_TYPE_ITEM) {
> +
> +			if (tag == STK_DATA_OBJECT_TYPE_ITEM) {
> +				struct stk_item *item = dataobj;
> +				/* either return is FALSE or item is empty */
> +				if (item->id == 0)
> +					g_free(item);
> +				else
> +					*list = g_slist_prepend(*list, item);
> +			} else
> +				*list = g_slist_prepend(*list, dataobj);
> +		} else
> +			l = l->next;
> +
> +		if (comprehension_tlv_iter_next(iter) == FALSE)
> +			break;
>  	}
> 

I really don't like this.  I understand why you're doing it this way, but lets 
try to make this more elegant.  Either add another FLAG saying that the items 
are actually in a list, or parse the item list separately.

e.g. 

parse_dataobj(iter, STK_DATA_OBJECT_TYPE_ALPHA_ID,
			DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM,
			&obj->alpha_id,
			STK_DATA_OBJECT_TYPE_ITEM,
			DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM | DATAOBJ_FLAG_LIST,
			&obj->items, ...

or

/* Parse only until item list */
parse_dataobj(iter, STK_DATA_OBJECT_TYPE_ALPHA_ID,
			DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM,
			&obj->alpha_id,
			STK_DATA_OBJECT_TYPE_ITEM,
			STK_DATA_OBJECT_TYPE_INVALID);

/* Manually parse item list */
...

/* Parse rest */
...

Regards,
-Denis

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 09/19] stkutil: Add poll interval proactive command parser
  2010-05-10 10:38 ` [PATCH 09/19] stkutil: Add poll interval proactive command parser Yang Gu
@ 2010-05-11 19:23   ` Denis Kenzior
  2010-05-12  9:03     ` Gu, Yang
  0 siblings, 1 reply; 34+ messages in thread
From: Denis Kenzior @ 2010-05-11 19:23 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

>  	union {
> +		struct stk_duration duration;
>  		struct stk_command_display_text display_text;
>  		struct stk_command_get_inkey get_inkey;
>  		struct stk_command_get_input get_input;
>

For symmetry / consistency with other commands, can we please make a struct 
stk_command_poll_interval with only duration as a member?

Regards,
-Denis 

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/19] stkutil: Free default text for get input parser
  2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
                   ` (17 preceding siblings ...)
  2010-05-10 10:39 ` [PATCH 19/19] test-stkutil: Add unit test for setup call parser Yang Gu
@ 2010-05-11 19:24 ` Denis Kenzior
  18 siblings, 0 replies; 34+ messages in thread
From: Denis Kenzior @ 2010-05-11 19:24 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

> ---
>  src/stkutil.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 

Patch has been applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 02/19] test-stkutil: Add unit test for get input parser
  2010-05-10 10:38 ` [PATCH 02/19] test-stkutil: Add unit test " Yang Gu
@ 2010-05-11 19:25   ` Denis Kenzior
  0 siblings, 0 replies; 34+ messages in thread
From: Denis Kenzior @ 2010-05-11 19:25 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

> ---
>  unit/test-stkutil.c | 1412
>  ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 
1392
>  insertions(+), 20 deletions(-)
> 

Patch has been applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 03/19] stk: Unify variable names to use abbreviation
  2010-05-10 10:38 ` [PATCH 03/19] stk: Unify variable names to use abbreviation Yang Gu
@ 2010-05-11 19:25   ` Denis Kenzior
  0 siblings, 0 replies; 34+ messages in thread
From: Denis Kenzior @ 2010-05-11 19:25 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

> ---
>  src/stkutil.c       |    8 +-
>  src/stkutil.h       |    8 +-
>  unit/test-stkutil.c |  161
>  +++++++++++++++++++++++++-------------------------- 3 files changed, 88
>  insertions(+), 89 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 04/19] test-stkutil: Use enum for icon_id
  2010-05-10 10:38 ` [PATCH 04/19] test-stkutil: Use enum for icon_id Yang Gu
@ 2010-05-11 19:25   ` Denis Kenzior
  0 siblings, 0 replies; 34+ messages in thread
From: Denis Kenzior @ 2010-05-11 19:25 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

> ---
>  unit/test-stkutil.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis 

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 05/19] stkutil: Add play tone proactive command parser
  2010-05-10 10:38 ` [PATCH 05/19] stkutil: Add play tone proactive command parser Yang Gu
@ 2010-05-11 19:26   ` Denis Kenzior
  0 siblings, 0 replies; 34+ messages in thread
From: Denis Kenzior @ 2010-05-11 19:26 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

> ---
>  src/stkutil.c |   42 ++++++++++++++++++++++++++++++++++++++++++
>  src/stkutil.h |   10 ++++++++++
>  2 files changed, 52 insertions(+), 0 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis 

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 06/19] Replace check_text with check_common_text
  2010-05-10 10:38 ` [PATCH 06/19] Replace check_text with check_common_text Yang Gu
@ 2010-05-11 19:26   ` Denis Kenzior
  0 siblings, 0 replies; 34+ messages in thread
From: Denis Kenzior @ 2010-05-11 19:26 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

> ---
>  unit/test-stkutil.c |   31 +++++++++++++++----------------
>  1 files changed, 15 insertions(+), 16 deletions(-)
> 

Patch has been applied, thanks.

Regards,
-Denis 

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 07/19] stkutil: Refactor parser for tone objects
  2010-05-10 10:38 ` [PATCH 07/19] stkutil: Refactor parser for tone objects Yang Gu
@ 2010-05-11 19:26   ` Denis Kenzior
  0 siblings, 0 replies; 34+ messages in thread
From: Denis Kenzior @ 2010-05-11 19:26 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

> ---
>  src/stkutil.c |   13 ++-----------
>  1 files changed, 2 insertions(+), 11 deletions(-)
> 

Patch has been applied, thanks.

Regards,
-Denis 

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 08/19] test-stkutil: Add unit test for play tone parser
  2010-05-10 10:38 ` [PATCH 08/19] test-stkutil: Add unit test for play tone parser Yang Gu
@ 2010-05-11 19:27   ` Denis Kenzior
  0 siblings, 0 replies; 34+ messages in thread
From: Denis Kenzior @ 2010-05-11 19:27 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

> ---
>  unit/test-stkutil.c | 1356
>  +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 
1356
>  insertions(+), 0 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 16/19] stkutil: Parse cdma tpdu in send sms parser
  2010-05-10 10:38 ` [PATCH 16/19] stkutil: Parse cdma tpdu in send sms parser Yang Gu
@ 2010-05-11 19:38   ` Denis Kenzior
  0 siblings, 0 replies; 34+ messages in thread
From: Denis Kenzior @ 2010-05-11 19:38 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

> ---
>  src/stkutil.c |   16 ++++++++++++----
>  src/stkutil.h |    1 +
>  2 files changed, 13 insertions(+), 4 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 34+ messages in thread

* RE: [PATCH 11/19] stkutil: Add setup menu proactive command parser
  2010-05-11 19:21   ` Denis Kenzior
@ 2010-05-12  8:53     ` Gu, Yang
  2010-05-12 14:43       ` Denis Kenzior
  0 siblings, 1 reply; 34+ messages in thread
From: Gu, Yang @ 2010-05-12  8:53 UTC (permalink / raw)
  To: ofono

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

Hi Denis,


>> @@ -281,8 +281,9 @@ static gboolean parse_dataobj_alpha_id(struct
>>  comprehension_tlv_iter *iter, char *utf8;
>>
>>  	len = comprehension_tlv_iter_get_length(iter);
>> -	if (len < 1)
>> -		return FALSE;
>> +
>> +	if (len == 0)
>> +		return TRUE;
>>
>>  	data = comprehension_tlv_iter_get_data(iter);
>>  	utf8 = sim_string_to_utf8(data, len);
>
>There is no mention that the Alpha identifier can be present and empty, so
>returning TRUE on a len 0 is not actually correct.  The only exception so far
>seems to be text string which explicitly allows NULL strings.

Thus alpha_id seems to be another exception. For ber-tlv setup menu, alpha identifier is mandatory, so sometimes we have to create an empty alpha id object with len equals 0. See the case "set up menu 1.1.3" in 102.384 (page 333) for an example.

>
>> @@ -373,8 +374,10 @@ static gboolean parse_dataobj_item(struct
>>  comprehension_tlv_iter *iter, char *utf8;
>>
>>  	len = comprehension_tlv_iter_get_length(iter);
>> -	if (len < 2)
>> -		return FALSE;
>> +
>> +	if (len == 0)
>> +		return TRUE;
>> +
>>
>
>Same with this one...

This one is another exception. See the same case as above. I plan to check all the mandatory dataobj and let len might equal to 0, how do you think of?

>> +
>> +		if (tag == STK_DATA_OBJECT_TYPE_PROVISIONING_FILE_REFERENCE
>||
>> +			tag == STK_DATA_OBJECT_TYPE_ITEM) {
>> +
>> +			if (tag == STK_DATA_OBJECT_TYPE_ITEM) {
>> +				struct stk_item *item = dataobj;
>> +				/* either return is FALSE or item is empty */
>> +				if (item->id == 0)
>> +					g_free(item);
>> +				else
>> +					*list = g_slist_prepend(*list, item);
>> +			} else
>> +				*list = g_slist_prepend(*list, dataobj);
>> +		} else
>> +			l = l->next;
>> +
>> +		if (comprehension_tlv_iter_next(iter) == FALSE)
>> +			break;
>>  	}
>>
>
>I really don't like this.  I understand why you're doing it this way, but lets
>try to make this more elegant.  Either add another FLAG saying that the items
>are actually in a list, or parse the item list separately.
>
>e.g.
>
>parse_dataobj(iter, STK_DATA_OBJECT_TYPE_ALPHA_ID,
>			DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM,
>			&obj->alpha_id,
>			STK_DATA_OBJECT_TYPE_ITEM,
>			DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM |
>DATAOBJ_FLAG_LIST,
>			&obj->items, ...
>
>or
>
>/* Parse only until item list */
>parse_dataobj(iter, STK_DATA_OBJECT_TYPE_ALPHA_ID,
>			DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM,
>			&obj->alpha_id,
>			STK_DATA_OBJECT_TYPE_ITEM,
>			STK_DATA_OBJECT_TYPE_INVALID);
>
>/* Manually parse item list */
>...
>
>/* Parse rest */
>...
>

The second approach is hard to be implemented: We have moved comprehension_tlv_iter_next() to parse_dataobj(), when manually parsing item list, I have to get the next one to see if it's an item object. Then we have to rollback one if the next is not an item dataobj. 
I like the first approach (Actually it's similar to my solution ;)) and will send patch based on this. 



Regards,
-Yang

^ permalink raw reply	[flat|nested] 34+ messages in thread

* RE: [PATCH 09/19] stkutil: Add poll interval proactive command parser
  2010-05-11 19:23   ` Denis Kenzior
@ 2010-05-12  9:03     ` Gu, Yang
  2010-05-12 14:21       ` Denis Kenzior
  0 siblings, 1 reply; 34+ messages in thread
From: Gu, Yang @ 2010-05-12  9:03 UTC (permalink / raw)
  To: ofono

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

Hi Denis,


>-----Original Message-----
>From: Denis Kenzior [mailto:denkenz(a)gmail.com]
>Sent: Wednesday, May 12, 2010 3:23 AM
>To: ofono(a)ofono.org
>Cc: Gu, Yang
>Subject: Re: [PATCH 09/19] stkutil: Add poll interval proactive command parser
>
>Hi Yang,
>
>>  	union {
>> +		struct stk_duration duration;
>>  		struct stk_command_display_text display_text;
>>  		struct stk_command_get_inkey get_inkey;
>>  		struct stk_command_get_input get_input;
>>
>
>For symmetry / consistency with other commands, can we please make a struct
>stk_command_poll_interval with only duration as a member?

I agree with you to wrap duratioin in a struct. Personally, I'd also like to wrap all the fields of command details in stk_command into a struct, and fields of device identities into another struct. This will make stk_command_new_from_pdu() and unit tests more consistent and symmetric. 



Regards,
-Yang

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 09/19] stkutil: Add poll interval proactive command parser
  2010-05-12  9:03     ` Gu, Yang
@ 2010-05-12 14:21       ` Denis Kenzior
  0 siblings, 0 replies; 34+ messages in thread
From: Denis Kenzior @ 2010-05-12 14:21 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

> I agree with you to wrap duratioin in a struct. Personally, I'd also like
>  to wrap all the fields of command details in stk_command into a struct,
>  and fields of device identities into another struct. This will make
>  stk_command_new_from_pdu() and unit tests more consistent and symmetric.
> 

I'm actually fine with that.  Try seeing how it looks like.  If you think it 
looks better send a patch for review.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 11/19] stkutil: Add setup menu proactive command parser
  2010-05-12  8:53     ` Gu, Yang
@ 2010-05-12 14:43       ` Denis Kenzior
  0 siblings, 0 replies; 34+ messages in thread
From: Denis Kenzior @ 2010-05-12 14:43 UTC (permalink / raw)
  To: ofono

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

Hi Yang,

> >There is no mention that the Alpha identifier can be present and empty, so
> >returning TRUE on a len 0 is not actually correct.  The only exception so
> > far seems to be text string which explicitly allows NULL strings.
> 
> Thus alpha_id seems to be another exception. For ber-tlv setup menu, alpha
>  identifier is mandatory, so sometimes we have to create an empty alpha id
>  object with len equals 0. See the case "set up menu 1.1.3" in 102.384
>  (page 333) for an example.

Ok fair enough. 

> This one is another exception. See the same case as above. I plan to check
>  all the mandatory dataobj and let len might equal to 0, how do you think
>  of?

My feeling right now is that if the test spec doesn't agree with the main spec 
then let us accommodate the test spec in those circumstances only.

> >/* Parse only until item list */
> >parse_dataobj(iter, STK_DATA_OBJECT_TYPE_ALPHA_ID,
> >			DATAOBJ_FLAG_MANDATORY | DATAOBJ_FLAG_MINIMUM,
> >			&obj->alpha_id,
> >			STK_DATA_OBJECT_TYPE_ITEM,
> >			STK_DATA_OBJECT_TYPE_INVALID);
> >
> >/* Manually parse item list */
> >...
> >
> >/* Parse rest */
> >...
> 
> The second approach is hard to be implemented: We have moved
>  comprehension_tlv_iter_next() to parse_dataobj(), when manually parsing
>  item list, I have to get the next one to see if it's an item object. Then
>  we have to rollback one if the next is not an item dataobj. I like the
>  first approach (Actually it's similar to my solution ;)) and will send
>  patch based on this.
> 

You can always introduce comprehension_tlv_iter_save / restore type 
functionality if it makes things easier.  This is only applicable to two 
structures, so the first approach might be overkill.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2010-05-12 14:43 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-10 10:38 [PATCH 01/19] stkutil: Free default text for get input parser Yang Gu
2010-05-10 10:38 ` [PATCH 02/19] test-stkutil: Add unit test " Yang Gu
2010-05-11 19:25   ` Denis Kenzior
2010-05-10 10:38 ` [PATCH 03/19] stk: Unify variable names to use abbreviation Yang Gu
2010-05-11 19:25   ` Denis Kenzior
2010-05-10 10:38 ` [PATCH 04/19] test-stkutil: Use enum for icon_id Yang Gu
2010-05-11 19:25   ` Denis Kenzior
2010-05-10 10:38 ` [PATCH 05/19] stkutil: Add play tone proactive command parser Yang Gu
2010-05-11 19:26   ` Denis Kenzior
2010-05-10 10:38 ` [PATCH 06/19] Replace check_text with check_common_text Yang Gu
2010-05-11 19:26   ` Denis Kenzior
2010-05-10 10:38 ` [PATCH 07/19] stkutil: Refactor parser for tone objects Yang Gu
2010-05-11 19:26   ` Denis Kenzior
2010-05-10 10:38 ` [PATCH 08/19] test-stkutil: Add unit test for play tone parser Yang Gu
2010-05-11 19:27   ` Denis Kenzior
2010-05-10 10:38 ` [PATCH 09/19] stkutil: Add poll interval proactive command parser Yang Gu
2010-05-11 19:23   ` Denis Kenzior
2010-05-12  9:03     ` Gu, Yang
2010-05-12 14:21       ` Denis Kenzior
2010-05-10 10:38 ` [PATCH 10/19] test-stkutil: Add unit test for poll interval parser Yang Gu
2010-05-10 10:38 ` [PATCH 11/19] stkutil: Add setup menu proactive command parser Yang Gu
2010-05-11 19:21   ` Denis Kenzior
2010-05-12  8:53     ` Gu, Yang
2010-05-12 14:43       ` Denis Kenzior
2010-05-10 10:38 ` [PATCH 12/19] test-stkutil: Add unit test for setup menu parser Yang Gu
2010-05-10 10:38 ` [PATCH 13/19] stkutil: Add select item proactive command parser Yang Gu
2010-05-10 10:38 ` [PATCH 14/19] test-stkutil: Add unit test for select item parser Yang Gu
2010-05-10 10:38 ` [PATCH 15/19] test-stkutil: Use dedicated functions to check Yang Gu
2010-05-10 10:38 ` [PATCH 16/19] stkutil: Parse cdma tpdu in send sms parser Yang Gu
2010-05-11 19:38   ` Denis Kenzior
2010-05-10 10:39 ` [PATCH 17/19] test-stkutil: Refactor test for " Yang Gu
2010-05-10 10:39 ` [PATCH 18/19] stkutil: Add setup call proactive command parser Yang Gu
2010-05-10 10:39 ` [PATCH 19/19] test-stkutil: Add unit test for setup call parser Yang Gu
2010-05-11 19:24 ` [PATCH 01/19] stkutil: Free default text for get input parser Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.