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.

90 lines
3.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: DIRSTK.HXX
  7. //
  8. // Contents: Directory entry stack
  9. //
  10. // History: 07-Aug-92 KyleP Added header
  11. //
  12. //--------------------------------------------------------------------------
  13. #pragma once
  14. //+-------------------------------------------------------------------------
  15. //
  16. // Class: CDirStackEntry
  17. //
  18. // Purpose: Directory entry to be pushed onto a stack
  19. //
  20. // History: 20-Jun-95 SitaramR Created
  21. //
  22. //--------------------------------------------------------------------------
  23. class CDirStackEntry
  24. {
  25. public:
  26. CDirStackEntry( const CFunnyPath & funnyPath,
  27. ULONG numHighValue,
  28. ULONG numLowValue,
  29. BOOL fDeep,
  30. WCHAR const * pwcsVRoot = 0,
  31. unsigned ccVRoot = 0,
  32. unsigned ccReplacePRoot = 0 );
  33. CDirStackEntry( const WCHAR * pwcPath,
  34. unsigned ccPath,
  35. ULONG numHighValue,
  36. ULONG numLowValue,
  37. BOOL fDeep,
  38. WCHAR const * pwcsVRoot = 0,
  39. unsigned ccVRoot = 0,
  40. unsigned ccReplacePRoot = 0 );
  41. CDirStackEntry( UNICODE_STRING const * path,
  42. UNICODE_STRING const * file,
  43. ULONG numHighValue,
  44. ULONG numLowValue,
  45. BOOL fDeep,
  46. CDirStackEntry * pParent = 0 );
  47. CFunnyPath & GetFileName () { return _funnyPath; }
  48. unsigned FileNameLength() const { return _funnyPath.GetLength(); }
  49. ULONG GetHighValue () const { return _numHighValue; }
  50. ULONG GetLowValue () const { return _numLowValue; }
  51. void SetHighValue( ULONG val ) { _numHighValue = val; }
  52. void SetLowValue( ULONG val ) { _numLowValue = val; }
  53. WCHAR const * GetVirtualRoot() { return _xwcsVirtualRoot.GetPointer(); }
  54. unsigned VirtualRootLength() { return _ccVirtualRoot; }
  55. unsigned ReplaceLength() { return _ccReplacePhysRoot; }
  56. BOOL isVirtual() { return 0 != _xwcsVirtualRoot.GetPointer(); }
  57. BOOL isDeep() { return _fDeep; }
  58. BOOL IsRangeOK() { return _numHighValue >= _numLowValue; }
  59. private:
  60. ULONG _numHighValue; // numerator's high watermark
  61. ULONG _numLowValue; // numerator's low watermark
  62. BOOL _fDeep; // TRUE if a deep pquery
  63. //
  64. // For virtual roots
  65. //
  66. XPtrST<WCHAR> _xwcsVirtualRoot; // Virtual root corresponding to physical root
  67. unsigned _ccVirtualRoot; // Size of _pwcsVirtualRoot
  68. unsigned _ccReplacePhysRoot; // Number of characters of physical root to replace
  69. CFunnyPath _funnyPath;
  70. };
  71. DECL_DYNSTACK( CDirStack, CDirStackEntry )