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.

127 lines
3.9 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 2000 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: Policy.h
  6. //
  7. // Project: Windows 2000 IAS
  8. //
  9. // Description:Definition of the CPolicy class
  10. //
  11. // Author: tperraut
  12. //
  13. // Revision 03/15/2000 created
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. #ifndef _POLICY_H_182D3E52_6866_460d_817C_627B77E66D45
  17. #define _POLICY_H_182D3E52_6866_460d_817C_627B77E66D45
  18. #if _MSC_VER > 1000
  19. #pragma once
  20. #endif // _MSC_VER > 1000
  21. #include "globaldata.h"
  22. //////////////////////////////////////////////////////////////////////////////
  23. // CLASS CPolicy
  24. class CPolicy
  25. {
  26. public:
  27. CPolicy()
  28. :m_Sequence(0),
  29. m_AuthType(0),
  30. m_AcctType(0),
  31. m_ManipulationTarget(0),
  32. m_NewProfileIdentity(0),
  33. m_NewPolicyIdentity(0),
  34. m_Persisted(FALSE),
  35. m_ServerGroup(L"")
  36. {};
  37. //////////////////////////////////////////////////////////////////////////
  38. // SetmsNPAction
  39. //////////////////////////////////////////////////////////////////////////
  40. void SetmsNPAction(const _bstr_t& PolicyName)
  41. {
  42. m_PolicyName = PolicyName;
  43. }
  44. //////////////////////////////////////////////////////////////////////////
  45. // SetmsNPConstraint
  46. //////////////////////////////////////////////////////////////////////////
  47. void SetmsNPConstraint(const _bstr_t& Constraint)
  48. {
  49. m_Constraint = Constraint;
  50. }
  51. //////////////////////////////////////////////////////////////////////////
  52. // SetmsNPSequence
  53. //////////////////////////////////////////////////////////////////////////
  54. void SetmsNPSequence(LONG Sequence)
  55. {
  56. m_Sequence = Sequence;
  57. }
  58. //////////////////////////////////////////////////////////////////////////
  59. // SetmsAuthProviderType
  60. //////////////////////////////////////////////////////////////////////////
  61. void SetmsAuthProviderType(LONG Type, LPCWSTR ServerGroup = NULL)
  62. {
  63. m_AuthType = Type;
  64. if ( ServerGroup )
  65. {
  66. m_ServerGroup = ServerGroup;
  67. }
  68. }
  69. //////////////////////////////////////////////////////////////////////////
  70. // SetmsAcctProviderType
  71. //////////////////////////////////////////////////////////////////////////
  72. void SetmsAcctProviderType(LONG Type)
  73. {
  74. m_AcctType = Type;
  75. }
  76. //////////////////////////////////////////////////////////////////////////
  77. // AddmsManipulationRules
  78. //////////////////////////////////////////////////////////////////////////
  79. void SetmsManipulationRules(
  80. const _bstr_t& Search,
  81. const _bstr_t& Replace
  82. );
  83. //////////////////////////////////////////////////////////////////////////
  84. // SetmsManipulationTarget
  85. //////////////////////////////////////////////////////////////////////////
  86. void SetmsManipulationTarget(LONG Target)
  87. {
  88. m_ManipulationTarget = Target;
  89. }
  90. //////////////////////////////////////////////////////////////////////////
  91. // Persist
  92. //////////////////////////////////////////////////////////////////////////
  93. LONG Persist(CGlobalData& GlobalData);
  94. private:
  95. _bstr_t m_PolicyName;
  96. _bstr_t m_Constraint;
  97. LONG m_Sequence;
  98. LONG m_AuthType, m_AcctType;
  99. _bstr_t m_ServerGroup;
  100. LONG m_ManipulationTarget;
  101. LONG m_NewProfileIdentity;
  102. LONG m_NewPolicyIdentity;
  103. BOOL m_Persisted;
  104. _bstr_t m_Search;
  105. _bstr_t m_Replace;
  106. };
  107. #endif //_POLICY_H_182D3E52_6866_460d_817C_627B77E66D45