Atmodem Implementation 65/19665/1
authorAnga Santhosh <santhosh.a@samsung.com>
Wed, 16 Apr 2014 07:09:06 +0000 (12:39 +0530)
committerDongchul Lim <dc7.lim@samsung.com>
Thu, 17 Apr 2014 04:19:35 +0000 (13:19 +0900)
Change-Id: Id86b56e0cd532a275435b14b54ff70c53b5243d0

src/atmodem_sim.c

index 7e7dd2c38a6b88578cd022d5fa8e13db2d328526..3b313dcb0137beb7cdd31f98104dd4701b3a1c6c 100755 (executable)
@@ -156,6 +156,7 @@ static TelReturn atmodem_sim_get_imsi (CoreObject *co_sim, TcoreObjectResponseCa
 static TelReturn atmodem_sim_get_ecc (CoreObject *co_sim, TcoreObjectResponseCallback cb, void *cb_data);
 static TelReturn atmodem_sim_get_spdi (CoreObject *co_sim, TcoreObjectResponseCallback cb, void *cb_data);
 static TelReturn atmodem_sim_get_spn (CoreObject *co_sim, TcoreObjectResponseCallback cb, void *cb_data);
+static TelReturn atmodem_sim_get_language (CoreObject *co_sim, TcoreObjectResponseCallback cb, void *cb_data);
 static TelReturn atmodem_sim_verify_pins(CoreObject *co, const TelSimSecPinPw *request,
                TcoreObjectResponseCallback cb, void *cb_data);
 static TelReturn atmodem_sim_verify_puks(CoreObject *co, const TelSimSecPukPw *request,
@@ -1859,7 +1860,8 @@ static void __atmodem_sim_get_file_data(CoreObject *co_sim,
        p3 = (unsigned char) file_meta->data_size;
 
        if (file_meta->file_id == TEL_SIM_EF_IMSI
-               || file_meta->file_id == TEL_SIM_EF_SPN)
+               || file_meta->file_id == TEL_SIM_EF_SPN
+               || file_meta->file_id == TEL_SIM_EF_LP)
                at_cmd = g_strdup_printf("AT+CRSM=%d, %d ",
                                        ATMODEM_SIM_ACCESS_READ_BINARY, file_meta->file_id);
        else
@@ -3923,6 +3925,24 @@ static TelReturn atmodem_sim_get_spn (CoreObject *co,
        return __atmodem_sim_get_file_info(co, resp_cb_data);
 }
 
+static TelReturn atmodem_sim_get_language (CoreObject *co,
+       TcoreObjectResponseCallback cb, void *cb_data)
+{
+       AtmodemSimMetaInfo file_meta = {0, };
+       AtmodemRespCbData *resp_cb_data = NULL;
+
+       dbg("Entry");
+
+       file_meta.file_id = TEL_SIM_EF_LP;
+       file_meta.file_result = TEL_SIM_RESULT_FAILURE;
+       file_meta.req_command = TCORE_COMMAND_SIM_GET_LANGUAGE;
+
+       resp_cb_data = atmodem_create_resp_cb_data(cb, cb_data,
+               &file_meta, sizeof(AtmodemSimMetaInfo));
+
+       return __atmodem_sim_get_file_info(co, resp_cb_data);
+}
+
 /*
  * Operation - verify_pins/verify_puks/change_pins
  *
@@ -4197,7 +4217,7 @@ static TcoreSimOps atmodem_sim_ops = {
        .get_imsi = atmodem_sim_get_imsi,
        .get_ecc = atmodem_sim_get_ecc,
        .get_iccid = NULL,
-       .get_language = NULL,
+       .get_language = atmodem_sim_get_language,
        .set_language = NULL,
        .get_callforwarding_info = NULL,
        .get_messagewaiting_info = NULL,