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.

132 lines
4.0 KiB

  1. #if !defined(_FUSION_SXS_ACTCTXGENCTXCTB_H_INCLUDED_)
  2. #define _FUSION_SXS_ACTCTXGENCTXCTB_H_INCLUDED_
  3. #pragma once
  4. /*-----------------------------------------------------------------------------
  5. ACTivation ConTeXt GENneration ConTeXt ConTriButor
  6. -----------------------------------------------------------------------------*/
  7. #include "sxsp.h"
  8. #include "ForwardDeclarations.h"
  9. class CActivationContextGenerationContextContributor
  10. {
  11. public:
  12. CActivationContextGenerationContextContributor() :
  13. m_ActCtxCtb(NULL),
  14. m_ActCtxGenContext(NULL),
  15. m_ManifestParseContext(NULL),
  16. m_ManifestParseContextValid(FALSE),
  17. m_NoMoreCallbacksThisFile(FALSE),
  18. m_SectionSize(0) { }
  19. ~CActivationContextGenerationContextContributor();
  20. BOOL Initialize(PACTCTXCTB ActCtxCtb, PVOID ActCtxGenContext);
  21. VOID PopulateCallbackHeader(ACTCTXCTB_CBHEADER &Header, ULONG Reason, PACTCTXGENCTX pActCtxGenCtx);
  22. // comparison function for qsort()
  23. static int __cdecl Compare(const void *pelem1, const void *pelem2);
  24. bool IsExtendedSection() const { return m_IsExtendedSection; }
  25. PCWSTR Name() const;
  26. const GUID &ExtensionGuid() const;
  27. ULONG SectionId() const;
  28. ULONG SectionFormat() const;
  29. BOOL Fire_ParseBeginning(
  30. PACTCTXGENCTX pActCtxGenCtx,
  31. PCACTCTXCTB_ASSEMBLY_CONTEXT AssemblyContext,
  32. DWORD FileFlags,
  33. ULONG ParseType,
  34. ULONG FilePathType,
  35. PCWSTR FilePath,
  36. SIZE_T FilePathCch,
  37. const FILETIME &FileLastWriteTime,
  38. ULONG FileFormatVersionMajor,
  39. ULONG FileFormatVersionMinor,
  40. ULONG MetadataSatelliteRosterIndex
  41. );
  42. BOOL Fire_IdentityDetermined(
  43. PACTCTXGENCTX pActCtxGenCtx,
  44. PCACTCTXCTB_ASSEMBLY_CONTEXT AssemblyContext,
  45. PCACTCTXCTB_PARSE_CONTEXT ParseContext,
  46. PCASSEMBLY_IDENTITY AssemblyIdentity
  47. );
  48. BOOL Fire_BeginChildren(
  49. PACTCTXGENCTX pActCtxGenCtx,
  50. PCACTCTXCTB_ASSEMBLY_CONTEXT AssemblyContext,
  51. PCACTCTXCTB_PARSE_CONTEXT ParseContext,
  52. PCSXS_NODE_INFO NodeInfo
  53. );
  54. BOOL Fire_EndChildren(
  55. PACTCTXGENCTX pActCtxGenCtx,
  56. PCACTCTXCTB_ASSEMBLY_CONTEXT AssemblyContext,
  57. PCACTCTXCTB_PARSE_CONTEXT ParseContext,
  58. BOOL Empty,
  59. PCSXS_NODE_INFO NodeInfo
  60. );
  61. BOOL Fire_ElementParsed(
  62. PACTCTXGENCTX pActCtxGenCtx,
  63. PCACTCTXCTB_ASSEMBLY_CONTEXT AssemblyContext,
  64. PCACTCTXCTB_PARSE_CONTEXT ParseContext,
  65. USHORT NodeCount,
  66. PCSXS_NODE_INFO NodeInfo
  67. );
  68. BOOL Fire_PCDATAParsed(
  69. PACTCTXGENCTX pActCtxGenCtx,
  70. PCACTCTXCTB_ASSEMBLY_CONTEXT AssemblyContext,
  71. PCACTCTXCTB_PARSE_CONTEXT ParseContext,
  72. const WCHAR *Text,
  73. ULONG TextCch
  74. );
  75. BOOL Fire_CDATAParsed(
  76. PACTCTXGENCTX pActCtxGenCtx,
  77. PCACTCTXCTB_ASSEMBLY_CONTEXT AssemblyContext,
  78. PCACTCTXCTB_PARSE_CONTEXT ParseContext,
  79. const WCHAR *Text,
  80. ULONG TextCch
  81. );
  82. BOOL Fire_ParseEnding(
  83. PACTCTXGENCTX pActCtxGenCtx,
  84. PCACTCTXCTB_ASSEMBLY_CONTEXT AssemblyContext
  85. );
  86. VOID Fire_ParseEnded(
  87. PACTCTXGENCTX pActCtxGenCtx,
  88. PCACTCTXCTB_ASSEMBLY_CONTEXT AssemblyContext
  89. );
  90. BOOL Fire_AllParsingDone(
  91. PACTCTXGENCTX pActCtxGenCtx
  92. );
  93. BOOL Fire_GetSectionSize(
  94. PACTCTXGENCTX pActCtxGenCtx
  95. );
  96. BOOL Fire_GetSectionData(
  97. PACTCTXGENCTX pActCtxGenCtx,
  98. PVOID Buffer
  99. );
  100. BOOL Fire_ActCtxGenEnding(
  101. PACTCTXGENCTX pActCtxGenCtx
  102. );
  103. VOID Fire_ActCtxGenEnded(
  104. PACTCTXGENCTX pActCtxGenCtx
  105. );
  106. SIZE_T SectionSize() const { return m_SectionSize; }
  107. PVOID ActCtxGenContext() const { return m_ActCtxGenContext; }
  108. // protected:
  109. PVOID m_ManifestParseContext;
  110. BOOL m_ManifestParseContextValid;
  111. BOOL m_NoMoreCallbacksThisFile;
  112. protected:
  113. PACTCTXCTB m_ActCtxCtb;
  114. PVOID m_ActCtxGenContext;
  115. SIZE_T m_SectionSize;
  116. bool m_IsExtendedSection;
  117. };
  118. #endif