forked from adlerosn/cicpoffs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cicpoffs.hpp
73 lines (69 loc) · 4.32 KB
/
cicpoffs.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* MIT License
*
* Copyright (c) 2020 Adler Neves <adlerosn@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#pragma once
#define FUSE_USE_VERSION 31
#include <fuse.h>
// https://www.cs.hmc.edu/~geoff/classes/hmc.cs135.201001/homework/fuse/fuse_doc.html
void* (fuse_fn_init) (struct fuse_conn_info*, struct fuse_config*);
void (fuse_fn_destroy) (void*);
int (fuse_fn_getattr) (const char*, struct stat*, struct fuse_file_info*);
int (fuse_fn_readlink) (const char*, char*, size_t);
int (fuse_fn_mknod) (const char*, mode_t, dev_t);
int (fuse_fn_mkdir) (const char*, mode_t);
int (fuse_fn_unlink) (const char*);
int (fuse_fn_rmdir) (const char*);
int (fuse_fn_symlink) (const char*, const char*);
int (fuse_fn_rename) (const char*, const char*, unsigned int);
int (fuse_fn_link) (const char*, const char*);
int (fuse_fn_chmod) (const char*, mode_t, struct fuse_file_info*);
int (fuse_fn_chown) (const char*, uid_t, gid_t, struct fuse_file_info*);
int (fuse_fn_truncate) (const char*, off_t, struct fuse_file_info*);
//int (fuse_fn_utime) (const char*, struct utimbuf*);
int (fuse_fn_open) (const char*, struct fuse_file_info*);
int (fuse_fn_read) (const char*, char*, size_t, off_t, struct fuse_file_info*);
int (fuse_fn_write) (const char*, const char*, size_t, off_t, struct fuse_file_info*);
int (fuse_fn_statfs) (const char*, struct statvfs*);
int (fuse_fn_flush) (const char*, struct fuse_file_info*);
int (fuse_fn_release) (const char*, struct fuse_file_info*);
int (fuse_fn_fsync) (const char*, int, struct fuse_file_info*);
int (fuse_fn_setxattr) (const char*, const char*, const char*, size_t, int);
int (fuse_fn_getxattr) (const char*, const char*, char*, size_t);
int (fuse_fn_listxattr) (const char*, char*, size_t);
int (fuse_fn_removexattr) (const char*, const char*);
int (fuse_fn_opendir) (const char*, struct fuse_file_info*);
int (fuse_fn_readdir) (const char*, void*, fuse_fill_dir_t, off_t, struct fuse_file_info*, enum fuse_readdir_flags);
int (fuse_fn_releasedir) (const char*, struct fuse_file_info*);
int (fuse_fn_fsyncdir) (const char*, int, struct fuse_file_info*);
int (fuse_fn_access) (const char*, int);
int (fuse_fn_create) (const char*, mode_t, struct fuse_file_info*);
//int (fuse_fn_ftruncate) (const char*, off_t, struct fuse_file_info*);
//int (fuse_fn_fgetattr) (const char*, struct stat*, struct fuse_file_info*);
int (fuse_fn_lock) (const char*, struct fuse_file_info*, int, struct flock*);
int (fuse_fn_utimens) (const char*, const struct timespec[2], struct fuse_file_info*);
int (fuse_fn_bmap) (const char*, size_t, uint64_t*);
int (fuse_fn_ioctl) (const char*, int, void*, struct fuse_file_info*, unsigned int, void*);
int (fuse_fn_poll) (const char*, struct fuse_file_info*, struct fuse_pollhandle*, unsigned*);
int (fuse_fn_write_buf) (const char*, struct fuse_bufvec*, off_t, struct fuse_file_info*);
int (fuse_fn_read_buf) (const char*, struct fuse_bufvec**, size_t, off_t, struct fuse_file_info*);
int (fuse_fn_flock) (const char*, struct fuse_file_info*, int);
int (fuse_fn_fallocate) (const char*, int, off_t, off_t, struct fuse_file_info*);