?? gprs.h
字號:
// GPRS.h: interface for the CGPRS class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_GPRS_H__8EB70C01_884B_4974_88B3_048F9C8F9735__INCLUDED_)
#define AFX_GPRS_H__8EB70C01_884B_4974_88B3_048F9C8F9735__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "CeSerial.h"
class CGPRS
{
public:
CGPRS();
virtual ~CGPRS();
BOOL GPRS_Init(LPCTSTR Port, int BaudRate, DWORD UserParam);
// GPRS 回調函數
typedef void (CALLBACK *ONGPRSRECV)(DWORD UserParam, DWORD Status, CString strData);
ONGPRSRECV OnGPRSRecv;
BOOL GPRS_DialUp(CString strTelNum);
BOOL GPRS_DialDown(void);
BOOL GPRS_TakeTheCall(void);
BOOL GPRS_HangUpTheCall(void);
BOOL GPRS_DeleteShortMsg(DWORD num);
BOOL GPRS_ReadShortMessage(DWORD num, CString *strTelCode, CString *Msg);
BOOL GPRS_SendShortMessage(CString strTelNum, CString Msg);
BOOL GPRS_SetShortMSGCenterTel(CString strTelNum);
BOOL GPRS_CheckMsgNum(CString *strNum, CString *strTotal);
private:
CCeSerial *pCeSerial;
DWORD m_UserParam; /* 使用本模塊用戶 */
HANDLE m_ATCmdRespEvent; /* AT 命令回復事件 */
CString m_strRespBuf; /* 回復緩沖區字符串 */
DWORD m_RespCnt;
BOOL bSendATCmd; /* 是否發送了命令 */
void ResetGlobalVarial(void);
BOOL GPRS_SendATCmd(CString strCmd); /* 發送 AT 命令 */
BOOL GPRS_WriteMsg(CString Msg); /* 發送短信內容 */
BOOL GPRS_WaitResponseOK(void); /* 等待 AT 命令的響應 */
CString GPRS_GetTheCallNum(CString str); /* 獲取打進來的電話的號碼 */
//int FindMsgPos(void); /* 查找短信的位置 */
int FindMsgPos(int *posnum, int *numlen, int *posmsg, int *msglen);
static void CALLBACK OnCommRecv(DWORD UserParam, BYTE *buf, DWORD buflen);
};
// GPRS 狀態碼
#define GPRS_STATUS_RECEIVE_CALL 0x01 /* 接到來電 */
#define GPRS_STATUS_OTHER_SIDE_HANDUP 0x02 /* 對方掛機 */
#endif // !defined(AFX_GPRS_H__8EB70C01_884B_4974_88B3_048F9C8F9735__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -