diff options
author | Yang Gu <yang.gu@intel.com> | 2010-05-13 18:48:40 +0800 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-05-13 15:32:18 -0500 |
commit | d6e1718a82fc2e1cc9371c8f0490adedca65e64b (patch) | |
tree | 142f50f54a7113c581048eca93785436200800dc /src/stkutil.c | |
parent | ee12e0fd50b39ca86b38c06dd3bec361308b1ab6 (diff) | |
download | ofono-d6e1718a82fc2e1cc9371c8f0490adedca65e64b.tar.bz2 |
stkutil: Add power on card command parser
Diffstat (limited to 'src/stkutil.c')
-rw-r--r-- | src/stkutil.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/stkutil.c b/src/stkutil.c index 768dd38d..432bc570 100644 --- a/src/stkutil.c +++ b/src/stkutil.c @@ -2648,6 +2648,19 @@ static gboolean parse_power_off_card(struct stk_command *command, return TRUE; } +static gboolean parse_power_on_card(struct stk_command *command, + struct comprehension_tlv_iter *iter) +{ + if (command->src != STK_DEVICE_IDENTITY_TYPE_UICC) + return FALSE; + + if ((command->dst < STK_DEVICE_IDENTITY_TYPE_CARD_READER_0) || + (command->dst > STK_DEVICE_IDENTITY_TYPE_CARD_READER_7)) + return FALSE; + + return TRUE; +} + struct stk_command *stk_command_new_from_pdu(const unsigned char *pdu, unsigned int len) { @@ -2754,6 +2767,9 @@ struct stk_command *stk_command_new_from_pdu(const unsigned char *pdu, case STK_COMMAND_TYPE_POWER_OFF_CARD: ok = parse_power_off_card(command, &iter); break; + case STK_COMMAND_TYPE_POWER_ON_CARD: + ok = parse_power_on_card(command, &iter); + break; default: ok = FALSE; break; |