DownloadEngine.h
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:1k
源码类别:

P2P编程

开发平台:

Visual C++

  1. // DownloadEngine.h: interface for the CDownloadEngine class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_DOWNLOADENGINE_H__1E116FF5_5A44_41C3_9FB7_93CA43256695__INCLUDED_)
  5. #define AFX_DOWNLOADENGINE_H__1E116FF5_5A44_41C3_9FB7_93CA43256695__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CFileDBItem;
  10. class CCategoryBarWnd;
  11. class CSetupRegister;
  12. class CDownloadEngine  
  13. {
  14. class CEngineItem
  15. {
  16. public:
  17. CEngineItem(CFileDBItem* pFileDBItem, HTREEITEM hTreeItem)
  18. {
  19. m_hTreeItem = hTreeItem;
  20. m_pFileDBItem= pFileDBItem;
  21. }
  22. HTREEITEM m_hTreeItem;
  23. CFileDBItem* m_pFileDBItem;
  24. };
  25. public:
  26. CDownloadEngine();
  27. virtual ~CDownloadEngine();
  28. bool Create(CSetupRegister* pSetupRegister, CCategoryBarWnd* pCategoryBarWnd);
  29. bool StartDownload(CFileDBItem* pFileDBItem, HTREEITEM hCursorItem);
  30. void StopDownload(CFileDBItem* pFileDBItem);
  31. void StopDownloadArray(const vector<CFileDBItem*>& vpFileDBItems);
  32. void ExcuteDownload(long lParam);
  33. private:
  34. CSetupRegister* m_pSetupRegister;
  35. vector<CEngineItem> m_vTostartDownloads;
  36. CCategoryBarWnd* m_pCategoryBarWnd;
  37. CFileDBItem* m_pCurrentCheckingItem;
  38. };
  39. #endif // !defined(AFX_DOWNLOADENGINE_H__1E116FF5_5A44_41C3_9FB7_93CA43256695__INCLUDED_)