diff options
Diffstat (limited to 'lib/fuse_i.h')
-rw-r--r-- | lib/fuse_i.h | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/lib/fuse_i.h b/lib/fuse_i.h index ffcf062..5823743 100644 --- a/lib/fuse_i.h +++ b/lib/fuse_i.h @@ -13,21 +13,20 @@ struct fuse_chan; struct fuse_ll; struct fuse_session { - struct fuse_session_ops op; - - int (*receive_buf)(struct fuse_session *se, struct fuse_buf *buf, - struct fuse_chan **chp); - - void (*process_buf)(void *data, const struct fuse_buf *buf, - struct fuse_chan *ch); - - void *data; + struct fuse_ll *f; volatile int exited; struct fuse_chan *ch; }; +struct fuse_chan { + struct fuse_session *se; + + int fd; +}; + + struct fuse_req { struct fuse_ll *f; uint64_t unique; @@ -89,9 +88,35 @@ struct fuse_ll { int broken_splice_nonblock; uint64_t notify_ctr; struct fuse_notify_req notify_list; + size_t bufsize; }; -struct fuse_chan *fuse_kern_chan_new(int fd); +int fuse_chan_clearfd(struct fuse_chan *ch); +void fuse_chan_close(struct fuse_chan *ch); + +/** + * Create a new session + * + * @return new session object, or NULL on failure + */ +struct fuse_session *fuse_session_new(void); + +/** + * Create a new channel + * + * @param op channel operations + * @param fd file descriptor of the channel + * @return the new channel object, or NULL on failure + */ +struct fuse_chan *fuse_chan_new(int fd); + +/** + * Query the session to which this channel is assigned + * + * @param ch the channel + * @return the session, or NULL if the channel is not assigned + */ +struct fuse_session *fuse_chan_session(struct fuse_chan *ch); void fuse_kern_unmount(const char *mountpoint, int fd); int fuse_kern_mount(const char *mountpoint, struct fuse_args *args); |