优化demo代码和api接口
Change-Id: I094570a31d63204aaa5da809751e27acd60f60d8
diff --git a/mbtk/liblynq_lib/src/lynq_network.c b/mbtk/liblynq_lib/src/lynq_network.c
index 6ea8325..98bf359 100755
--- a/mbtk/liblynq_lib/src/lynq_network.c
+++ b/mbtk/liblynq_lib/src/lynq_network.c
@@ -1,6 +1,7 @@
#include "lynq_qser_network.h"
#include "mbtk_type.h"
#include "mbtk_info_api.h"
+#include "mbtk_log.h"
#include <stdio.h>
#include <stdlib.h>
@@ -795,4 +796,67 @@
return 0;
}
+int qser_nw_set_ims_enable(nw_client_handle_type h_nw, E_QSER_NW_IMS_MODE_TYPE_T ims_mode)
+{
+ int ret = 0;
+
+ if (h_nw != g_nw_val || g_nw_val == -1)
+ {
+ LOGE("handle NULL");
+ return -1;
+ }
+
+ if(lynq_nw_info_handle == NULL)
+ {
+ LOGE("lynq_nw_info_handle == NULL.");
+ return -1;
+ }
+
+ ret = mbtk_net_ims_set(lynq_nw_info_handle, ims_mode);
+ if (ret != 0)
+ {
+ LOGE("mbtk_net_ims_set fail.");
+ return -1;
+ }
+
+ return 0;
+}
+
+int qser_nw_get_ims_reg_status(nw_client_handle_type h_nw, QSER_NW_IMS_REG_STATUS_INFO_T *pt_info)
+{
+ int ret = 0;
+ int tmp_pt;
+
+ if (h_nw != g_nw_val || g_nw_val == -1)
+ {
+ LOGE("handle NULL");
+ return -1;
+ }
+
+ if(lynq_nw_info_handle == NULL)
+ {
+ LOGE("lynq_nw_info_handle == NULL.");
+ return -1;
+ }
+
+ ret = mbtk_net_ims_get(lynq_nw_info_handle, &tmp_pt);
+ if (ret != 0)
+ {
+ LOGE("mbtk_net_ims_get fail.");
+ return -1;
+ }
+
+ if (tmp_pt == 0)
+ pt_info->registration_state = E_QSER_NW_IMS_SERVICE_NONE;
+ else if (tmp_pt == 1)
+ pt_info->registration_state = E_QSER_NW_IMS_SERVICE_REGISTERED;
+ else
+ {
+ LOGE("mbtk_net_ims_get value error fail.");
+ return -1;
+ }
+
+ return 0;
+}
+
diff --git a/mbtk/liblynq_lib/src/lynq_sms.c b/mbtk/liblynq_lib/src/lynq_sms.c
index 955e4d9..519d21a 100755
--- a/mbtk/liblynq_lib/src/lynq_sms.c
+++ b/mbtk/liblynq_lib/src/lynq_sms.c
@@ -3,6 +3,7 @@
#include "mbtk_pdu_sms.h"
#include "mbtk_info_api.h"
#include "lynq_sms.h"
+#include "mbtk_log.h"
#include <stdio.h>
diff --git a/mbtk/liblynq_lib/src/lynq_voice_call.c b/mbtk/liblynq_lib/src/lynq_voice_call.c
index 4125130..ad83d22 100755
--- a/mbtk/liblynq_lib/src/lynq_voice_call.c
+++ b/mbtk/liblynq_lib/src/lynq_voice_call.c
Binary files differ