ReactOS
0.4.16-dev-91-g764881a
CDirectoryWatcher.h
Go to the documentation of this file.
1
/*
2
* PROJECT: shell32
3
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4
* PURPOSE: Shell change notification
5
* COPYRIGHT: Copyright 2020 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
6
*/
7
#pragma once
8
9
#include "
CDirectoryList.h
"
10
11
// NOTE: Regard to asynchronous procedure call (APC), please see:
12
// https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-sleepex
13
14
class
CDirectoryWatcher
15
{
16
public
:
17
HANDLE
m_hDirectory
;
18
WCHAR
m_szDirectoryPath
[
MAX_PATH
];
19
20
static
CDirectoryWatcher
*
Create
(
HWND
hNotifyWnd,
LPCWSTR
pszDirectoryPath,
BOOL
fSubTree);
21
static
void
RequestAllWatchersTermination
();
22
~CDirectoryWatcher
();
23
24
BOOL
IsDead
();
25
BOOL
RestartWatching
();
26
void
QuitWatching
();
27
BOOL
RequestAddWatcher
();
28
BOOL
RequestTermination
();
29
void
ReadCompletion
(
DWORD
dwErrorCode,
DWORD
dwNumberOfBytesTransfered);
30
31
protected
:
32
HWND
m_hNotifyWnd
;
33
BOOL
m_fDead
;
34
BOOL
m_fRecursive
;
35
CDirectoryList
m_dir_list
;
36
OVERLAPPED
m_overlapped
;
37
38
BOOL
CreateAPCThread
();
39
void
ProcessNotification
();
40
CDirectoryWatcher
(
HWND
hNotifyWnd,
LPCWSTR
pszDirectoryPath,
BOOL
fSubTree);
41
};
CDirectoryList.h
Create
@ Create
Definition:
registry.c:563
CDirectoryList
Definition:
CDirectoryList.h:67
CDirectoryWatcher
Definition:
CDirectoryWatcher.h:15
CDirectoryWatcher::RequestTermination
BOOL RequestTermination()
Definition:
CDirectoryWatcher.cpp:360
CDirectoryWatcher::ReadCompletion
void ReadCompletion(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered)
Definition:
CDirectoryWatcher.cpp:235
CDirectoryWatcher::IsDead
BOOL IsDead()
Definition:
CDirectoryWatcher.cpp:391
CDirectoryWatcher::m_fDead
BOOL m_fDead
Definition:
CDirectoryWatcher.h:33
CDirectoryWatcher::m_fRecursive
BOOL m_fRecursive
Definition:
CDirectoryWatcher.h:34
CDirectoryWatcher::QuitWatching
void QuitWatching()
Definition:
CDirectoryWatcher.cpp:382
CDirectoryWatcher::RequestAllWatchersTermination
static void RequestAllWatchersTermination()
Definition:
CDirectoryWatcher.cpp:373
CDirectoryWatcher::m_overlapped
OVERLAPPED m_overlapped
Definition:
CDirectoryWatcher.h:36
CDirectoryWatcher::RestartWatching
BOOL RestartWatching()
Definition:
CDirectoryWatcher.cpp:306
CDirectoryWatcher::ProcessNotification
void ProcessNotification()
Definition:
CDirectoryWatcher.cpp:134
CDirectoryWatcher::m_hDirectory
HANDLE m_hDirectory
Definition:
CDirectoryWatcher.h:17
CDirectoryWatcher::~CDirectoryWatcher
~CDirectoryWatcher()
Definition:
CDirectoryWatcher.cpp:103
CDirectoryWatcher::m_hNotifyWnd
HWND m_hNotifyWnd
Definition:
CDirectoryWatcher.h:32
CDirectoryWatcher::RequestAddWatcher
BOOL RequestAddWatcher()
Definition:
CDirectoryWatcher.cpp:347
CDirectoryWatcher::m_szDirectoryPath
WCHAR m_szDirectoryPath[MAX_PATH]
Definition:
CDirectoryWatcher.h:18
CDirectoryWatcher::CreateAPCThread
BOOL CreateAPCThread()
Definition:
CDirectoryWatcher.cpp:335
CDirectoryWatcher::m_dir_list
CDirectoryList m_dir_list
Definition:
CDirectoryWatcher.h:35
MAX_PATH
#define MAX_PATH
Definition:
compat.h:34
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
void
Definition:
nsiface.idl:2307
_OVERLAPPED
Definition:
winbase.h:810
WCHAR
__wchar_t WCHAR
Definition:
xmlstorage.h:180
LPCWSTR
const WCHAR * LPCWSTR
Definition:
xmlstorage.h:185
dll
win32
shell32
shelldesktop
CDirectoryWatcher.h
Generated on Fri Oct 4 2024 06:04:52 for ReactOS by
1.9.6