Leaked source code of windows server 2003
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.

116 lines
3.3 KiB

  1. #ifndef _HSMJOBDF_
  2. #define _HSMJOBDF_
  3. /*++
  4. 1998 Seagate Software, Inc. All rights reserved.
  5. Module Name:
  6. hsmjobcx.cpp
  7. Abstract:
  8. This class contains properties that define the job, mainly the policies
  9. to be enacted by the job.
  10. Author:
  11. Chuck Bardeen [cbardeen] 29-Oct-1996
  12. Revision History:
  13. --*/
  14. #include "resource.h" // main symbols
  15. #include "wsb.h"
  16. #include "fsa.h"
  17. #include "job.h"
  18. #include "hsmeng.h"
  19. /*++
  20. Class Name:
  21. CHsmJobDef
  22. Class Description:
  23. This class contains properties that define the job, mainly the policies
  24. to be enacted by the job.
  25. --*/
  26. class CHsmJobDef :
  27. public CWsbObject,
  28. public IHsmJobDef,
  29. public CComCoClass<CHsmJobDef,&CLSID_CHsmJobDef>
  30. {
  31. public:
  32. CHsmJobDef() {}
  33. BEGIN_COM_MAP(CHsmJobDef)
  34. COM_INTERFACE_ENTRY(IHsmJobDef)
  35. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  36. COM_INTERFACE_ENTRY(IPersistStream)
  37. COM_INTERFACE_ENTRY(IWsbCollectable)
  38. COM_INTERFACE_ENTRY(IWsbTestable)
  39. END_COM_MAP()
  40. DECLARE_REGISTRY_RESOURCEID(IDR_CHsmJobDef)
  41. // CComObjectRoot
  42. public:
  43. STDMETHOD(FinalConstruct)(void);
  44. // IPersist
  45. public:
  46. STDMETHOD(GetClassID)(LPCLSID pClsid);
  47. // IPersistStream
  48. public:
  49. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  50. STDMETHOD(Load)(IStream* pStream);
  51. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  52. // IWsbTestable
  53. STDMETHOD(Test)(USHORT *passed, USHORT* failed);
  54. // IHsmJobDef
  55. public:
  56. STDMETHOD(EnumPolicies)(IWsbEnum** ppEnum);
  57. STDMETHOD(GetIdentifier)(GUID* pId);
  58. STDMETHOD(GetName)(OLECHAR** pName, ULONG bufferSize);
  59. STDMETHOD(GetPostActionOnResource)(IHsmActionOnResourcePost** ppAction);
  60. STDMETHOD(GetPreActionOnResource)(IHsmActionOnResourcePre** ppAction);
  61. STDMETHOD(GetPreScanActionOnResource)(IHsmActionOnResourcePreScan** ppAction);
  62. STDMETHOD(InitAs)(OLECHAR* name, HSM_JOB_DEF_TYPE type, GUID storagePool, IHsmServer* pServer, BOOL isUserDefined);
  63. STDMETHOD(Policies)(IWsbCollection** ppPolicies);
  64. STDMETHOD(SetName)(OLECHAR* szName);
  65. STDMETHOD(SetPostActionOnResource)(IHsmActionOnResourcePost* pAction);
  66. STDMETHOD(SetPreActionOnResource)(IHsmActionOnResourcePre* pAction);
  67. STDMETHOD(SetPreScanActionOnResource)(IHsmActionOnResourcePreScan* pAction);
  68. STDMETHOD(SetSkipHiddenItems)(BOOL shouldSkip);
  69. STDMETHOD(SetSkipSystemItems)(BOOL shouldSkip);
  70. STDMETHOD(SetUseRPIndex)(BOOL useIndex);
  71. STDMETHOD(SetUseDbIndex)(BOOL useIndex);
  72. STDMETHOD(SkipHiddenItems)(void);
  73. STDMETHOD(SkipSystemItems)(void);
  74. STDMETHOD(UseRPIndex)(void);
  75. STDMETHOD(UseDbIndex)(void);
  76. protected:
  77. GUID m_id;
  78. CWsbStringPtr m_name;
  79. BOOL m_skipHiddenItems;
  80. BOOL m_skipSystemItems;
  81. BOOL m_useRPIndex; // Scan should use Reparse Point Index
  82. BOOL m_useDbIndex; // Scan should use Db Index
  83. CComPtr<IWsbCollection> m_pPolicies;
  84. CComPtr<IHsmActionOnResourcePre> m_pActionResourcePre; // Can be NULL
  85. CComPtr<IHsmActionOnResourcePreScan> m_pActionResourcePreScan; // Can be NULL
  86. CComPtr<IHsmActionOnResourcePost> m_pActionResourcePost; // Can be NULL
  87. };
  88. #endif // _HSMJOBDF_