[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/cp/ps/modem/com/inc/zpsi_api.h b/cp/ps/modem/com/inc/zpsi_api.h
new file mode 100644
index 0000000..64f4949
--- /dev/null
+++ b/cp/ps/modem/com/inc/zpsi_api.h
@@ -0,0 +1,184 @@
+/**************************************************************************

+*

+*             Protocol Stack Adapter Layer Telephone Interface

+*

+*                  Copyright (c) 2011 ZTE Corporation.

+*

+***************************************************************************

+*

+*   °æ±¾ËùÓÐ :   ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾ ÊÖ»úÊÂÒµ²¿ 

+*   Ä£ ¿é Ãû :   PSI

+*   ÎÄ ¼þ Ãû :   zpsi_api.h

+*   Îļþ±êʶ :   

+*   Ïà¹ØÎļþ : 

+*   ʵÏÖ¹¦ÄÜ :   PSI×Óϵͳ¶Ôƽ̨ӦÓýӿÚ

+*   ×÷    Õß :   

+*   °æ    ±¾ :   

+*   Íê³ÉÈÕÆÚ :   2011.04.06

+*   ÆäËü˵Ã÷ :

+**************************************************************************/

+#ifndef ZPSI_API_H

+#define ZPSI_API_H

+

+#define ZATI2_SM_IPV4_PDPADDR_LEN   4

+#define ZATI2_SM_IPV6_PDPADDR_LEN   16

+

+#define ZATI2_SM_MAX_PDPADDR_LEN   (ZATI2_SM_IPV4_PDPADDR_LEN + ZATI2_SM_IPV6_PDPADDR_LEN)

+

+/* ½á¹¹Ì嶨Òå */

+typedef struct {

+    UINT8                                         iCid;

+    UINT8                                         iPdpType;   /*

+                                                             * 0x01-PPP

+                                                             * 0x21-IPv4

+                                                             * 0x57-IPv6

+                                                             */

+    UINT8                                         iPdpAddr[ZATI2_SM_MAX_PDPADDR_LEN]; /* È«0±íʾʹÓö¯Ì¬µØÖ·£¬Èç10.40.63.4±íʾΪ

+                                                                                          iPdpAddr[0]=10,iPdpAddr[1]=40,iPdpAddr[2]=63,iPdpAddr[3]=4*/

+    UINT8                                         iGateWay[ZATI2_SM_MAX_PDPADDR_LEN]; /* ͬÉÏ */

+    UINT8                                         iPrimaryDns[ZATI2_SM_MAX_PDPADDR_LEN]; /* ͬÉÏ */

+    UINT8                                         iSecondaryDns[ZATI2_SM_MAX_PDPADDR_LEN];  /* ͬÉÏ */

+}T_ZAti_SmIpDnsInfo;

+

+typedef enum

+{

+    ZATI2_CHIND_AT = 0,      /* ָʾµ±Ç°Êý¾ÝΪATÃüÁî*/

+    ZATI2_CHIND_PSD,         /* ָʾµ±Ç°Êý¾ÝΪPSD*/

+    ZATI2_CHIND_PSDV6,       /* ָʾµ±Ç°Êý¾ÝΪPSDV6*/

+    ZATI2_CHIND_CSD,         /* ָʾµ±Ç°Êý¾ÝΪCSD*/

+    ZATI2_CHIND_TURN_AT,     /* ָʾµ±Ç°Í¨µÀ״̬Çл»ÎªÃüÁî̬£¬Ð¯´øÊý¾ÝÎÞЧ*/

+    ZATI2_CHIND_TURN_PSD,    /* ָʾµ±Ç°Í¨µÀ״̬Çл»ÎªPSD£¬Ð¯´øÊý¾ÝÎÞЧ*/

+    ZATI2_CHIND_TURN_CSD,    /* ָʾµ±Ç°Í¨µÀ״̬Çл»ÎªCSD£¬Ð¯´øÊý¾ÝÎÞЧ*/

+    ZATI2_CHIND_MAX

+}

+T_zAti2_CtrmChInd;

+

+typedef enum

+{

+    ZATI2_CHANNEL_SRV_MODE_INVAL = 0,

+    ZATI2_CHANNEL_SRV_MODE_CMD,

+    ZATI2_CHANNEL_SRV_MODE_DATA

+}T_zAti2_ChnlSrvModeType;

+

+typedef SINT32 (*T_ZAti2_AtRecvFunc)(UINT8 channelId, UINT8* pDataPtr, UINT16 iDataLen, T_zAti2_CtrmChInd iFlag);

+typedef  BOOL (*OutputIpPacket_CB)(UINT8 chId ,VOID  *packet, SINT32 packetLen, UINT8 flag);

+typedef BYTE (*T_zAti_AtChannelFunc)(UINT8 PsId);

+#ifdef Z_DUALCARD_DUALSTANDBY

+typedef SINT32 (*ZUSAT_SENDATCMDTOACCESSCHANNEL_FUNC)(UINT32 devId, UINT8 *data, UINT16 dataLen);

+#else

+typedef SINT32 (*ZUSAT_SENDATCMDTOACCESSCHANNEL_FUNC)(UINT8 *data, UINT16 dataLen);

+#endif

+/**************************************************************************

+* º¯ÊýÃû³Æ£º zPsi_RegOutputIpPacketCb

+* ¹¦ÄÜÃèÊö£º 

+* ²ÎÊý˵Ã÷£º 

+* ·µ »Ø Öµ£º ³É¹¦·µ»ØZATI2_SUCCESS

+* ÆäËü˵Ã÷£º Èë²Î°üÌå²»¿É±»Ð޸ģ¬Ç뿽³öºó²Ù×÷                            

+**************************************************************************/ 

+SINT32 zPsi_RegOutputIpPacketCb(OutputIpPacket_CB recvFunc);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ : zAti2_Open

+* ¹¦ÄÜÃèÊö : ´ò¿ªÍ¨µÀ

+* ²ÎÊý˵Ã÷ : (IN)£º

+*            iChnelId     ͨµÀID

+*            (OUT)£ºÎÞ

+* ·µ »Ø Öµ : ³É¹¦·µ»ØZATI2_SUCCESS£»Ê§°Ü·µ»Ø´íÎóÀàÐÍ£»

+* ÆäËü˵Ã÷ : ÈÎÎñ¾ÍÐ÷ºó²ÅÄܽøÐÐͨµÀ²Ù×÷£»

+*            ͬһ¸öͨµÀ£¬²»ÄÜÁ¬Ðø´ò¿ªÁ½´Î

+**************************************************************************/

+SINT32 zAti2_Open(UINT8 iChnelId);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ : zAti2_Close

+* ¹¦ÄÜÃèÊö : ¹Ø±ÕͨµÀ

+* ²ÎÊý˵Ã÷ : (IN)£º

+*            iChnelId     ͨµÀID

+*            (OUT)£ºÎÞ

+* ·µ »Ø Öµ : ³É¹¦·µ»ØZATI2_SUCCESS£»Ê§°Ü·µ»ØZATI2_FAULSE£»

+* ÆäËü˵Ã÷ : ÈÎÎñ¾ÍÐ÷ºó²ÅÄܽøÐÐͨµÀ²Ù×÷£»

+*            ͬһ¸öͨµÀ£¬²»ÄܹرÕÁ½´Î

+**************************************************************************/

+SINT32 zAti2_Close(UINT8 iChnelId);

+/**************************************************************************

+* º¯ÊýÃû³Æ : zAti2_RegRecvCb

+* ¹¦ÄÜÃèÊö : ×¢²á»Øµ÷º¯Êý

+* ²ÎÊý˵Ã÷ : (IN)£º

+*            recvFunc     »Øµ÷º¯Êý

+*            (OUT)£ºÎÞ

+* ·µ »Ø Öµ : ³É¹¦·µ»ØZATI2_SUCCESS£»Ê§°Ü·µ»Ø´íÎóÔ­Òò£»

+* ÆäËü˵Ã÷ : Ìṩ¸øÓû§·½º¯Êý½Ó¿Ú

+*            Èë²ÎÖ¸ÕëÀàÐÍtypedef SINT32 (*T_ZAti2_RecvCb)(UINT8 channelId,

+*            UINT8* pDataPtr, UINT16 iDataLen, UINT8 iFlag);

+**************************************************************************/

+SINT32 zAti2_RegRecvCb(T_ZAti2_AtRecvFunc recvFunc);

+/**************************************************************************

+* º¯ÊýÃû³Æ : zAti2_AtChannelFunc

+* ¹¦ÄÜÃèÊö : ×¢²á»Øµ÷º¯Êý

+* ²ÎÊý˵Ã÷ : (IN)£º

+*            recvFunc     »Øµ÷º¯Êý

+*            (OUT)£ºÎÞ

+* ·µ »Ø Öµ : ³É¹¦·µ»ØZATI2_SUCCESS£»Ê§°Ü·µ»Ø´íÎóÔ­Òò£»

+* ÆäËü˵Ã÷ : Ìṩ¸øÓû§·½º¯Êý½Ó¿Ú

+**************************************************************************/

+SINT32 zAti2_AtChannelFunc(T_zAti_AtChannelFunc pChannelFunc);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ : zAti2_SetAlwaysAtReportChannel

+* ¹¦ÄÜÃèÊö : ʼÖÕÉϱ¨ATÃüÁîµÄͨµÀ×¢²á»Øµ÷º¯Êý£¬»Øµ÷º¯Êý·µ»Ø×¨ÓÃͨµÀºÅ¡£

+*           µ±×¨ÓÃͨµÀºÅÓÐЧʱ£¬Ö÷¶¯Éϱ¨ÃüÁî²»ÊÜÊÇ·ñºÚÆÁ/ÁÁÆÁÓ°Ï죬¶¼ÔÚ´ËͨµÀÉϱ¨¡£

+* ²ÎÊý˵Ã÷ : (IN)£º

+*            pChannelFunc - »Øµ÷º¯Êý£¬»Øµ÷º¯Êý·µ»Ø×¨ÓÃͨµÀºÅ¡£      

+* ·µ »Ø Öµ :

+* ÆäËü˵Ã÷ : Ìṩ¸ø²Î¿¼Éè¼ÆµÄº¯Êý½Ó¿Ú

+**************************************************************************/

+SINT32 zAti2_SetAlwaysAtReportChannel(T_zAti_AtChannelFunc pChannelFunc);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ : zAti2_Send

+* ¹¦ÄÜÃèÊö : ͨ¹ýͨµÀ·¢ËÍATÃüÁ»òÕßÊý¾Ý

+* ²ÎÊý˵Ã÷ : (IN)£º

+*            iChnelId     »Øµ÷º¯Êý

+*            pDataPtr      Êý¾ÝÖ¸Õë

+*            iDataLen      Êý¾Ý³¤¶È

+*            iFlag         

+*            (OUT)£ºÎÞ

+* ·µ »Ø Öµ : ³É¹¦·µ»ØZATI2_SUCCESS£»Ê§°Ü·µ»Ø´íÎóÔ­Òò£»

+* ÆäËü˵Ã÷ : Ìṩ¸øÓû§·½º¯Êý½Ó¿Ú

+**************************************************************************/

+SINT32 zAti2_Send(UINT8 iChnelId, UINT8 *pDataPtr, UINT16 iDataLen, T_zAti2_CtrmChInd iFlag);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ : zAti2_IsAtChReady

+* ¹¦ÄÜÃèÊö : È·ÈÏÖ¸¶¨Í¨µÀ״̬

+* ²ÎÊý˵Ã÷ : (IN)£º

+*            chID     ͨµÀID

+*            (OUT)£ºÎÞ

+* ·µ »Ø Öµ : ͨµÀ¿ÉÓ÷µ»ØOK,·ñÔò·µ»ØFALSE

+* ÆäËü˵Ã÷ : Ìṩ¸øÓû§·½º¯Êý½Ó¿Ú

+**************************************************************************/

+BOOL  zAti2_IsAtChReady(UINT8 chID);

+/**********************************************************************

+*º¯ÊýÃû³Æ:zAti_SmIpPdpActReq

+*¹¦ÄÜÃèÊö:»ñÈ¡CIDµÄµØÖ·ÐÅÏ¢

+*²ÎÊý˵Ã÷:

+*             iChnelId   ͨµÀID

+*             pAddr   (OUT)µØÖ·ÐÅÏ¢

+*********************************************************************/

+BOOL zAti_SmIpPdpActReq(UINT8 iChnelId, T_ZAti_SmIpDnsInfo* pAddr);

+VOID zUsat_RegisterSendMsgFun(ZUSAT_SENDATCMDTOACCESSCHANNEL_FUNC tmpFun);

+void zUsat_SendAtCmd(UINT32 dev_fd, const UINT8 *strAtCmd, UINT16 atCmdLen, UINT32 extData);

+extern BYTE zAti_PppGetCid(BYTE  bChnelId);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ : zAti_GetEMCellInfo

+* ¹¦ÄÜÃèÊö : »ñÈ¡¹¤³ÌÄ£Ê½Ð¡ÇøÐÅÏ¢

+* ²ÎÊý˵Ã÷ : pEmInfo: ½á¹¹ÓÃT_zEM_EmInfo_Ind

+*            bInstanceIdx: ´ý»ú²àʵÀýË÷ÒýºÅ,0±íʾ´ý»ú²à1£»1±íʾ´ý»ú²à2

+*                         µ¥´ý°æ±¾Ìî0£»Ë«´ý°æ±¾¸ù¾Ýʵ¼Ê´ý»ú²àÌîд0»òÕß1

+* ·µ »Ø Öµ : ³É¹¦·µ»ØZATI2_SUCCESS (0)

+* ÆäËü˵Ã÷ : Ìṩ¸øÓû§·½º¯Êý½Ó¿Ú£¬·µ»ØÊ§°Ü˵Ã÷ÔÝʱûÓлñÈ¡µ½

+**************************************************************************/

+SINT32 zAti_GetEMCellInfo(UINT8 *pEmInfo, UINT8 bInstanceIdx);

+#endif

+