diff options
author | Yang Gu <yang.gu@intel.com> | 2010-06-17 18:35:11 +0800 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-06-18 13:57:55 -0500 |
commit | 6018d1fe8275aa9d37f6b6ceb8b89cf0964a8480 (patch) | |
tree | 6f8c033640de2843f35400ef0a4c8d65bca7c985 /src/stkutil.h | |
parent | 042724c5abb0b8750d0d48d192ed4f0c7ad6b247 (diff) | |
download | ofono-6018d1fe8275aa9d37f6b6ceb8b89cf0964a8480.tar.bz2 |
stk: Add parser for timing advance objects
Diffstat (limited to 'src/stkutil.h')
-rw-r--r-- | src/stkutil.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/stkutil.h b/src/stkutil.h index 6fb49e07..c2fcea7b 100644 --- a/src/stkutil.h +++ b/src/stkutil.h @@ -552,6 +552,11 @@ enum stk_rejection_cause_code { STK_CAUSE_EMM_PROTOCOL_ERROR = 0x6f, }; +enum stk_me_status { + STK_ME_STATUS_IDLE = 0x00, + STK_ME_STATUS_NOT_IDLE = 0x01 +}; + /* For data object that only has a byte array with undetermined length */ struct stk_common_byte_array { unsigned char *array; @@ -801,6 +806,18 @@ struct stk_bc_repeat { unsigned char value; }; +/* Defined in TS 31.111 Section 8.46 */ +struct stk_timing_advance { + ofono_bool_t has_value; + enum stk_me_status status; + /* + * Contains bit periods number according to 3GPP TS + * 44.118 Section 9.3.106 / 3GPP TS 44.018 Section + * 10.5.2.40.1, not microseconds + */ + unsigned char advance; +}; + /* * According to 102.223 Section 8.52 the length of CTLV is 1 byte. This means * that the maximum size is 127 according to the rules of CTLVs. This size also @@ -1381,18 +1398,7 @@ struct stk_response_local_info { const char *language; enum stk_battery_state battery_charge; enum stk_access_technology_type access_technology; - struct stk_timing_advance { - enum { - STK_TIMING_ADVANCE_ME_IDLE = 0x00, - STK_TIMING_ADVANCE_ME_NOT_IDLE = 0x01, - } status; - /* - * Contains bit periods number according to 3GPP TS - * 44.118 Section 9.3.106 / 3GPP TS 44.018 Section - * 10.5.2.40.1, not microseconds - */ - int advance; - } tadv; + struct stk_timing_advance tadv; /* Bits[31:24]: manufacturer, bits[23:0]: serial number */ guint32 esn; const char *imeisv; |