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

📄 network.h

📁 联通手机的宝典画面.用brew 平台编辑而成.
💻 H
字号:
#ifndef _NETWORK_H_
#define _NETWORK_H_

#include "start.h"

class CObject;
#define IDS_WEBCANCEL		 19
#define IDS_WEBS_GOTREDIRECT 25
#define IDS_WEBS_CACHEHIT	 26

#define PIC_COUNT			 4

class CNetWork  
{
public:
	CNetWork();
	virtual ~CNetWork();

// attribute
public:
	boolean		m_bFirst;			// first login
	int			m_nTimeout;
public:
	void Suspend();
	void Resume();
	void	Init(AEEApplet	*pApplet, AEEDeviceInfo	*pDevice);
	void	Release();
	void	PostData(char *szPostData, long nBufferLength, void * pObject);
	void	WebCleanup();
	void	CancelConnectCallback();
	boolean	KeyHandle(AEEEvent evt, uint16 wParam, uint32 dwParam);
private:
	AEEApplet	*m_pApplet;
    AEEDeviceInfo	*m_pDevice;
    AEERect		m_rcScreen;			// Device Screen Rect
	
	CObject		*m_pObject;

    char		*m_szUrl;			// The URL to access the web

	int8		m_nPic;

    AECHAR *	m_szError;			// the error msg if any
	int			m_nErrCode;			// error code
    boolean		m_bReady;			// had got all message and is ready for display

    IWeb *		m_pIWeb;			// IWeb interface ptr
    IWebResp *	m_pIWebResp;		// IWebResp interface ptr
    IWebOpts *	m_pIWebOpts;		// IWebOpts interface ptr
    
    AEECallback m_Callback;			// Callback information to send a notification when answer is ready
    AEECallback m_cb;				// IGetLine callback
    IPeek *		m_pIPeek;			// the post data stream

    IStatic *   m_pIStatic;			// or use the IStatic to display the text!

	long		m_BodySize;			// Size of response data in buffer
    long		m_BodyAllocSize;    // Allocated size of response data buffer
    char *		m_BodyBuffer;		// Buffer to hold response data
	long		m_TotalSize;	

private:
	
	static void WebReadCallBack(void * cxt);
	static void WebReadCB(void * pi);
	static void WebStatusNotification(void * pNotifyData, WebStatus ws, void * p); 
	static void WebHeaderHandler(void * pNotifyData, const char * pszName, GetLine * pglVal);

	
	static void ConnectCallback(CNetWork *pMe);
	void		ShowConnect();

};

#endif

⌨️ 快捷键说明

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