[Bugfix][T106][task-view-794]add initial apn set/get interface
Only Configure: Yes
Affected branch: master
Affected module: data,network
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: Ib6df2f6cb0206deec6f634129b8f8ce532769fc5
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
index 179e549..094547f 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
@@ -65,6 +65,10 @@
static int apn_db_query(unsigned char profile_idx,qser_apn_info_s *apn);
static int apn_db_query_list_cb(void *data, int argc, char **argv, char **azColName);
static int apn_db_query_list(qser_apn_info_list_s *apn_list);
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int qser_set_initial_apnname(char *apnname);
+int qser_get_initial_apnname(char apnname[QSER_APN_NAME_SIZE]);
+#endif
void lynq_ipv4_aton_urc(lynq_data_call_response_v11_t *libdata,qser_data_call_state_s *data_res)
{
@@ -1679,6 +1683,42 @@
}
return ret;
}
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int qser_set_initial_apnname(char *apnname)
+{
+ int ret = -1;
+
+ if(g_lynq_qser_data_init_flag == 0)
+ {
+ return LYNQ_E_NO_INIT;
+ }
+
+ ret = lynq_init_attach_apn(apnname, "IP", "0", "null", "null");
+ return ret;
+}
+int qser_get_initial_apnname(char apnname[QSER_APN_NAME_SIZE])
+{
+ int ret = -1;
+ lynq_apn_list_response apnList = {-1, "", "", "", -1, -1, -1, -1, -1, -1};
+
+ if(g_lynq_qser_data_init_flag == 0)
+ {
+ return LYNQ_E_NO_INIT;
+ }
+
+ if(apnname == NULL)
+ {
+ LYERRLOG("[%s][%d] apnname is NULL",__FUNCTION__,__LINE__);
+ }
+ ret = lynq_get_apn_list(1, &apnList);
+ if(ret == 0)
+ {
+ memcpy(apnname, apnList.apn, sizeof(apnList.apn));
+ LYINFLOG("qser_get_initial_apnname: %s", apnname);
+ }
+ return ret;
+}
+#endif
int check_pdp_type(qser_apn_pdp_type_e pdp_type)
{
switch (pdp_type)