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