/************************************************************************** | |
* | |
* Copyright (c) 2013 ZTE Corporation. | |
* | |
*************************************************************************** | |
* Ä£ ¿é Ãû : cc | |
* ÎÄ ¼þ Ãû : cc_proc.h | |
* Ïà¹ØÎļþ : | |
* ʵÏÖ¹¦ÄÜ :ccÃüÁî·¢Ëͺͽá¹û´¦ÀíÄ£¿éºê¡¢ÀàÐͶ¨Òå | |
* ×÷ Õß : | |
* °æ ±¾ : | |
* Íê³ÉÈÕÆÚ : | |
* ÆäËü˵Ã÷ : | |
**************************************************************************/ | |
/************************************************************************** | |
* Ð޸ļǼ : | |
***************************************************************************/ | |
/************************************************************************** | |
* Ð޸ıàºÅ : 0001 | |
* ÐÞ ¸Ä ÈË : | |
* ÐÞ¸ÄÈÕÆÚ : | |
* ÐÞ¸ÄÄÚÈÝ : | |
**************************************************************************/ | |
#ifndef _CC_PROC_H | |
#define _CC_PROC_H | |
/************************************************************************** | |
* #includeÇø | |
**************************************************************************/ | |
//#include "Drvs_voiceprocess.h" | |
#include "stdio.h" | |
#include "at_msg.h" | |
#include "os_type_def.h" | |
#include "at_other_api.h" | |
/************************************************************************** | |
* ³£Á¿¶¨ÒåÇø | |
**************************************************************************/ | |
#define ZAT_TAB_REPLACE ((unsigned char )(0xFC)) /* ÖÆ±í·ûÌæ»»·û */ | |
#define ZAT_NULL_FILL ((unsigned char )(0xFD)) /* ¿Õ´®Õ¼Î»·û */ | |
#define ZAT_SPACE_REPLACE ((unsigned char )(0xFE)) /* ¿Õ¸ñÌæ»»·û */ | |
#define ZCC_APP_AT_BUF_MAX_LEN 400 | |
#define ZCC_APP_AT_BUF_WAIT_TIME 300 | |
#define ZCC_MSG_DATA_MAXLEN 640 | |
/************************************************************************** | |
* Êý¾Ý½á¹¹¶¨ÒåÇø | |
**************************************************************************/ | |
typedef VOID (*pCcSlaveFsmFunc)(UINT8); | |
#define SC_LEN 29 | |
#define SC_MAXLEN (SC_LEN-1) // ǰתºÅÂ볤¶È×î´óΪ SC_MAXLEN -5 | |
typedef struct | |
{ | |
UINT8 scName; | |
UINT8 scMinLen; //ÆÚÍûµÄ²¹³äÒµÎñ²Ù×÷Âë×îС³¤¶È | |
UINT8 scMaxLen; //ÆÚÍûµÄ²¹³äÒµÎñ²Ù×÷Âë×î´ó³¤¶È | |
char sc[SC_LEN]; | |
}T_zCc_ScTab; | |
typedef enum | |
{ | |
CC_APP_AT_CMD_NONE, | |
CC_APP_AT_CMD_REQ_D, | |
CC_APP_AT_CMD_REQ_A, | |
CC_APP_AT_CMD_REQ_CHUP, | |
CC_APP_AT_CMD_REQ_ZLEDVOLTE, | |
CC_APP_AT_CMD_REQ_VTS, | |
CC_APP_AT_CMD_REQ_CMUT, | |
CC_APP_AT_CMD_REQ_CLVL, | |
CC_APP_AT_CMD_REQ_VOICELOOP, | |
CC_APP_AT_CMD_REQ_IMSPLUS, | |
CC_APP_AT_CMD_REQ_SET_CHLD, | |
CC_APP_AT_CMD_REQ_SET_CCFC, | |
CC_APP_AT_CMD_REQ_SET_CCWA, | |
CC_APP_AT_CMD_REQ_SET_CLCK, | |
CC_APP_AT_CMD_REQ_GET_CCFC, | |
CC_APP_AT_CMD_REQ_GET_CCWA, | |
CC_APP_AT_CMD_REQ_SET_CPWD, | |
CC_APP_AT_CMD_REQ_GET_CLCC, | |
}E_CC_APP_AtReqCmdId; | |
/* Define known events. Events are received from vTSP and SIP. */ | |
typedef enum { | |
ZCC_NO_E = 0, | |
//ZCC_RESET_E = 1, | |
ZCC_DTMF_E = 1, | |
//ZCC_DTMFLE_E = 2, | |
//ZCC_DTMFTE_E = 3, | |
ZCC_DIAL_E = 4, | |
ZCC_CNCT_E = 5, | |
ZCC_DISCN_E = 6, | |
ZCC_BSY_E = 7, | |
ZCC_MATCH_E = 8, | |
ZCC_TIMER_E = 16, | |
ZCC_SEIZE_E = 20, | |
ZCC_RELEASE_E = 21, | |
ZCC_FLASH_E = 22, | |
ZCC_CIDCW_E = 29, | |
ZCC_SINVITE_E = 42, | |
ZCC_SDISCN_MO_E = 43, | |
ZCC_SANS_E = 44, | |
ZCC_SRING_E = 45, | |
ZCC_SDIALLING_E = 46, | |
ZCC_BUSYTONETIMER_E = 47, | |
ZCC_HOOKOFFTIMER_E = 48, | |
ZCC_SSDIALTONETIMER_E = 49, | |
ZCC_DTMFTIMER_E = 50, | |
ZCC_TKYTIMER_E = 51, | |
ZCC_SDISCN_MT_E = 52, | |
ZCC_SDIAL_ERR_E = 53, | |
ZCC_HOOKOFF_IDLE_TIMER_E = 54, | |
ZCC_RESOURCE_READY_E = 115, | |
ZCC_ASSIST_MSG_E = 128 | |
} T_zCc_Event;/* ÏûÏ¢½á¹¹Ìå */ | |
typedef SINT32 (*zCcApp_RecvAtIndFun)(MSG_BUF *ptMsgBuf); | |
typedef SINT32 (*zCcApp_AtIndProcFun)(MSG_BUF *ptMsgBuf); | |
typedef struct | |
{ | |
int AtIndCmd; | |
zCcApp_RecvAtIndFun RecvAtIndProcFun; | |
}T_CC_APP_RecvAtIndItem; | |
SINT32 zCc_DsciIndProc(MSG_BUF *ptMsgBuf); | |
//SINT32 zCc_CendIndProc(MSG_BUF *ptMsgBuf); | |
SINT32 zCc_ZcpiIndProc(MSG_BUF *ptMsgBuf); | |
SINT32 zCc_ZimsplusProc(MSG_BUF *ptMsgBuf); | |
SINT32 zCc_ZvoicechnlProc(MSG_BUF *ptMsgBuf); | |
typedef struct | |
{ | |
ULONG cmdId; | |
zCcApp_AtIndProcFun AtIndProcFun; | |
}T_CC_APP_AtIndProcItem; | |
extern char g_zCcApp_AtIndBuf[ZCC_APP_AT_BUF_MAX_LEN+1]; | |
SINT32 zCcApp_AtIndProc(char* AtBuff, SINT32 AtLen); | |
VOID zCc_SendAtDialReq(PSTR pAtCmdPara); | |
VOID zCc_SendAtDtmfReq(char* dtmfchar); | |
SINT32 zCc_SendAtChldReq(int chldtype); | |
VOID zCc_SendAtAnswerReq(VOID); | |
VOID zCc_SendAtHangupReq(VOID); | |
SINT32 zCc_RecvDsciInd(MSG_BUF *ptMsgBuf); | |
SINT32 zCc_RecvZcpiInd(MSG_BUF *ptMsgBuf); | |
SINT32 zCc_RecvImsplusInd(MSG_BUF *ptMsgBuf); | |
SINT32 zCc_RecvZvoiceChnl(MSG_BUF *ptMsgBuf); | |
VOID zCc_DigitsMatchRltProc(UINT8 ret); | |
UINT8 zCc_DigitsMatch(VOID); | |
VOID zCc_ClearDigits(VOID); | |
VOID zCc_InitSlaveObj(UINT8 slave); | |
VOID zCc_SIdleState(UINT8 slave); | |
VOID zCc_SDtState(UINT8 slave); | |
VOID zCc_SDaccmState(UINT8 slave); | |
VOID zCc_SDialingState(UINT8 slave); | |
VOID zCc_SRingbackState(UINT8 slave); | |
VOID zCc_STalkingState(UINT8 slave); | |
VOID zCc_SWaitResourceState(UINT8 slave); | |
VOID zCc_STryingState(UINT8 slave); | |
VOID zCc_SBsyToneState(UINT8 slave); | |
VOID zCc_STkytState(UINT8 slave); | |
VOID zCc_SSilState(UINT8 slave); | |
VOID zCcApp_Dial(char *ptMsgBuf); | |
SINT32 zCcApp_Answer(VOID); | |
SINT32 zCcApp_Chup(VOID); | |
SINT32 zCcApp_Vts(char* dtmfchar); | |
SINT32 zCcApp_Chld(int chldtype); | |
UINT8 zCc_CallCount(VOID); | |
void zCcApp_SetAtChnlCmdId(E_CC_APP_AtReqCmdId AtCmdId); | |
VOID zCc_RunSlave(UINT8 slave); | |
VOID zCc_RunMaster(MSG_BUF *ptMsgBuf); | |
SINT32 zCcApp_Ccfc(T_zCcapp_CcfcReq *ptccfcreq); | |
SINT32 zCcApp_Clck(T_zCcapp_ClckReq *ptclckreq); | |
SINT32 zCcApp_SetImsPlus(int rate, int setfg); | |
SINT32 zCcApp_AtIndRspProc(MSG_BUF *ptMsgBuf); | |
SINT32 zCc_RecvRsp(MSG_BUF *ptMsgBuf); | |
LONG zCcApp_send_message(unsigned short Msg_cmd,unsigned short us_DataLen,unsigned char *pData); | |
VOID zCc_SendAtImsPlusReq(int rate, int setfg); | |
VOID zCc_CheckSlaveState(const char *tips); | |
VOID zCc_ShowAllSlave(VOID); | |
void zCcApp_Vts_CleanReq(void); | |
void zCcApp_Vts_Rsp(void); | |
#endif |