CernVM-FS  2.13.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
file_watcher_kqueue.h
Go to the documentation of this file.
1 
5 #ifdef __APPLE__
6 #ifndef CVMFS_FILE_WATCHER_KQUEUE_H_
7 #define CVMFS_FILE_WATCHER_KQUEUE_H_
8 
9 #include <map>
10 #include <string>
11 
12 #include "file_watcher.h"
13 
14 namespace file_watcher {
15 
16 class FileWatcherKqueue : public FileWatcher {
17  public:
18  FileWatcherKqueue();
19  virtual ~FileWatcherKqueue();
20 
21  protected:
22  virtual bool RunEventLoop(const FileWatcher::HandlerMap &handler,
23  int read_pipe, int write_pipe);
24 
25  virtual int TryRegisterFilter(const std::string &file_path);
26 
27  private:
28  void RemoveFilter(int fd);
29 
30  int kq_;
31 };
32 
33 } // namespace file_watcher
34 
35 #endif // CVMFS_FILE_WATCHER_KQUEUE_H_
36 #endif // __APPLE__
std::map< std::string, EventHandler * > HandlerMap
Definition: file_watcher.h:62