mergerfs/libfuse/lib/fuse_i.h

76 lines
1.9 KiB
C
Raw Permalink Normal View History

/*
FUSE: Filesystem in Userspace
Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
This program can be distributed under the terms of the GNU LGPLv2.
See the file COPYING.LIB
*/
#pragma once
#include "fuse.h"
2025-10-25 18:21:18 -05:00
#include "fuse_lowlevel.hpp"
#include "fuse_msgbuf_t.h"
2022-11-29 17:24:09 -06:00
#include "extern_c.h"
struct fuse_chan;
struct fuse_ll;
2020-07-31 23:50:47 -04:00
struct fuse_session
{
int (*receive_buf)(struct fuse_session *se,
2022-11-29 17:24:09 -06:00
fuse_msgbuf_t *msgbuf);
2022-11-29 17:24:09 -06:00
void (*process_buf)(struct fuse_session *se,
const fuse_msgbuf_t *msgbuf);
void (*destroy)(void *data);
2020-07-31 23:50:47 -04:00
volatile int exited;
struct fuse_chan *ch;
};
2020-07-31 23:50:47 -04:00
struct fuse_notify_req
{
uint64_t unique;
void (*reply)(struct fuse_notify_req *,
fuse_req_t*,
uint64_t,
const void *);
2020-07-31 23:50:47 -04:00
struct fuse_notify_req *next;
struct fuse_notify_req *prev;
};
2022-11-29 17:24:09 -06:00
EXTERN_C_BEGIN
struct fuse *fuse_new_common(struct fuse_chan *ch,
struct fuse_args *args,
const struct fuse_operations *op);
struct fuse_chan *fuse_kern_chan_new(int fd);
struct fuse_session *fuse_lowlevel_new_common(struct fuse_args *args,
2020-07-31 23:50:47 -04:00
const struct fuse_lowlevel_ops *op,
size_t op_size, void *userdata);
int fuse_chan_clearfd(struct fuse_chan *ch);
void fuse_kern_unmount(const char *mountpoint, int fd);
int fuse_kern_mount(const char *mountpoint, struct fuse_args *args);
int fuse_send_reply_iov_nofree(fuse_req_t req, int error, struct iovec *iov,
int count);
void fuse_free_req(fuse_req_t req);
struct fuse *fuse_setup_common(int argc,
char *argv[],
const struct fuse_operations *op,
char **mountpoint,
int *fd);
int fuse_start_thread(pthread_t *thread_id, void *(*func)(void *), void *arg);
2022-11-29 17:24:09 -06:00
EXTERN_C_END