优化LYNQ_CALL添加音量控制和优化LYNQ_SMS添加存储器位置的判断上库LYNQ_NW接口以及添加对应测试demo
Change-Id: Ic19a55f139d6fbf194dffc7ec878a51d1abf656c
diff --git a/mbtk/lynq_lib/src/lynq_sms.c b/mbtk/lynq_lib/src/lynq_sms.c
index 1d28ce9..bde4083 100755
--- a/mbtk/lynq_lib/src/lynq_sms.c
+++ b/mbtk/lynq_lib/src/lynq_sms.c
@@ -160,6 +160,7 @@
char resp[RES_NUM_MIN] = {0};
char pdu_data[512] = {0};
char phone_lenth[10] = {0};
+ char mem[10] = {0};
char *p = pdu_data;
int mode = 0;
int err = 0;
@@ -178,6 +179,29 @@
else
return -1;
+ //设置存储器
+
+ if (pt_sms_info->storage == 0)
+ {
+ strncpy(mem, "SM", 2);
+ }
+ else if (pt_sms_info->storage == 1)
+ {
+ strncpy(mem, "ME", 2);
+ }
+ else
+ {
+ printf("qser_sms_deletefromstorage storage is no Support \n");
+ }
+
+ memset(resp, 0, sizeof(resp));
+ err = mbtk_sms_cpms_set(sms_info_handle, mem, resp);
+ if(err) {
+ printf("Error : %d\n", err);
+ } else {
+ printf("cpms set success. resp:%s\n", resp);
+ }
+
if(data == NULL)
{
printf("qser_sms_send_sms data NULL\n");
@@ -332,6 +356,9 @@
char cmgd[128] = {0};
int err = 0;
int id_x = -1;
+ int t_storage = 0;
+ char mem[10] = {0};
+ char resp[RES_NUM_MIN] = {0};
if (h_sms != g_sms_val || g_sms_val == -1)
{
@@ -352,6 +379,29 @@
return -1;
}
+ t_storage = pt_sms_storage->storage; //设置存储器
+
+ if (t_storage == 0)
+ {
+ strncpy(mem, "SM", 2);
+ }
+ else if (t_storage == 1)
+ {
+ strncpy(mem, "ME", 2);
+ }
+ else
+ {
+ printf("qser_sms_deletefromstorage storage is no Support \n");
+ }
+
+ memset(resp, 0, sizeof(resp));
+ err = mbtk_sms_cpms_set(sms_info_handle, mem, resp);
+ if(err) {
+ printf("Error : %d\n", err);
+ } else {
+ printf("cpms set success. resp:%s\n", resp);
+ }
+
id_x = pt_sms_storage->storage_idx;//获取idx的值
if(id_x == -1) //delete all