www.pudn.com > GSMTest1.rar > PDU.h


#include  
#include  
using namespace std; 
//PDU编解码类 
//未完成.07.01.01 
class PDU 
{ 
public: 
	//编码部分: 
	string smsEncodedNumber(string srvNumber);//手机号码编码 
	string smsEncodedCenterNumber(string srvCenterNumber);//短信中心编码 
	string smsPDUEncoded(char* srvContent);//短信内容编码 
	string smsEncodedsms(string strCenterNumber, string strNumber, char* strSMScontent);//整个短信内容编码 
	int nLength; 
	//解码部分: 
	bool IsPDU(string SMS); 
	string GetTelphone(string SMS);//提取短信的发送人电话号码 
	string GetDataTime(string SMS);//提取短信的发送时间 
	string GetContent(string SMS);//提取短信的内容(PDU) 
	string GetTextContent(string SMS);//提取短信的TEXT内容(TEXT) 
protected: 
	int StrToHex(string Input);//字符串转换为16进制数字 
	UINT WChar2Char(LPCWSTR pwszSrc, LPSTR pszDst); 
	UINT Char2WChar(LPCSTR pszSrc, LPWSTR pwszDst); 
	int BinToDec(string Input,int len); 
private: 
 
};