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.

74 lines
2.0 KiB

  1. #if !defined(_FUSION_DLL_WHISTLER_POLICYSTATEMENT_H_INCLUDED_)
  2. #define _FUSION_DLL_WHISTLER_POLICYSTATEMENT_H_INCLUDED_
  3. #pragma once
  4. #include "fusionbuffer.h"
  5. #include "fusiondequelinkage.h"
  6. #include "fusiondeque.h"
  7. #include <sxsapi.h>
  8. class CPolicyStatementRedirect
  9. {
  10. public:
  11. inline CPolicyStatementRedirect() { }
  12. inline ~CPolicyStatementRedirect() { }
  13. BOOL Initialize(
  14. const CBaseStringBuffer &rbuffFromVersionRange,
  15. const CBaseStringBuffer &rbuffToVersion,
  16. bool &rfValid
  17. );
  18. BOOL TryMap(
  19. const ASSEMBLY_VERSION &rav,
  20. CBaseStringBuffer &VersionBuffer,
  21. bool &rfMapped
  22. );
  23. BOOL CheckForOverlap(
  24. const CPolicyStatementRedirect &rRedirect,
  25. bool &rfOverlaps
  26. );
  27. CDequeLinkage m_leLinks;
  28. ASSEMBLY_VERSION m_avFromMin;
  29. ASSEMBLY_VERSION m_avFromMax;
  30. CMediumStringBuffer m_NewVersion;
  31. private:
  32. CPolicyStatementRedirect(const CPolicyStatementRedirect &r);
  33. void operator =(const CPolicyStatementRedirect &r);
  34. };
  35. class CPolicyStatement
  36. {
  37. public:
  38. inline CPolicyStatement() : m_fApplyPublisherPolicy(true) { }
  39. inline ~CPolicyStatement() { m_Redirects.Clear<CPolicyStatement>(this, &CPolicyStatement::ClearDequeEntry); }
  40. BOOL Initialize();
  41. BOOL AddRedirect(
  42. const CBaseStringBuffer &rbuffFromVersion,
  43. const CBaseStringBuffer &rbuffToVersion,
  44. bool &rfValid
  45. );
  46. BOOL ApplyPolicy(
  47. PASSEMBLY_IDENTITY AssemblyIdentity,
  48. bool &rfPolicyApplied
  49. );
  50. VOID ClearDequeEntry(CPolicyStatementRedirect *p) const { FUSION_DELETE_SINGLETON(p); }
  51. CDeque<CPolicyStatementRedirect, FIELD_OFFSET(CPolicyStatementRedirect, m_leLinks)> m_Redirects;
  52. bool m_fApplyPublisherPolicy;
  53. private:
  54. CPolicyStatement(const CPolicyStatement &r);
  55. void operator =(const CPolicyStatement &r);
  56. };
  57. #endif // !defined(_FUSION_DLL_WHISTLER_POLICYSTATEMENT_H_INCLUDED_)