Strictly speaking, WvPam is not a stream. So move wvpam.cc to utils.
[wvapps.git] / funfs / wvfuseinomgr.h
bloba963309d947cec4a31d6d00b0f5d8eb83e72137d
1 #ifndef __WVFUSEINOMGR_H
2 #define __WVFUSEINOMGR_H
4 #include <wvhashtable.h>
5 #include <wvgdbmhash.h>
6 #include <wvstring.h>
7 #include <uniconf.h>
9 #ifndef FUSE_KERNEL_VERSION
10 #include <linux/fuse.h>
11 #endif
13 typedef unsigned long int fino_t;
15 class WvFuseInoMgr
17 public:
18 WvFuseInoMgr(UniConf &_cfg);
20 int get_fd(fino_t ino);
21 WvString get_path(fino_t ino);
22 fino_t get_ino_by_path(WvStringParm path);
23 fino_t get_ino_by_fd(int fd);
24 void add_fd(fino_t ino, int fd);
25 void remove_fd(fino_t ino);
27 protected:
28 fino_t next_ino();
30 static fino_t inoctr;
32 UniConf cfg;
33 WvMap<fino_t, int> fdmap;
34 WvGdbmHash<fino_t, WvString> ino_hash;
35 WvGdbmHash<WvString, fino_t> path_hash;
38 #endif