⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mycngp2client.h

📁 SMAL是short message abstract library的缩写,是由风起水流软件工作室(www.zealware.com)开发的一个支持短信网关系统开发的C++底层抽象接口库
💻 H
字号:
/**
*	MyCNGP2Client.h
*	
*	CNGP2 API Demo Application.
*
*	Copyright 2003-2006	北京风起水流软件工作室
*	
*	http://www.zealware.com
*	
*	princetoad@gmail.com
*
*/

#include "CNGP2APIDemo.h"
#include "CNGP2APIDemoDlg.h"

/** 包含必要的头文件和库文件
*/
#include <cngp2/cngpconn.h>

#if defined(_MSC_VER)
  #if _MSC_VER >= 1400  ///< vc8(2005)
    #ifdef _DEBUG
      #pragma comment(lib, "smalsd_vc8_md")
    #else
      #pragma comment(lib, "smals_vc8_md")
    #endif
  #elif _MSC_VER >= 1300 ///< VC7(2003)
    #ifdef _DEBUG
      #pragma comment(lib, "smalsd_vc71_md")
    #else
      #pragma comment(lib, "smals_vc71_md")
    #endif
  #else ///< VC6
    #ifdef _DEBUG
      #pragma comment(lib, "smalsd_vc6_md")
    #else
      #pragma comment(lib, "smals_vc6_md")
    #endif
  #endif
#endif

class MyCNGPClient : public CNGPClient
{
public:
	MyCNGPClient(CCNGP2APIDemoDlg & _dlg);

	virtual ~MyCNGPClient();

	/**断开,退出时调用
	*/
	void Release();

	/**打印出连接的统计信息
	*/
	void DumpStatus(CNGPConnection & connection);

	/**@name 重写的虚函数,执行自定义操作
	*/
	//@{
	BOOL OnConnectionSubmiting(
		CNGPConnection & connection,
		cngp_submit _message
		);

	void OnConnectionSubmited(
		CNGPConnection & connection, 
		cngp_submit _message
		);

	void OnConnectionSubmitFailed(
		CNGPConnection & connection, 
		cngp_submit _message 
		);

	void OnReceivedConnectionSubmitResponse(
		CNGPConnection & connection, 
		cngp_submit_deliver_resp _message
		);

	void OnReceivedConnectionDeliver(
		CNGPConnection & connection, 
		cngp_deliver _message
		);

	void OnReceivedConnectionStatusReport(
		CNGPConnection & connection, 
		cngp_deliver _message
		);

	void OnConnectionCleared(CNGPConnection & connection);

	void OnLogWrite(const char * fmt, ...);

	void OnNoAvailableConnection( cngp_submit & _message );

protected:
	CCNGP2APIDemoDlg & dlg;
	//@}
};

⌨️ 快捷键说明

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