summaryrefslogtreecommitdiffstats
path: root/glusterfs-guts/src/guts-lowlevel.h
blob: 0061d0c2357842bb13be8e6952192bc246a938cb (plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
   Copyright (c) 2008-2009 Z RESEARCH, Inc. <http://www.zresearch.com>
   This file is part of GlusterFS.

   GlusterFS is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published
   by the Free Software Foundation; either version 3 of the License,
   or (at your option) any later version.

   GlusterFS is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _GUTS_LOWLEVEL_H_
#define _GUTS_LOWLEVEL_H_

int
guts_reply_err (fuse_req_t req,
		int err);

int
guts_reply_none (fuse_req_t req);

int
guts_reply_entry (fuse_req_t req,
		  const struct fuse_entry_param *e);

int
guts_reply_create (fuse_req_t req, 
		   const struct fuse_entry_param *e,
		   const struct fuse_file_info *f);

int
guts_reply_attr (fuse_req_t req,
		 const struct stat *attr,
		 double attr_timeout);

int
guts_reply_readlink (fuse_req_t req,
		     const char *linkname);

int
guts_reply_open (fuse_req_t req,
		 const struct fuse_file_info *f);

int
guts_reply_write (fuse_req_t req,
		  size_t count);

int
guts_reply_buf (fuse_req_t req,
		const char *buf,
		size_t size);

int
guts_reply_statfs (fuse_req_t req,
		   const struct statvfs *stbuf);

int
guts_reply_xattr (fuse_req_t req,
		  size_t count);

int
guts_reply_lock (fuse_req_t req,
		 struct flock *lock);

/* exploiting the macros to reduce coding work ;) */
#define fuse_reply_entry    guts_reply_entry
#define fuse_reply_err      guts_reply_err
#define fuse_reply_none     guts_reply_none
#define fuse_reply_attr     guts_reply_attr
#define fuse_reply_open     guts_reply_open
#define fuse_reply_readlink guts_reply_readlink
#define fuse_reply_create   guts_reply_create
#define fuse_reply_write    guts_reply_write
#define fuse_reply_buf      guts_reply_buf
#define fuse_reply_statfs   guts_reply_statfs
#define fuse_reply_xattr    guts_reply_xattr
#define fuse_reply_lock     guts_reply_lock

#endif