mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 04:13:32 +00:00
URLs are getting old. We have to update URLs for documentation purpose. JIRA issue: CORE-19963 - Refresh old URLs. - Add " (DEAD_LINK)" labels to dead links. - Use MS Learn links rather than MSDN ones. - Some dead links revived by Web Archive. - Don't change Wine Tests and Wine Sync. - Don't change 3rd party libraries. - Don't append "redirected" labels.
42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
/*
|
|
* PROJECT: shell32
|
|
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
|
* PURPOSE: Shell change notification
|
|
* COPYRIGHT: Copyright 2020 Katayama Hirofumi MZ ([email protected])
|
|
*/
|
|
#pragma once
|
|
|
|
#include "CDirectoryList.h"
|
|
|
|
// NOTE: Regard to asynchronous procedure call (APC), please see:
|
|
// https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-sleepex
|
|
|
|
class CDirectoryWatcher
|
|
{
|
|
public:
|
|
HANDLE m_hDirectory;
|
|
WCHAR m_szDirectoryPath[MAX_PATH];
|
|
|
|
static CDirectoryWatcher *Create(HWND hNotifyWnd, LPCWSTR pszDirectoryPath, BOOL fSubTree);
|
|
static void RequestAllWatchersTermination();
|
|
~CDirectoryWatcher();
|
|
|
|
BOOL IsDead();
|
|
BOOL RestartWatching();
|
|
void QuitWatching();
|
|
BOOL RequestAddWatcher();
|
|
BOOL RequestTermination();
|
|
void ReadCompletion(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered);
|
|
|
|
protected:
|
|
HWND m_hNotifyWnd;
|
|
BOOL m_fDead;
|
|
BOOL m_fRecursive;
|
|
CDirectoryList m_dir_list;
|
|
OVERLAPPED m_overlapped;
|
|
|
|
BOOL CreateAPCThread();
|
|
void ProcessNotification();
|
|
CDirectoryWatcher(HWND hNotifyWnd, LPCWSTR pszDirectoryPath, BOOL fSubTree);
|
|
};
|