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.

172 lines
4.2 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. DfsInsertInPrefixTable(
  85. IN struct _DFS_PREFIX_TABLE *pTable,
  86. IN PUNICODE_STRING pPath,
  87. IN PVOID pData);
  88. NTSTATUS
  89. DfsFindUnicodePrefix(
  90. IN struct _DFS_PREFIX_TABLE *pTable,
  91. IN PUNICODE_STRING pPath,
  92. IN PUNICODE_STRING pSuffix,
  93. IN PVOID *ppData);
  94. NTSTATUS
  95. DfsRemoveFromPrefixTable(
  96. IN struct _DFS_PREFIX_TABLE *pTable,
  97. IN PUNICODE_STRING pPath,
  98. IN PVOID pMatchingData);
  99. NTSTATUS
  100. DfsReplaceInPrefixTable(
  101. IN struct _DFS_PREFIX_TABLE *pTable,
  102. IN PUNICODE_STRING pPath,
  103. IN PVOID pReplaceData,
  104. IN PVOID pMatchingData);
  105. NTSTATUS
  106. DfsRemoveFromPrefixTableEx(
  107. IN struct _DFS_PREFIX_TABLE * pTable,
  108. IN PUNICODE_STRING pPath,
  109. IN PVOID pMatchingData,
  110. IN PVOID *pReturnedData);
  111. NTSTATUS DfsRemoveFromPrefixTableLockedEx(
  112. IN struct _DFS_PREFIX_TABLE * pTable,
  113. IN PUNICODE_STRING pPath,
  114. IN PVOID pMatchingData,
  115. IN PVOID *pReturnedData);
  116. #ifdef WPP_CB_TYPE
  117. // only define this if we are doing tracing
  118. VOID
  119. PrefixSetTraceControl(WPP_CB_TYPE *Control);
  120. #endif
  121. #define DfsReferencePrefixTable(_pTable) \
  122. DfsIncrementReference((PDFS_OBJECT_HEADER)(_pTable))
  123. NTSTATUS
  124. DfsDereferencePrefixTable(struct _DFS_PREFIX_TABLE *pTable );
  125. NTSTATUS
  126. DfsEnumeratePrefixTableLocked(
  127. IN struct _DFS_PREFIX_TABLE *pNameTable,
  128. IN VOID (*pfnCallback)(LPVOID pEntry, LPVOID pContext),
  129. LPVOID lpvClientContext);
  130. #ifdef __cplusplus
  131. }
  132. #endif
  133. #endif // __PREFIX_HXX__