Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
2.6 KiB

  1. #ifndef _HSMSCAN_
  2. #define _HSMSCAN_
  3. /*++
  4. 1998 Seagate Software, Inc. All rights reserved.
  5. Module Name:
  6. hsmscan.h
  7. Abstract:
  8. This class represents a scanning process that is being carried out upon one FsaResource for
  9. a job.
  10. Author:
  11. Chuck Bardeen [cbardeen] 16-Feb-1997
  12. Revision History:
  13. --*/
  14. #include "resource.h" // main symbols
  15. #include "wsb.h"
  16. #include "job.h"
  17. extern DWORD HsmStartScanner(void* pVoid);
  18. /*++
  19. Class Name:
  20. CHsmScanner
  21. Class Description:
  22. This class represents a scanning process that is being carried out upon one FsaResource for
  23. a job.
  24. --*/
  25. class CHsmScanner :
  26. public CComObjectRoot,
  27. public IHsmSessionSinkEveryEvent,
  28. public IHsmScanner,
  29. public CComCoClass<CHsmScanner,&CLSID_CHsmScanner>
  30. {
  31. public:
  32. CHsmScanner() {}
  33. BEGIN_COM_MAP(CHsmScanner)
  34. COM_INTERFACE_ENTRY(IHsmScanner)
  35. COM_INTERFACE_ENTRY(IHsmSessionSinkEveryEvent)
  36. END_COM_MAP()
  37. DECLARE_REGISTRY_RESOURCEID(IDR_CHsmScanner)
  38. // CComObjectRoot
  39. public:
  40. STDMETHOD(FinalConstruct)(void);
  41. void FinalRelease(void);
  42. // CHsmScanner
  43. STDMETHOD(Cancel)(HSM_JOB_EVENT event);
  44. STDMETHOD(LowerPriority)(void);
  45. STDMETHOD(DoIfMatches)(IFsaScanItem* pScanItem);
  46. STDMETHOD(Pause)(void);
  47. STDMETHOD(PopRules)(OLECHAR* path);
  48. STDMETHOD(RaisePriority)(void);
  49. STDMETHOD(PushRules)(OLECHAR* path);
  50. STDMETHOD(Resume)(void);
  51. STDMETHOD(ScanPath)(OLECHAR* path);
  52. STDMETHOD(SetState)(HSM_JOB_STATE state);
  53. STDMETHOD(StartScan)(void);
  54. // IHsmSessionSinkEveryEvent
  55. STDMETHOD(ProcessSessionEvent)(IHsmSession* pSession, HSM_JOB_PHASE phase, HSM_JOB_EVENT event);
  56. // IHsmScanner
  57. public:
  58. STDMETHOD(Start)(IHsmSession* pSession, OLECHAR* path);
  59. protected:
  60. CWsbStringPtr m_startingPath;
  61. CWsbStringPtr m_stoppingPath;
  62. CWsbStringPtr m_currentPath;
  63. HSM_JOB_STATE m_state;
  64. HSM_JOB_PRIORITY m_priority;
  65. HANDLE m_threadHandle;
  66. HANDLE m_event; // Event for suspend/resume
  67. DWORD m_threadId;
  68. HRESULT m_threadHr;
  69. BOOL m_skipHiddenItems;
  70. BOOL m_skipSystemItems;
  71. BOOL m_useRPIndex;
  72. BOOL m_useDbIndex;
  73. DWORD m_eventCookie;
  74. CComPtr<IHsmSession> m_pSession;
  75. CComPtr<IFsaResource> m_pResource;
  76. CComPtr<IHsmJob> m_pJob;
  77. CComPtr<IWsbCollection> m_pRuleStacks;
  78. CComPtr<IWsbEnum> m_pEnumStacks;
  79. };
  80. #endif // _HSMSCAN_