00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00028 #ifndef OW32_FileWatcher_h
00029 #define OW32_FileWatcher_h
00030
00031 #include <OW32/windows.h>
00032
00033 namespace OW32
00034 {
00035
00037 class OW32_LIB_EXPORT CIoCompletionThreadPool;
00038
00040 class OW32_LIB_EXPORT CFileWatch;
00041
00058 class OW32_LIB_EXPORT CFileWatcher
00059 {
00060 public:
00066 CFileWatcher(CIoCompletionThreadPool &ioCompletionPool);
00067
00071 ~CFileWatcher();
00072
00076 void cancel();
00077
00085 void startWatch(CFileWatch *watch, DWORD changesMask = FILE_NOTIFY_CHANGE_LAST_WRITE|FILE_NOTIFY_CHANGE_FILE_NAME);
00086
00092 void stopWatch(CFileWatch *watch);
00093
00094 private:
00095
00096 CFileWatcher(const CFileWatcher &other);
00097 CFileWatcher& operator=(const CFileWatcher &other);
00098
00099
00100
00101 friend class CFileWatchSet;
00102
00104 struct pimpl_;
00106 pimpl_ *m_impl;
00107 };
00108
00109 }
00110
00111 #endif // OW32_FileWatcher_h