2 This file is part of the "OCamlFuse" library.
4 OCamlFuse is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation (version 2 of the License).
8 OCamlFuse is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with OCamlFuse. See the file LICENSE. If you haven't received
15 a copy of the GNU General Public License, write to:
17 Free Software Foundation, Inc.,
18 59 Temple Place, Suite 330, Boston, MA
23 applejack@users.sf.net
27 quote
(h
,"#include <fuse.h>")
29 typedef [abstract
] void * fuse
;
30 quote
(mlmli
,"type fuse_operations")
31 quote
(mlmli
,"type fuse_cmd")
33 typedef [string] char * str
;
35 struct fuse_operation_names
{
36 [string,unique] char * getattr
;
37 [string,unique] char * readlink
;
38 [string,unique] char * readdir
;
39 [string,unique] char * opendir
;
40 [string,unique] char * releasedir
;
41 [string,unique] char * fsyncdir
;
42 [string,unique] char * mknod
;
43 [string,unique] char * mkdir
;
44 [string,unique] char * unlink
;
45 [string,unique] char * rmdir
;
46 [string,unique] char * symlink
;
47 [string,unique] char * rename
;
48 [string,unique] char * link
;
49 [string,unique] char * chmod
;
50 [string,unique] char * chown
;
51 [string,unique] char * truncate
;
52 [string,unique] char * utime
;
53 [string,unique,mlname
(fopen
)] char * open
;
54 [string,unique] char * read
;
55 [string,unique] char * write
;
56 [string,unique] char * statfs
;
57 [string,unique] char * flush
;
58 [string,unique] char * release
;
59 [string,unique] char * fsync
;
60 [string,unique] char * setxattr
;
61 [string,unique] char * getxattr
;
62 [string,unique] char * listxattr
;
63 [string,unique] char * removexattr
;
66 struct __fuse_context
{ /* TODO: what's the meaning of the private_data field? */
67 [ptr] struct fuse
*fuse
;
73 quote
(h
,"#define __fuse_context fuse_context");
74 quote
(h
,"#define __file_info file_info");
76 [ref] struct __fuse_context
* fuse_get_context
();
78 [ptr] struct fuse_operations
* get_fuse_operations
();
79 void set_fuse_operations
([ref] const struct fuse_operation_names
* op
);
81 [blocking
,ptr] struct fuse_cmd
* __fuse_read_cmd
([ptr,in] struct fuse
*f
);
82 [blocking
] void __fuse_process_cmd
([ptr] struct fuse
*f
,[ptr,in] struct fuse_cmd
*cmd
);
85 void ml_fuse_main
(int argc
,[size_is(argc
)] str argv
[],[ptr] const struct fuse_operations
*op
);
87 [blocking
] boolean __fuse_exited
([ptr] struct fuse
* f
);