#if !defined(AFX_FILESESSION_H__98E4B82D_78D8_4C49_A142_76756D59F6FD__INCLUDED_)
|
#define AFX_FILESESSION_H__98E4B82D_78D8_4C49_A142_76756D59F6FD__INCLUDED_
|
|
#if _MSC_VER > 1000
|
#pragma once
|
#endif // _MSC_VER > 1000
|
// FileSession.h : header file
|
//
|
|
#include "OISession.h"
|
|
#define OPTION_TRANOPTION_SHOWDLG ( 0X0001 ) // ÏÔʾ½ø¶È¶Ô»°¿ò
|
#define OPTION_TRANOPTION_REPORT ( 0X0002 ) // ±¨¸æ½ø¶ÈÐÅÏ¢
|
//#define OPTION_HAVESOURCE ( 0X0004 ) // ÊÇת·¢µÄ¸½¼þ
|
#define OPTION_NOT_GEN_DATEPATH ( 0X0008 ) // ²»×Ô¶¯Éú³ÉÈÕÆÚ·¾¶
|
#define OPTION_NOT_USE_GUIDFILE ( 0X0010 ) // ²»Ê¹Óà GUID ×÷ΪÎļþÃû
|
#define OPTION_GEN_FILE_EXT ( 0X0020 ) // Éú³ÉÎļþʱ£¬¼ÓÉÏÀ©Õ¹Ãû
|
|
#define WM_TRANS_UPLOADED ( WM_USER + 29101 ) // ÒѾÉÏ´«Êý¾Ý
|
#define WM_TRANS_DOWNLOADED ( WM_USER + 29102 ) // ÒѾÏÂÔØÊý¾Ý
|
|
/////////////////////////////////////////////////////////////////////////////
|
// CFileSession window
|
|
class CFileSession : public COISession
|
{
|
// Construction
|
public:
|
CFileSession();
|
virtual ~CFileSession();
|
|
// Attributes
|
public:
|
CString m_strResumeInfoPath; // Ðø´«ÐÅÏ¢µÄ±£´æÂ·¾¶
|
bool m_bBase64; // ²ÉÓà Base64 ´«Êä
|
|
// Operations
|
public:
|
void SetBase64( bool bBase64 = true );
|
|
// ÉÏ´«Îļþ
|
UINT UploadFile( CString strFileName, DWORD dwOption, CString strSavePathName = _T( "" ), CString strFileMD5 = _T( "" ) );
|
// ÏÂÔØÎļþ
|
UINT DownloadFile( CString strFileID, DWORD dwOption, CString strSavePathName = _T( "" ), CString strFileName = _T( "" ) );
|
// ¸´ÖÆÎļþ
|
UINT CopyFile( CString strFileID, DWORD dwOption, CString strSavePathName = _T( "" ) );
|
// ɾ³ýÎļþ
|
UINT DeleteFile( CString strFileID );
|
// µÃµ½ÎļþÐÅÏ¢
|
UINT GetFileInfo( CString strFileID );
|
|
// ±¨¸æÎļþ´«Êä½ø¶È
|
void ReportUploadProgress( CString strMethod, CString strFileID, UINT nTrID, CString strFileName, __int64 nReaded, __int64 nFileSize );
|
void ReportDownloadProgress( UINT nTrID, CString strFileID, CString strFileName, __int64 nWrited, __int64 nFileSize );
|
|
bool GetResumeInfoPath();
|
|
protected:
|
|
// Overrides
|
public:
|
// ClassWizard generated virtual function overrides
|
//{{AFX_VIRTUAL(CFileSession)
|
virtual CCommander * NewCmderByCMDName( CString strMethod );
|
virtual void OnCmderResponse( CResponse *pResponse, CCommander *pCmder, BOOL &bRemoveCmder );
|
//}}AFX_VIRTUAL
|
|
};
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
//{{AFX_INSERT_LOCATION}}
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
#endif // !defined(AFX_FILESESSION_H__98E4B82D_78D8_4C49_A142_76756D59F6FD__INCLUDED_)
|