HEAD: remove ridiculous dependency of wvmapi (actually wvtnef) on evolution
[wvapps.git] / funfs / wvfusecmd.h
blobd62052dd39837f1649ad57fbd19d0c1a8a24d053
1 /*
2 * WvFUSE: A WvStreams library for FUSE.
3 * Copyright (C) 2002 Net Integration Technologies, Inc.
5 * This program can be distributed under the terms of the GNU GPL.
6 * See the file COPYING.
8 * This class handles the processing of a single command from the kernel.
9 */
10 #ifndef __WVFUSECMD_H
11 #define __WVFUSECMD_H
13 #include "wvfusecbmgr.h"
15 #ifndef FUSE_KERNEL_VERSION
16 #include <linux/fuse.h>
17 #endif
19 #include <wvhashtable.h>
20 #include <wvstreamclone.h>
21 #include <wvlinklist.h>
22 #include <wvlog.h>
23 #include <wvstring.h>
25 class WvFS;
26 class WvFuse;
28 typedef unsigned long int fino_t;
30 class WvFuseCmd : public WvStreamClone
32 public:
33 WvFuseCmd(WvFuse *_fuse, WvFS *_fs, char *_cmd);
34 virtual ~WvFuseCmd();
36 virtual bool isok() const;
38 private:
39 WvFS *fs;
40 WvFuse *fuse;
41 fuse_in_header *in;
42 char *cmd;
43 void *inarg;
45 WvLog log;
46 bool ok;
48 WvString get_path(fino_t ino);
50 void send_reply(int error, void *arg, size_t argsize);
52 void do_forget();
53 void do_getattr();
54 void do_getdir();
55 void do_link();
56 void do_lookup();
57 void do_mkdir();
58 void do_mknod();
59 void do_open();
60 void do_release();
61 void do_read();
62 void do_readlink();
63 void do_remove();
64 void do_rename();
65 void do_setattr();
66 void do_statfs();
67 void do_symlink();
68 void do_write();
70 int do_chmod(fino_t ino, fuse_attr *attr);
71 int do_chown(fino_t ino, fuse_attr *attr, int valid);
72 int do_truncate(fino_t ino, fuse_attr *attr);
73 int do_utime(fino_t ino, fuse_attr *attr);
75 virtual void execute();
78 #endif // __WVFUSECMD_H