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.

80 lines
1.8 KiB

  1. //+------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997 - 1998.
  5. //
  6. // File: abortwid.hxx
  7. //
  8. // Contents: Tracks aborted wids that are not refiled
  9. //
  10. // Classes: CAbortedWids, CAbortedWidEntry
  11. //
  12. // History: 24-Feb-97 SitaramR Created
  13. //
  14. //-------------------------------------------------------------------
  15. #pragma once
  16. //+---------------------------------------------------------------------------
  17. //
  18. // Class: CAbortedWidEntry
  19. //
  20. // Purpose: Encapsulates the (wid,usn) info of a aborted wid
  21. //
  22. // History: 24-Feb-97 SitaramR Created
  23. //
  24. //----------------------------------------------------------------------------
  25. class CAbortedWidEntry
  26. {
  27. public:
  28. CAbortedWidEntry()
  29. : _wid(widInvalid),
  30. _usn(0)
  31. {
  32. }
  33. CAbortedWidEntry( WORKID wid, USN usn )
  34. : _wid(wid),
  35. _usn(usn)
  36. {
  37. }
  38. USN _usn;
  39. WORKID _wid;
  40. };
  41. //+---------------------------------------------------------------------------
  42. //
  43. // Class: CAbortedWids
  44. //
  45. // Purpose: Contains list of aborted wids
  46. //
  47. // History: 24-Feb-97 SitaramR Created
  48. //
  49. //----------------------------------------------------------------------------
  50. class CAbortedWids
  51. {
  52. public:
  53. CAbortedWids();
  54. void NoFailLokAddWid( WORKID wid, USN usn );
  55. void LokRemoveWid( WORKID wid, USN usn );
  56. BOOL LokIsWidAborted( WORKID wid, USN usn );
  57. void LokReserve( unsigned cDocuments );
  58. private:
  59. // Array of aborted wids. In push filtering, the number of aborted wids
  60. // should be small and hence a simple sequential array should be fine.
  61. CDynArrayInPlace<CAbortedWidEntry> _aAbortedWids;
  62. };