00001
00002
00003
00004
00005 #ifndef __WVWATCHER_H
00006 #define __WVWATCHER_H
00007
00008 #include "wvfile.h"
00009 #include <sys/stat.h>
00010
00011 struct stat;
00012
00022 class WvFileWatcher : public WvFile
00023 {
00024 WvString filename;
00025 int openmode;
00026 bool once_ok;
00027 struct stat last_st;
00028 off_t fpos;
00029
00030 protected:
00031 bool make_ok(bool retry);
00032
00033 public:
00034 WvFileWatcher(const char *_filename, int _mode);
00035 virtual bool isok() const;
00036 virtual size_t uread(void *buf, size_t size);
00037 virtual size_t uwrite(const void *buf, size_t size);
00038 virtual bool pre_select(SelectInfo &si);
00039 };
00040
00041 #endif // __WVWATCHER_H