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.

74 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name :
  4. aspdirmon.cpp
  5. Abstract:
  6. This module includes derivation of class supporting change
  7. notification for ASP template cache, from abstract class DIR_MON_ENTRY
  8. Author:
  9. Charles Grant ( cgrant ) June-1997
  10. Revision History:
  11. --*/
  12. #ifndef _CACHEDIRMON_H
  13. #define _CACHEDIRMON_H
  14. // ASP-customized file notification filter
  15. // see Winnt.h for valid flags, only valid for NT
  16. #define FILE_NOTIFY_FILTER (FILE_NOTIFY_CHANGE_FILE_NAME | \
  17. FILE_NOTIFY_CHANGE_DIR_NAME | \
  18. FILE_NOTIFY_CHANGE_ATTRIBUTES | \
  19. FILE_NOTIFY_CHANGE_SIZE | \
  20. FILE_NOTIFY_CHANGE_LAST_WRITE | \
  21. FILE_NOTIFY_CHANGE_SECURITY)
  22. // Number of times we will try to get request notification
  23. #define MAX_NOTIFICATION_FAILURES 3
  24. /************************************************************
  25. * Include Headers
  26. ************************************************************/
  27. # include "dirmon.h"
  28. # include "reftrace.h"
  29. class CASPDirMonitorEntry : public CDirMonitorEntry
  30. {
  31. private:
  32. DWORD m_cNotificationFailures;
  33. BOOL ActOnNotification(DWORD dwStatus, DWORD dwBytesWritten);
  34. void FileChanged(const TCHAR *pszScriptName, bool fFileWasRemoved);
  35. public:
  36. CASPDirMonitorEntry();
  37. ~CASPDirMonitorEntry();
  38. VOID AddRef(VOID);
  39. BOOL Release(VOID);
  40. BOOL FPathMonitored(LPCTSTR pszPath);
  41. // Trace Log info
  42. static PTRACE_LOG gm_pTraceLog;
  43. };
  44. BOOL RegisterASPDirMonitorEntry(LPCTSTR pszDirectory, CASPDirMonitorEntry **ppDME, BOOL fWatchSubDirs = FALSE);
  45. BOOL ConvertToLongFileName(const TCHAR *pszPath, const TCHAR *pszName, WIN32_FIND_DATA *pwfd);
  46. /*===================================================================
  47. Globals
  48. ===================================================================*/
  49. extern CDirMonitor *g_pDirMonitor;
  50. #endif /* _CACHEDIRMON_H */