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

diff --git a/src/stkutil.c b/src/stkutil.c
index a3c5f47..832d2f8 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -1550,6 +1550,14 @@ static gboolean parse_dataobj_network_search_mode(
        return parse_dataobj_common_byte(iter, byte);
 }
 
+/* Defined in TS 102.223 Section 8.76 */
+static gboolean parse_dataobj_battery_state(struct comprehension_tlv_iter 
*iter,
+                                               void *user)
+{
+       unsigned char *byte = user;
+       return parse_dataobj_common_byte(iter, byte);
+}
+
 /* Defined in TS 102.223 Section 8.80 */
 static gboolean parse_dataobj_frame_id(struct comprehension_tlv_iter *iter,
                                        void *user)
@@ -1709,6 +1717,8 @@ static dataobj_handler handler_for_type(enum 
stk_data_object_type type)
                return parse_dataobj_imeisv;
        case STK_DATA_OBJECT_TYPE_NETWORK_SEARCH_MODE:
                return parse_dataobj_network_search_mode;
+       case STK_DATA_OBJECT_TYPE_BATTERY_STATE:
+               return parse_dataobj_battery_state;
        case STK_DATA_OBJECT_TYPE_FRAME_ID:
                return parse_dataobj_frame_id;
        default:
diff --git a/src/stkutil.h b/src/stkutil.h
index f9cf34b..6e822f8 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -357,6 +357,14 @@ enum stk_technology_id {
        STK_TECHNOLOGY_USB =            0x04
 };
 
+enum stk_battery_state {
+       STK_BATTERY_VERY_LOW =  0x00,
+       STK_BATTERY_LOW =       0x01,
+       STK_BATTERY_AVERAGE =   0x02,
+       STK_BATTERY_GOOD =      0x03,
+       STK_BATTERY_FULL =      0x04
+};
+
 /* For data object that only has a byte array with undetermined length */
 struct stk_common_byte_array {
        unsigned char *array;
-- 
1.7.0.4

_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to