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.

70 lines
1.9 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Copyright (C) Microsoft Corporation, 1991 - 1997
  4. //
  5. // File: flushnot.hxx
  6. //
  7. // Contents: Flush notification class
  8. //
  9. // Classes: CChangesFlushNotifyItem
  10. //
  11. // History: 07-May-97 SitaramR Added Header
  12. //
  13. //----------------------------------------------------------------------------
  14. #pragma once
  15. //+---------------------------------------------------------------------------
  16. //
  17. // Class: CChangesFlushNotifyItem
  18. //
  19. // Purpose: A work item that will be used by an async thread to notify
  20. // a changelog flush to the client.
  21. //
  22. // History: 1-27-97 srikants Created
  23. //
  24. //----------------------------------------------------------------------------
  25. class CChangesFlushNotifyItem : public CDoubleLink
  26. {
  27. public:
  28. CChangesFlushNotifyItem( FILETIME const & ftFlush,
  29. ULONG cEntries,
  30. USN_FLUSH_INFO ** ppInfo )
  31. : _ftFlush( ftFlush )
  32. {
  33. Win4Assert( ppInfo != 0 );
  34. for ( unsigned i=0; i<cEntries; i++ )
  35. {
  36. USN_FLUSH_INFO *pUsnInfo = new USN_FLUSH_INFO( *ppInfo[i] );
  37. _aUsnFlushInfo.Add( pUsnInfo, i );
  38. }
  39. Close();
  40. }
  41. virtual ~CChangesFlushNotifyItem()
  42. {
  43. Win4Assert( IsSingle() );
  44. }
  45. USN_FLUSH_INFO const * const * GetFlushInfo() const
  46. {
  47. return (USN_FLUSH_INFO const * const *) _aUsnFlushInfo.GetPointer();
  48. }
  49. ULONG GetCount() const { return _aUsnFlushInfo.Count(); }
  50. FILETIME const & GetFlushTime() const { return _ftFlush; }
  51. private:
  52. FILETIME _ftFlush;
  53. CCountedDynArray<USN_FLUSH_INFO> _aUsnFlushInfo;
  54. };
  55. typedef class TDoubleList<CChangesFlushNotifyItem> CChangesNotifyFlushList;