#if !defined(AFX_FILECLIENTMGR_H__6E54FED3_A50C_490F_9E7A_E3F11BCDB2AB__INCLUDED_)
|
#define AFX_FILECLIENTMGR_H__6E54FED3_A50C_490F_9E7A_E3F11BCDB2AB__INCLUDED_
|
|
#if _MSC_VER > 1000
|
#pragma once
|
#endif // _MSC_VER > 1000
|
// FileClientMgr.h : header file
|
//
|
|
#include "FileClientMgrBase.h"
|
|
/////////////////////////////////////////////////////////////////////////////
|
// CFileClientMgr window
|
|
class AFX_EXT_CLASS CFileClientMgr : public CFileClientMgrBase
|
{
|
// Construction
|
public:
|
CFileClientMgr();
|
virtual ~CFileClientMgr();
|
|
// Attributes
|
public:
|
HANDLE m_hWait; // µÈ´ýʼþ¾ä±ú
|
|
bool m_bIsFree; // ÊÇ·ñ×ÔÓɵģ¬¿ÕÏеÄ
|
DWORD m_dwFreeTick; // ¿ªÊ¼×ÔÓÉ¿ÕÏÐʱµÄ¼ÆÊý
|
|
protected:
|
HANDLE m_hMainThread; // Ö÷Ïß³Ì Handle
|
DWORD m_dwMainThreadID; // Ö÷Ïß³ÌID
|
|
// ÃüÁî²ÎÊý´«µÝ±äÁ¿
|
DWORD m_dwErrCode; // ·µ»ØµÄ´íÎóÂë
|
CString m_strFileID; //
|
CString m_strFileName; // Îļþȫ·¾¶
|
CString m_strPathName; //
|
__int64 m_nFileSize; // Îļþ´óС
|
DWORD m_dwOption; // Ñ¡Ïî
|
CString m_strFileMD5; // Îļþ ID
|
|
// Operations
|
public:
|
// ÍâÃæÃüÁî
|
int UploadFile( CString strFileName, CString &strFileID, CString strPathName = _T( "" ), DWORD dwOption = 0, CString strFileMD5 = _T( "" ) );
|
int UploadFile( CString strFileName, CString &strFileID, CString &strSaveFilePath, CString strPathName = _T( "" ), DWORD dwOption = 0, CString strFileMD5 = _T( "" ) );
|
int DownloadFile( CString strFileID, CString strSavePathName, CString &strFileName, DWORD dwOption = 0 );
|
int CopyFile( CString strSourceFileID, CString &strFileID, CString strPathName = _T( "" ), DWORD dwOption = 0 );
|
int DeleteFile( CString strFileID, CString &strFileName );
|
int GetFileInfo( CString strFileID, CString &strFileName, CString &strSaveFileName, __int64 &nFileSize );
|
|
// ʵ¼Ê²Ù×÷¹¦ÄÜ
|
void OnUploadFile();
|
void OnDownloadFile();
|
void OnCopyFile();
|
void OnDeleteFile();
|
void OnGetFileInfo();
|
|
protected:
|
void OnResponseUploadFile( COISysMsg *pSMsg );
|
void OnResponseDownloadFile( COISysMsg *pSMsg );
|
void OnResponseCopyFile( COISysMsg *pSMsg );
|
void OnResponseDeleteFile( COISysMsg *pSMsg );
|
void OnResponseGetFileInfo( COISysMsg *pSMsg );
|
|
// Overrides
|
public:
|
virtual bool Init( CString &strError, BOOL bInitSocket = true );
|
|
// ÃüÁî·´À¡
|
virtual void OnConnectError( long nErrCode );
|
virtual void OnResponseError( long nErrCode, long nTrID, CString strParam );
|
virtual void OnResponseReceive( COISysMsg *pSMsg );
|
|
};
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
//{{AFX_INSERT_LOCATION}}
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
#endif // !defined(AFX_FILECLIENTMGR_H__6E54FED3_A50C_490F_9E7A_E3F11BCDB2AB__INCLUDED_)
|