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
54 lines
915 B
#ifndef _CACHEDIR_HXX_
|
|
#define _CACHEDIR_HXX_
|
|
|
|
//
|
|
// Size of buffer for ReadDirectoryChangesW
|
|
//
|
|
|
|
#define DIRMON_BUFFER_SIZE 4096
|
|
|
|
//
|
|
// Number of times to try and get dir change notification
|
|
//
|
|
|
|
#define MAX_NOTIFICATION_FAILURES 3
|
|
|
|
class CacheDirMonitorEntry : public CDirMonitorEntry
|
|
{
|
|
public:
|
|
|
|
CacheDirMonitorEntry()
|
|
: _cNotificationFailures( 0 )
|
|
{
|
|
}
|
|
|
|
~CacheDirMonitorEntry()
|
|
{
|
|
}
|
|
|
|
BOOL
|
|
Init(
|
|
VOID
|
|
)
|
|
{
|
|
return CDirMonitorEntry::Init( DIRMON_BUFFER_SIZE );
|
|
}
|
|
|
|
private:
|
|
DWORD _cNotificationFailures;
|
|
|
|
BOOL
|
|
ActOnNotification(
|
|
DWORD dwStatus,
|
|
DWORD dwBytesWritten
|
|
);
|
|
|
|
VOID
|
|
FileChanged(
|
|
const WCHAR * pszScriptName,
|
|
BOOL bDoFlush
|
|
);
|
|
|
|
};
|
|
|
|
#endif
|