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.

54 lines
915 B

  1. #ifndef _CACHEDIR_HXX_
  2. #define _CACHEDIR_HXX_
  3. //
  4. // Size of buffer for ReadDirectoryChangesW
  5. //
  6. #define DIRMON_BUFFER_SIZE 4096
  7. //
  8. // Number of times to try and get dir change notification
  9. //
  10. #define MAX_NOTIFICATION_FAILURES 3
  11. class CacheDirMonitorEntry : public CDirMonitorEntry
  12. {
  13. public:
  14. CacheDirMonitorEntry()
  15. : _cNotificationFailures( 0 )
  16. {
  17. }
  18. ~CacheDirMonitorEntry()
  19. {
  20. }
  21. BOOL
  22. Init(
  23. VOID
  24. )
  25. {
  26. return CDirMonitorEntry::Init( DIRMON_BUFFER_SIZE );
  27. }
  28. private:
  29. DWORD _cNotificationFailures;
  30. BOOL
  31. ActOnNotification(
  32. DWORD dwStatus,
  33. DWORD dwBytesWritten
  34. );
  35. VOID
  36. FileChanged(
  37. const WCHAR * pszScriptName,
  38. BOOL bDoFlush
  39. );
  40. };
  41. #endif