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.

97 lines
2.1 KiB

  1. #ifndef _HSMRLSTK_
  2. #define _HSMRLSTK_
  3. /*++
  4. 1998 Seagate Software, Inc. All rights reserved.
  5. Module Name:
  6. hsmrlstk.cpp
  7. Abstract:
  8. This component represents the set of rules that are in effect for directory currently
  9. being scanned for one policy.
  10. Author:
  11. Chuck Bardeen [cbardeen] 29-Oct-1996
  12. Revision History:
  13. --*/
  14. #include "resource.h" // main symbols
  15. #include "wsb.h"
  16. /*++
  17. Class Name:
  18. CHsmRuleStack
  19. Class Description:
  20. This component represents the set of rules that are in effect for directory currently
  21. being scanned for one policy.
  22. --*/
  23. class CHsmRuleStack :
  24. public IHsmRuleStack,
  25. public CWsbObject,
  26. public CComCoClass<CHsmRuleStack,&CLSID_CHsmRuleStack>
  27. {
  28. public:
  29. CHsmRuleStack() {}
  30. BEGIN_COM_MAP(CHsmRuleStack)
  31. COM_INTERFACE_ENTRY(IHsmRuleStack)
  32. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  33. COM_INTERFACE_ENTRY(IPersistStream)
  34. COM_INTERFACE_ENTRY(IWsbCollectable)
  35. COM_INTERFACE_ENTRY(IWsbTestable)
  36. END_COM_MAP()
  37. DECLARE_REGISTRY_RESOURCEID(IDR_CHsmRuleStack)
  38. // CComObjectRoot
  39. public:
  40. STDMETHOD(FinalConstruct)(void);
  41. // IPersist
  42. public:
  43. STDMETHOD(GetClassID)(LPCLSID pClsid);
  44. // IPersistStream
  45. public:
  46. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  47. STDMETHOD(Load)(IStream* pStream);
  48. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  49. // IWsbTestable
  50. STDMETHOD(Test)(USHORT *passed, USHORT* failed);
  51. // IHsmRuleStack
  52. public:
  53. STDMETHOD(Do)(IFsaScanItem* pScanItem);
  54. STDMETHOD(DoesMatch)(IFsaScanItem* pScanItem, BOOL* pShouldDo);
  55. STDMETHOD(Init)(IHsmPolicy* pPolicy, IFsaResource* pResource);
  56. STDMETHOD(Pop)(OLECHAR* path);
  57. STDMETHOD(Push)(OLECHAR* path);
  58. protected:
  59. USHORT m_scale;
  60. BOOL m_usesDefaults;
  61. CComPtr<IHsmAction> m_pAction;
  62. CComPtr<IHsmPolicy> m_pPolicy;
  63. CComPtr<IWsbEnum> m_pEnumDefaultRules;
  64. CComPtr<IWsbEnum> m_pEnumPolicyRules;
  65. CComPtr<IWsbEnum> m_pEnumStackRules;
  66. CComPtr<IWsbCollection> m_pRules;
  67. };
  68. #endif // _HSMRLSTK_