24 #include <ibrcommon/data/File.h>
25 #include <ibrcommon/net/vsocket.h>
26 #include <ibrcommon/net/socket.h>
29 #ifndef FILEMONITOR_H_
30 #define FILEMONITOR_H_
42 virtual void up()
throw (ibrcommon::socket_exception);
43 virtual void down()
throw (ibrcommon::socket_exception);
45 void watch(
const ibrcommon::File &path,
int opts)
throw (ibrcommon::socket_exception);
47 ssize_t
read(
char *data,
size_t len)
throw (ibrcommon::socket_exception);
51 typedef std::map<int, ibrcommon::File> watch_map;
63 const std::string
getName()
const;
74 bool isActive(
const ibrcommon::File &path)
const;
76 void adopt(
const ibrcommon::File &path);
78 ibrcommon::File _watch;
79 ibrcommon::vsocket _socket;
81 typedef std::set<ibrcommon::File> watch_set;
86 std::map<ibrcommon::File, dtn::core::Node> _active_paths;
void watch(const ibrcommon::File &path, int opts)
void watch(const ibrcommon::File &watch)
ssize_t read(char *data, size_t len)
const std::string getName() const