// WebClient.h: interface for the CWebClient class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_WEBCLIENT_H__8365068C_FF1D_4CA6_A4D1_D270D5133EFF__INCLUDED_) #define AFX_WEBCLIENT_H__8365068C_FF1D_4CA6_A4D1_D270D5133EFF__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "QLCommander.h" #include "QLClientSocket.h" #define RECIVING 1 // ÕýÔÚ½ÓÊÕÊý¾Ý #define RECIVED 2 // Êý¾ÝÒÔ½ÓÊÕÍê³É class AFX_EXT_CLASS CWebClient : public CQLCommander { public: CWebClient(); virtual ~CWebClient(); // Attributers public: protected: CQLClientSocket *m_pSocket; CFile m_file; CString m_strMethod; CString m_strServerPath; CString m_strLocalPath; DWORD m_dwSize; DWORD m_dwRecived; // Operations public: DWORD GetReciveSize( DWORD *pdwSizeAll ); bool Get( LPCTSTR lpszLocalFileName, LPCTSTR lpszPath ); protected: void RunRequest(); void OnConnected( CQLClientSocket *pSocket ); BOOL OnResponse( CQLResponse *pResponse, CQLClientSocket *pSocket ); void OnConnectionErr( CQLClientSocket *pSocket, int nErrorCode ); void OnConnectedClosed( CQLClientSocket *pSocket ); void OnSndCmdComplete(CQLRequest *pRequest); }; #endif // !defined(AFX_WEBCLIENT_H__8365068C_FF1D_4CA6_A4D1_D270D5133EFF__INCLUDED_)