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_FileWatch_h
00029 #define OW32_FileWatch_h
00030
00031 #include <stl/ci_string.h>
00032 #include <OW32/RefCounted.h>
00033 #include <OW32/SyncObjects.h>
00034
00035 namespace OW32
00036 {
00037
00039 class OW32_LIB_EXPORT CFileWatchCallback;
00040
00041 #ifdef _MSC_VER
00042 #pragma warning(disable: 4251)
00043 #endif
00044
00050 class OW32_LIB_EXPORT CFileWatch : public CRefCounted
00051 {
00052 public:
00059 CFileWatch(LPCWSTR fileName, CFileWatchCallback *pCallback) :
00060 m_fileName(fileName),
00061 m_callback(pCallback)
00062 {
00063 }
00064
00068 virtual ~CFileWatch();
00069
00073 const ci_wstring& getFileName() const { return m_fileName; }
00074
00078 CFileWatchCallback* getCallback() const { return m_callback; }
00079
00080 private:
00082 ci_wstring m_fileName;
00084 CFileWatchCallback *m_callback;
00085 };
00086
00087 #ifdef _MSC_VER
00088 #pragma warning(default: 4251)
00089 #endif
00090
00092 typedef CAutoRefCountedPtr<CFileWatch> CFileWatchPtr;
00093
00094 }
00095
00096 #endif // OW32_FileWatch_h