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.

169 lines
3.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: prefix.hxx
  7. //
  8. // Contents: PREFIX table definition
  9. //
  10. // History: SethuR -- Implemented
  11. //--------------------------------------------------------------------------
  12. #ifndef __PREFIX_HXX__
  13. #define __PREFIX_HXX__
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. //+---------------------------------------------------------------------
  18. //
  19. // Struct: DFS_PREFIX_TABLE API.
  20. //
  21. // History:
  22. //
  23. // Notes: The following API's are provided for manipulating the
  24. // DFS_PREFIX_TABLE.
  25. //
  26. //----------------------------------------------------------------------
  27. struct _DFS_PREFIX_TABLE;
  28. extern
  29. NTSTATUS DfsInitializePrefixTable(struct _DFS_PREFIX_TABLE **ppTable,
  30. BOOLEAN fCaseSensitive,
  31. PVOID Lock);
  32. extern
  33. NTSTATUS DfsInsertInPrefixTableLocked(struct _DFS_PREFIX_TABLE *pTable,
  34. PUNICODE_STRING pPath,
  35. PVOID pData);
  36. extern
  37. NTSTATUS DfsRemoveFromPrefixTableLocked(struct _DFS_PREFIX_TABLE *pTable,
  38. PUNICODE_STRING pPath,
  39. PVOID pMatchingData );
  40. extern
  41. NTSTATUS DfsReplaceInPrefixTableLocked(struct _DFS_PREFIX_TABLE *pTable,
  42. PUNICODE_STRING pPath,
  43. PVOID pReplaceData,
  44. PVOID pMatchingData );
  45. extern
  46. NTSTATUS DfsFreePrefixTable(struct _DFS_PREFIX_TABLE *pTable);
  47. extern
  48. NTSTATUS DfsFindUnicodePrefixLocked(
  49. IN struct _DFS_PREFIX_TABLE *pTable,
  50. IN PUNICODE_STRING pPath,
  51. OUT PUNICODE_STRING pSuffix,
  52. OUT PVOID *ppData,
  53. OUT PBOOLEAN pSubStringMatch );
  54. extern
  55. NTSTATUS
  56. DfsPrefixTableAcquireWriteLock(
  57. struct _DFS_PREFIX_TABLE *pTable );
  58. extern
  59. NTSTATUS
  60. DfsPrefixTableAcquireReadLock(
  61. struct _DFS_PREFIX_TABLE *pTable );
  62. extern
  63. NTSTATUS
  64. DfsPrefixTableReleaseLock(
  65. struct _DFS_PREFIX_TABLE *pTable );
  66. extern NTSTATUS
  67. DfsPrefixTableInit(VOID);
  68. extern
  69. void
  70. DfsPrefixTableShutdown(void);
  71. VOID
  72. DfsDumpPrefixTable(
  73. struct _DFS_PREFIX_TABLE *pPrefixTable,
  74. IN VOID (*DumpFunction)(PVOID pEntry));
  75. VOID
  76. DfsProcessPrefixTable(
  77. struct _DFS_PREFIX_TABLE *pPrefixTable,
  78. IN VOID (*DumpFunction)(PVOID pEntry));
  79. NTSTATUS
  80. DfsDismantlePrefixTable(
  81. IN struct _DFS_PREFIX_TABLE *pTable,
  82. IN VOID (*ProcessFunction)(PVOID pEntry));
  83. NTSTATUS
  84. DfsDeletePrefixTable(
  85. struct _DFS_PREFIX_TABLE *pTable);
  86. NTSTATUS
  87. DfsInsertInPrefixTable(
  88. IN struct _DFS_PREFIX_TABLE *pTable,
  89. IN PUNICODE_STRING pPath,
  90. IN PVOID pData);
  91. NTSTATUS
  92. DfsFindUnicodePrefix(
  93. IN struct _DFS_PREFIX_TABLE *pTable,
  94. IN PUNICODE_STRING pPath,
  95. IN PUNICODE_STRING pSuffix,
  96. IN PVOID *ppData);
  97. NTSTATUS
  98. DfsRemoveFromPrefixTable(
  99. IN struct _DFS_PREFIX_TABLE *pTable,
  100. IN PUNICODE_STRING pPath,
  101. IN PVOID pMatchingData);
  102. NTSTATUS
  103. DfsReplaceInPrefixTable(
  104. IN struct _DFS_PREFIX_TABLE *pTable,
  105. IN PUNICODE_STRING pPath,
  106. IN PVOID pReplaceData,
  107. IN PVOID pMatchingData);
  108. NTSTATUS
  109. DfsRemoveFromPrefixTableEx(
  110. IN struct _DFS_PREFIX_TABLE * pTable,
  111. IN PUNICODE_STRING pPath,
  112. IN PVOID pMatchingData,
  113. IN PVOID *pReturnedData);
  114. NTSTATUS DfsRemoveFromPrefixTableLockedEx(
  115. IN struct _DFS_PREFIX_TABLE * pTable,
  116. IN PUNICODE_STRING pPath,
  117. IN PVOID pMatchingData,
  118. IN PVOID *pReturnedData);
  119. #ifdef WPP_CB_TYPE
  120. // only define this if we are doing tracing
  121. VOID
  122. PrefixSetTraceControl(WPP_CB_TYPE *Control);
  123. #endif
  124. #define DfsReferencePrefixTable(_pTable) \
  125. DfsIncrementReference((PDFS_OBJECT_HEADER)(_pTable))
  126. NTSTATUS
  127. DfsDereferencePrefixTable(struct _DFS_PREFIX_TABLE *pTable );
  128. #ifdef __cplusplus
  129. }
  130. #endif
  131. #endif // __PREFIX_HXX__