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.

209 lines
3.7 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. cpp.h
  5. Abstract:
  6. Private data structures and procedure prototypes for the
  7. Checkpoint Manager (CP) subcomponent of the NT Cluster Service
  8. Author:
  9. John Vert (jvert) 1/14/1997
  10. Revision History:
  11. --*/
  12. #define UNICODE 1
  13. #include "nt.h"
  14. #include "ntrtl.h"
  15. #include "nturtl.h"
  16. #include "service.h"
  17. #define LOG_CURRENT_MODULE LOG_MODULE_CP
  18. //global data relating to the quorum resource
  19. #if NO_SHARED_LOCKS
  20. extern CRITICAL_SECTION gQuoLock;
  21. #else
  22. extern RTL_RESOURCE gQuoLock;
  23. #endif
  24. //
  25. // Local function prototypes
  26. //
  27. typedef struct _CP_CALLBACK_CONTEXT {
  28. PFM_RESOURCE Resource;
  29. LPCWSTR lpszPathName;
  30. BOOL IsChangeFileAttribute;
  31. } CP_CALLBACK_CONTEXT, *PCP_CALLBACK_CONTEXT;
  32. DWORD
  33. CppReadCheckpoint(
  34. IN PFM_RESOURCE Resource,
  35. IN DWORD dwCheckpointId,
  36. IN LPCWSTR lpszFileName,
  37. IN BOOLEAN fCryptoCheckpoint
  38. );
  39. DWORD
  40. CppWriteCheckpoint(
  41. IN PFM_RESOURCE Resource,
  42. IN DWORD dwCheckpointId,
  43. IN LPCWSTR lpszFileName,
  44. IN BOOLEAN fCryptoCheckpoint
  45. );
  46. DWORD
  47. CppGetCheckpointFile(
  48. IN PFM_RESOURCE Resource,
  49. IN DWORD dwId,
  50. OUT OPTIONAL LPWSTR *pDirectoryName,
  51. OUT LPWSTR *pFileName,
  52. IN OPTIONAL LPCWSTR lpszQuorumDir,
  53. IN BOOLEAN fCryptoCheckpoint
  54. );
  55. DWORD
  56. CppCheckpoint(
  57. IN PFM_RESOURCE Resource,
  58. IN HKEY hKey,
  59. IN DWORD dwId,
  60. IN LPCWSTR KeyName
  61. );
  62. //
  63. // Crypto key checkpoint interfaces
  64. //
  65. DWORD
  66. CpckReplicateCryptoKeys(
  67. IN PFM_RESOURCE Resource
  68. );
  69. BOOL
  70. CpckRemoveCheckpointFileCallback(
  71. IN LPWSTR ValueName,
  72. IN LPVOID ValueData,
  73. IN DWORD ValueType,
  74. IN DWORD ValueSize,
  75. IN PCP_CALLBACK_CONTEXT Context
  76. );
  77. //
  78. // Registry watcher interfaces
  79. //
  80. DWORD
  81. CppWatchRegistry(
  82. IN PFM_RESOURCE Resource
  83. );
  84. DWORD
  85. CppUnWatchRegistry(
  86. IN PFM_RESOURCE Resource
  87. );
  88. DWORD
  89. CppRegisterNotify(
  90. IN PFM_RESOURCE Resource,
  91. IN LPCWSTR lpszKeyName,
  92. IN DWORD dwId
  93. );
  94. DWORD
  95. CppRundownCheckpoints(
  96. IN PFM_RESOURCE Resource
  97. );
  98. DWORD
  99. CppRundownCheckpointById(
  100. IN PFM_RESOURCE Resource,
  101. IN DWORD dwId
  102. );
  103. DWORD
  104. CppInstallDatabase(
  105. IN HKEY hKey,
  106. IN LPWSTR FileName
  107. );
  108. BOOL
  109. CppRemoveCheckpointFileCallback(
  110. IN LPWSTR ValueName,
  111. IN LPVOID ValueData,
  112. IN DWORD ValueType,
  113. IN DWORD ValueSize,
  114. IN PCP_CALLBACK_CONTEXT Context
  115. );
  116. DWORD CppDeleteCheckpointFile(
  117. IN PFM_RESOURCE Resource,
  118. IN DWORD dwCheckpointId,
  119. IN OPTIONAL LPCWSTR lpszQuorumPath
  120. );
  121. DWORD
  122. CpckDeleteCheckpointFile(
  123. IN PFM_RESOURCE Resource,
  124. IN DWORD dwCheckpointId,
  125. IN OPTIONAL LPCWSTR lpszQuorumPath
  126. );
  127. DWORD CppDeleteFile(
  128. IN PFM_RESOURCE Resource,
  129. IN DWORD dwCheckpointId,
  130. IN OPTIONAL LPCWSTR lpszQuorumPath
  131. );
  132. DWORD CpckDeleteFile(
  133. IN PFM_RESOURCE Resource,
  134. IN DWORD dwCheckpointId,
  135. IN OPTIONAL LPCWSTR lpszQuorumPath
  136. );
  137. DWORD
  138. CpckDeleteCryptoFile(
  139. IN PFM_RESOURCE Resource,
  140. IN DWORD dwCheckpointId,
  141. IN OPTIONAL LPCWSTR lpszQuorumPath
  142. );
  143. error_status_t
  144. CppDepositCheckpoint(
  145. handle_t IDL_handle,
  146. LPCWSTR ResourceId,
  147. DWORD dwCheckpointId,
  148. BYTE_PIPE CheckpointData,
  149. BOOLEAN fCryptoCheckpoint
  150. );
  151. error_status_t
  152. CppRetrieveCheckpoint(
  153. handle_t IDL_handle,
  154. LPCWSTR ResourceId,
  155. DWORD dwCheckpointId,
  156. BOOLEAN fCryptoCheckpoint,
  157. BYTE_PIPE CheckpointData
  158. );
  159. error_status_t
  160. CppDeleteCheckpoint(
  161. handle_t IDL_handle,
  162. LPCWSTR ResourceId,
  163. DWORD dwCheckpointId,
  164. LPCWSTR lpszQuorumPath,
  165. BOOL fCryptoCheckpoint
  166. );
  167. BOOL
  168. CppIsQuorumVolumeOffline(
  169. VOID
  170. );
  171. extern CRITICAL_SECTION CppNotifyLock;
  172. extern LIST_ENTRY CpNotifyListHead;