[Feature]add MT2731_MP2_MR2_SVN388 baseline version

Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/src/lynq/lib/liblynq-tele-ril/include/libtel/lib_tele.h b/src/lynq/lib/liblynq-tele-ril/include/libtel/lib_tele.h
new file mode 100644
index 0000000..9b31587
--- /dev/null
+++ b/src/lynq/lib/liblynq-tele-ril/include/libtel/lib_tele.h
@@ -0,0 +1,49 @@
+#ifndef _LIB_TEL_H_
+#define _LIB_TEL_H_
+#include <sys/types.h>
+#include <vendor-ril/telephony/ril.h>
+//#include <msgqril/lib_thread.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+typedef struct{
+    int32_t token;
+    int32_t request;
+    RIL_Errno e;
+}lynqBase;
+typedef enum {
+ SUCCESS = 0,
+ ERROR = 1,
+}RIL_Errcode;
+
+typedef struct
+{
+    void (*recive_new_sms_cb)(RIL_SOCKET_ID soc_id,char *num, char *smsc, char *msg, int charset);
+    void (*incoming_call_cb)(RIL_SOCKET_ID soc_id,int index, char *addr, RIL_CallState state, int toa);
+}user_cb;
+
+extern user_cb *s_Env;
+
+
+/*
+struct RIL_Cb {
+    void (*requestResponse)(int32_t token,RIL_Errcode e,char*response,int responselen);
+    void (*unsolicitedResponse)(char *response,int responselen);
+}*/
+
+//typedef void (*requestResponse)(int32_t token,RIL_Errcode e,char*response,int responselen);
+typedef void (*requestResponse)(int32_t token,RIL_Errcode e,char *response);
+typedef void (*unsolicitedResponse)(int unsolResponse,char *response,int responselen);
+//void lynqRegisterRequestResponse(requestResponse cb);
+void lynqRegisterUnsolicitedResponse(user_cb * cb);
+void registerOnUnsolicitedResponse(user_cb* cb);
+
+int getRequestData(char **data, int lenth);
+int lynq_waitToRcvCmd(char **data, int lenth);
+void lynq_ril_init();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_call.h b/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_call.h
new file mode 100644
index 0000000..9f4aca6
--- /dev/null
+++ b/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_call.h
@@ -0,0 +1,89 @@
+/* Copyright Statement:
+ *
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein
+ * is confidential and proprietary to MediaTek Inc. and/or its licensors.
+ * Without the prior written permission of MediaTek inc. and/or its licensors,
+ * any reproduction, modification, use or disclosure of MediaTek Software,
+ * and information contained herein, in whole or in part, shall be strictly prohibited.
+ */
+/* MediaTek Inc. (C) 2010. All rights reserved.
+ *
+ * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+ * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+ * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
+ * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
+ * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
+ * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
+ * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
+ * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
+ * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
+ * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
+ * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+ * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
+ * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
+ * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
+ * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
+ * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
+ *
+ * The following software/firmware and/or related documentation ("MediaTek Software")
+ * have been modified by MediaTek Inc. All revisions are subject to any receiver's
+ * applicable license agreements with MediaTek Inc.
+ */
+#ifndef LYNQ_CALL_H
+#define LYNQ_CALL_H 1
+#include "lib_tele.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define INDEX_IS_NUMBER( alpha_char )   \
+   ( ( (alpha_char >= '0') && (alpha_char <= '9') ) ? 1 : 0 )
+ typedef enum {
+     LYNQ_CALL_ACTIVE = 0,
+     LYNQ_CALL_HOLDING = 1,
+     LYNQ_CALL_DIALING = 2,    /* MO call only */
+     LYNQ_CALL_ALERTING = 3,   /* MO call only */
+     LYNQ_CALL_INCOMING = 4,   /* MT call only */
+     LYNQ_CALL_WAITING = 5       ,/* MT call only */
+     LYNQ_CALL_DACTIVE=6
+ } lynqCallState;
+
+ typedef struct
+{
+    lynqBase base;
+    int call_id;
+    lynqCallState call_state;
+    int toa;
+    char * addr;
+}lynqCallList;
+typedef struct
+{
+    lynqBase base;
+    RIL_LastCallFailCause cause_code;
+    char * vendor_cause;
+}lynqLastCallFailCause;
+int call_Info_Init();
+int lynq_call(const char *addr,lynqCallList *msg);
+int lynq_call_answer(lynqCallList* msg);
+int lynq_call_hang_up(const int callId,lynqBase *base);
+int lynq_reject_call(lynqBase *base);
+int lynq_set_auto_answercall(int mode,int *status);
+int lynq_get_mute_status(int *status);
+int lynq_set_mute_mic(const int enable,int *status);
+int lynq_set_DTMF(const char callnum,lynqBase *base);
+int lynq_set_DTMF_volume(const int volume);
+int lynq_do_multi_conference(lynqCallList *msg);
+int lynq_othercall_hold(const int callindex,lynqBase *base);
+int lynq_hangup_wating_for_call(lynqCallList *msg);
+int lynq_hangup_foreground_resume_background(lynqCallList *msg);
+int lynq_switch_hold_and_active_call(lynqCallList *msg);
+int lynq_get_last_call_fail_cause(lynqLastCallFailCause *msg);
+void lynq_incoming_call_cb(RIL_SOCKET_ID soc_id,int index, char *addr, RIL_CallState state, int toa);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_data.h b/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_data.h
new file mode 100644
index 0000000..9bfe0b7
--- /dev/null
+++ b/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_data.h
@@ -0,0 +1,114 @@
+/* Copyright Statement:
+ *
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein
+ * is confidential and proprietary to MediaTek Inc. and/or its licensors.
+ * Without the prior written permission of MediaTek inc. and/or its licensors,
+ * any reproduction, modification, use or disclosure of MediaTek Software,
+ * and information contained herein, in whole or in part, shall be strictly prohibited.
+ */
+/* MediaTek Inc. (C) 2010. All rights reserved.
+ *
+ * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+ * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+ * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
+ * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
+ * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
+ * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
+ * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
+ * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
+ * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
+ * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
+ * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+ * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
+ * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
+ * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
+ * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
+ * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
+ *
+ * The following software/firmware and/or related documentation ("MediaTek Software")
+ * have been modified by MediaTek Inc. All revisions are subject to any receiver's
+ * applicable license agreements with MediaTek Inc.
+ */
+#ifndef YLNQ_DATA_H
+#define YLNQ_DATA_H 1
+#include <vendor-ril/telephony/ril.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MAX_STRING_LEN 500 
+
+typedef struct{
+
+    char apn[MAX_STRING_LEN];
+
+    char apntype[MAX_STRING_LEN];
+    
+    char user[MAX_STRING_LEN];
+
+    char password[MAX_STRING_LEN];
+
+    char authtype[MAX_STRING_LEN];
+
+    char normalprotocol[MAX_STRING_LEN];
+
+    char roamingprotocol[MAX_STRING_LEN];
+ 
+}lynq_data_apn;
+
+typedef struct{
+    int status;//pdn connect status.
+    //int addr;//ccmnil addr.
+    int num;
+    RIL_Errno e;
+}dataCallMsg;
+typedef struct {
+    int             status;     /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
+    int             suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
+                                           back-off timer value RIL wants to override the one
+                                           pre-configured in FW.
+                                           The unit is miliseconds.
+                                           The value < 0 means no value is suggested.
+                                           The value 0 means retry should be done ASAP.
+                                           The value of INT_MAX(0x7fffffff) means no retry. */
+    int             cid;        /* Context ID, uniquely identifies this call */
+    int             active;     /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
+    char           type[10];       /* One of the PDP_type values in TS 27.007 section 10.1.1.
+                                   For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
+                                   PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
+                                   such as "IP" or "IPV6" */
+    char           ifname[100];     /* The network interface name */
+    char           addresses[512];  /* A space-delimited list of addresses with optional "/" prefix length,
+                                   e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
+                                   May not be empty, typically 1 IPv4 or 1 IPv6 or
+                                   one of each. If the prefix length is absent the addresses
+                                   are assumed to be point to point with IPv4 having a prefix
+                                   length of 32 and IPv6 128. */
+    char           dnses[1024];      /* A space-delimited list of DNS server addresses,
+                                   e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+                                   May be empty. */
+    char           gateways[1024];   /* A space-delimited list of default gateway addresses,
+                                   e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+                                   May be empty in which case the addresses represent point
+                                   to point connections. */
+    char           pcscf[100];    /* the Proxy Call State Control Function address
+                                 via PCO(Protocol Configuration Option) for IMS client. */
+    int             mtu;        /* MTU received from network
+                                   Value <= 0 means network has either not sent a value or
+                                   sent an invalid value */
+} LYNQ_Data_Call_Response_v11;
+
+int lynq_data_enable_data(int *PdnState) ; 
+int lynq_data_dectivate_data_call(int *PdnState);
+int lynq_get_data_call_list(LYNQ_Data_Call_Response_v11 **dataCallList,const int listNum,int *realNum);
+int lynq_set_apn();
+int lynq_get_apn();
+int lynq_enable_apn();
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_network.h b/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_network.h
new file mode 100644
index 0000000..2a42eee
--- /dev/null
+++ b/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_network.h
@@ -0,0 +1,120 @@
+/* Copyright Statement:
+ *
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein
+ * is confidential and proprietary to MediaTek Inc. and/or its licensors.
+ * Without the prior written permission of MediaTek inc. and/or its licensors,
+ * any reproduction, modification, use or disclosure of MediaTek Software,
+ * and information contained herein, in whole or in part, shall be strictly prohibited.
+ */
+/* MediaTek Inc. (C) 2010. All rights reserved.
+ *
+ * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+ * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+ * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
+ * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
+ * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
+ * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
+ * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
+ * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
+ * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
+ * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
+ * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+ * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
+ * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
+ * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
+ * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
+ * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
+ *
+ * The following software/firmware and/or related documentation ("MediaTek Software")
+ * have been modified by MediaTek Inc. All revisions are subject to any receiver's
+ * applicable license agreements with MediaTek Inc.
+ */
+ #include "lib_tele.h"
+#ifndef __LYNQ_NETWORK__
+#define __LYNQ_NETWORK__
+#ifdef __cplusplus
+extern "C" {
+#endif
+typedef struct{
+    lynqBase base;
+    char *OperatorFN;    //It is long alpha ONS or EONS
+    char *OperatorSH;    //It is short alpha ONS or EONS
+    char *MccMnc;        //It is 5 or 6 digit numeric code (MCC + MNC)
+}operatorInfo;
+typedef struct{
+    lynqBase base;
+    char *OperatorFN;
+    char *OperatorSH;
+    char *MccMnc;
+    char * NetStatus;   //a string value of the status: "unknown","available","current","forbidden"
+}availableNetwork;
+
+typedef struct{
+    lynqBase base;
+    int mode;
+}networkSelecttionMode;
+typedef struct{
+    lynqBase base;
+    int     regState;               //registration state
+    int     imsRegState;
+    char *  LAC;                    //location area code, it is LAC if registered or NULL id not
+    char *  CID;                    //cell identifier, if registered or NULL id not.
+    RIL_RadioTechnology netType;    //network type
+    RIL_RadioTechnologyFamily radioTechFam;//RIL_RadioTechnologyFamily
+}registrationStateInfo;
+
+typedef struct{
+    lynqBase base;
+    RIL_RadioTechnology radioTech;
+}radioTechnology;
+
+typedef struct{
+    lynqBase base;
+    int pnt; //preffered network type.
+}prefferredNetworkType;
+typedef struct{
+    lynqBase base;
+    char *cid;
+    int rssi;
+}neighboringCellIDs;
+typedef struct{
+    lynqBase base;
+    int bandmode[20];
+}availableBandMode;
+typedef struct{
+    lynqBase base;
+    RIL_CellInfo cellinfo;
+}cellInfoList;
+typedef struct{
+    lynqBase base;
+    RIL_SignalStrength_v10 signalStrength;
+}solicitedSignalStrength;
+int lynq_query_operater(operatorInfo * currentOperator);
+int lynq_query_network_selection_mode(networkSelecttionMode *netselMode);
+int lynq_set_network_selection_mode(const char *mode,const char* mccmnc,lynqBase * base);
+int lynq_query_available_network(availableNetwork *availNet);
+int lynq_query_registration_state(const char *type,registrationStateInfo *regStateInfo);
+int lynq_query_prefferred_networktype(prefferredNetworkType * preNetType);
+int lynq_set_prefferred_networktype(const int preffertype,lynqBase * base);
+int lynq_query_cell_info(cellInfoList * * cellinfo, int listNum, int * realNum);
+int lynq_set_unsol_cell_info_listrate(const int rate,lynqBase * base);
+int lynq_query_neighboring_cellids(neighboringCellIDs **neiCeIDs,const int listNum,int *realNum);
+int lynq_set_band_mode(const int bandmode,lynqBase *base);
+int lynq_query_available_bandmode(availableBandMode*availBanMode);
+int lynq_radio_on(const int data,lynqBase *base);
+int lynq_query_radio_tech(radioTechnology *radioTech);
+int lynq_solicited_signal_strength(solicitedSignalStrength *solSigStren);
+int lynq_modem_on(const int data,lynqBase *base);
+//int  lynq_enter_network_depersonalization(char *code);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
diff --git a/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_sim.h b/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_sim.h
new file mode 100644
index 0000000..e9889df
--- /dev/null
+++ b/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_sim.h
@@ -0,0 +1,42 @@
+/*============================================================================= 
+#     FileName: lynq_sim.cpp
+#     Desc: about SIMAPI
+#     Author: mobiletek 
+#     Version: V1.0
+#     LastChange: 2020-07-29 
+#     History: 
+# If you need to use any API under lynq_sim, you must first call the init_sim() function to initialize these functions.
+=============================================================================*/
+#ifndef __LYNQ_SIM__
+#define __LYNQ_SIM__
+#include <sys/types.h>
+#include "lib_tele.h"
+#define MAX_IMSI 20
+#ifdef __cplusplus
+extern "C" {
+#endif
+typedef struct
+{
+    lynqBase base;
+    RIL_CardState card_status;
+    RIL_AppType  card_type;
+    RIL_PinState pin_state;
+}simStatus;
+typedef struct
+{
+    lynqBase base;
+    char imsi[MAX_IMSI];
+    //char *imsi;
+}simImsi;
+int init_sim();
+int lynq_set_default_sim_all(int sim_id);
+int lynq_get_sim_status(simStatus *msg);
+int lynq_get_sim_status_ext(int sim_id );
+int lynq_get_imsi(simImsi * msg);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_sms.h b/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_sms.h
new file mode 100644
index 0000000..eef3412
--- /dev/null
+++ b/src/lynq/lib/liblynq-tele-ril/include/libtel/lynq_sms.h
@@ -0,0 +1,83 @@
+/*============================================================================= 
+#     FileName: lynq_sms.h
+#         Desc: about sms api
+#       Author: zhouqunchao 
+#      Version:  
+#   LastChange: 2020-07-29 
+#      History: 
+ 
+=============================================================================*/
+
+#ifndef YLNQ_SMS_H
+#define YLNQ_SMS_H 1
+#include <sys/types.h>
+#include "lib_tele.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define MIN_MSM_PARAM_NUM 4
+#define MIN_IMS_MSM_PARAM_NUM 6
+#define MIN_WRITE_MSM_PARAM_NUM 5
+#define MSG_MAX_LEN 256
+typedef struct {
+    char *telephonyNumber;
+    char *charset;
+    char *msg;
+    char *smsc;
+} SmsSendData;
+typedef struct{
+lynqBase base;
+RIL_SMS_Response smsResp;
+}smsResponse;
+typedef struct {
+    char *telephonyNumber;
+    char *charset;
+    char *msg;
+    char *retryNum;
+    char *messageRef;
+    char *smsc;    
+} SmsImsSendData;
+
+typedef struct {
+    int  smsStatus; //UnRead\Read\UnSent\Sent
+    char *recPhonNum;
+    char *charset;
+    char *msg;
+    char *smsc;    
+} SmsInfo;
+
+typedef struct{
+lynqBase base;
+int msgStoreIndex;
+}messageStoreInfo;
+
+typedef struct{
+lynqBase base;
+char *smsc;
+}smscCbInfo;
+typedef struct
+{
+    int index;// the index of sms in memory,0-100.
+    int status;//read:0,unread:1
+    int smslen;//the length of sms,the maximum length shall not exceed the length specified in 3GGP protocol(160/70)
+    char message[MSG_MAX_LEN];//sms content
+    RIL_SOCKET_ID soc_id;
+    char teleNum[50];//telephony number
+    int numLen;
+}storeMessageInfo;
+int lynq_send_sms(const char *telephonyNumber, const int charset,const char *msg, const char *smsc, smsResponse* smsResp);
+int lynq_Ims_send_sms(const char *telephonyNumber, const int charset,const char *msg, const char*retryNum,const char *messageRef, const char *smsc,smsResponse *smsResp);
+int lynq_write_sms_to_sim(const int smsStatus,const char *recPhonNum,const int charset,const char *msg,const char *smsc,messageStoreInfo *msgstroeInfo);
+int lynq_report_sms_memory_status(const int status,lynqBase *base);
+int lynq_delet_sms_on_sim(const int index,lynqBase *base);
+int lynq_get_smsc_address(smscCbInfo *smscInfo);
+int lynq_set_smsc_address(const char* serviceNumber,lynqBase *base);
+void lynq_recive_new_sms_cb(RIL_SOCKET_ID soc_id,char * num, char * smsc, char * msg, int charset);
+int lynq_store_sms_to_memory(RIL_SOCKET_ID soc_id,const int status,char * num,const char* sms,lynqBase *base);
+int lynq_get_sms_from_memory(const int index, storeMessageInfo* sms,lynqBase *base);
+int lynq_delete_message_from_memory(const int index,lynqBase *base);
+
+#ifdef __cplusplus
+}
+#endif
+#endif