CategoryDownload.h
资源名称:GGBT.rar [点击查看]
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:3k
源码类别:
P2P编程
开发平台:
Visual C++
- #if !defined(AFX_CATEGORYDOWNLOAD1_H__AF6C036C_6396_4F82_A69B_6C8A790B43C5__INCLUDED_)
- #define AFX_CATEGORYDOWNLOAD1_H__AF6C036C_6396_4F82_A69B_6C8A790B43C5__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // CategoryDownload1.h : header file
- //
- #include "FileDB.h"
- #include "DownloadEngine.h"
- #include "CategoryFileDB.h"
- class CFilesListCtrl;
- /////////////////////////////////////////////////////////////////////////////
- // CCategoryDownload window
- class CCategoryDownload : public CCategoryFileDB
- {
- // Construction
- public:
- CCategoryDownload();
- // Attributes
- public:
- bool IsDownloading();
- bool IsMovingFiles();
- void SetFilesListCtrl(CFilesListCtrl* pFilesListCtrl);
- void GetRateTotals(long& lUpRate, long& lDownRate);
- // Operations
- public:
- void PauseDBFiles(CFileDBItem* pFileDBItem);
- void StopAllCompleteds();
- void StopDBFiles(vector<CFileDBItem*> vToStopFileDBItems);
- bool StopDBFilesMoveComplete(CFileDBItem* pFileDBItem);
- bool Download(CTreeCursor curItem, CFileDBItem* pFileDBItem);
- bool FileDBItemRestore(CFileDBItem* pFileDBItem);
- bool FileDBItemMovetoArray(CTreeCursor curSrc, CTreeCursor curTarget, vector<CFileDBItem*>& vFileDBItem);
- bool FileDBItemMoveto(CTreeCursor curSrc, CTreeCursor curTarget, CFileDBItem* pFileDBItem, bool bMoveFile, bool bMoveCategory);
- bool DeleteDBFile(CTreeCursor curCategory, CFileDBItem* pFileDBItem, bool bForceDelete, bool bDelUncompleted, bool bDelCompleted);
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CCategoryDownload)
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CCategoryDownload();
- // Generated message map functions
- protected:
- //{{AFX_MSG(CCategoryDownload)
- afx_msg void OnDestroy();
- //}}AFX_MSG
- afx_msg void OnDownloadTerminated(long wParam, long lParam);
- afx_msg void OnStorageCheckComplete(long wParam, long lParam);
- DECLARE_MESSAGE_MAP()
- int OnCreate(LPCREATESTRUCT lpCreateStruct);
- void ContinueTheUncloseds();
- protected:
- virtual void DeleteAllData(CTreeCursor& curDel);
- CFilesListCtrl* m_pFilesListCtrl;
- CDownloadEngine m_DownloadEngine;
- private:
- bool _MoveItemFromto(CTreeCursor curSrc, CTreeCursor curTarget, CFileDBItem* pFileDBItem);
- void _StopDBFileItem(CFileDBItem* pFileDBItem);
- bool DeleteFileDBItemFiles(CFileDBItem* pFileDBItem, bool bDelDownloaded) const;
- static bool findDownloading(CTreeCursor curItem);
- CFileDBItem* findCursorByDownloadPointer(CTreeCursor curItem, CDownload* pDownload);
- vector<CDownload*> m_vDeleteings;
- vector<CFileDBItem*> m_vRuninings;
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_CATEGORYDOWNLOAD1_H__AF6C036C_6396_4F82_A69B_6C8A790B43C5__INCLUDED_)