sgippkg.h

来自「联通的短信网关平台。 sp 使用。 如果想自己用vc 开发短信业务」· C头文件 代码 · 共 68 行

H
68
字号

/*
 *	SGIPPkg.h
 */
#ifndef __MOBILPACKAGE_H__
#define __MOBILPACKAGE_H__

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <time.h>
#include <errno.h>
#include <sys/wait.h>
#include <time.h>
#include <fcntl.h>
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <pthread.h>

#include "sgip.h"

class CSGIPPkg
{
public:
	CSGIPPkg();
	~CSGIPPkg();

	int NewPackage(unsigned int nPkgType, char *pTotcp);

	int GetPackageType(const char *pBuf);
	int GetPackageLen(const char *pBuf);
	int GetPackageResult(const char *pBuf);
	int GetMessageLen(unsigned int nPkgType);

	//translate pBuf to sMsg:
	void ComposePackage
	(
		unsigned int nPkgType, 
		SGIP_MSG &stMsg, 
		const char *pBuf
	);
	//translate sMsg to pBuf:
	void CSGIPPkg::DeComposePackage
	(
		unsigned int nPkgType, 
		SGIP_MSG_BODY &stBody, 
		char *pBuf,
		int *pLen
	);

protected:

private:
	unsigned int GetSeqno();
	void GetTimeStamp(time_t iTime, char *pTimeStamp);
};

#endif


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?