gio-2.0: "address" parameter of Socket.receive_message() is optional
[vala-gnome.git] / vapi / fuse.vapi
blobd2c4b6c22fdf1101b9b4d475e7860f4feb17a3b7
1 /* fuse.vapi
2  *
3  * Copyright (C) 2009  Codethink Ltd.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
18  *
19  * Author:
20  *      John Carr <john.carr@unrouted.co.uk>
21  */
23 [CCode (cprefix = "fuse_", cheader_filename = "fuse/fuse.h")]
24 namespace Fuse {
25         [CCode (cname = "struct fuse_file_info", has_type_id = false)]
26         public struct FileInfo {
27                 public int flags;
28                 public ulong fh_old;
29                 public int writepage;
30                 public uint direct_io;
31                 public uint keep_cache;
32                 public uint flush;
33                 public uint padding;
34                 public uint64 fh;
35                 public uint64 lock_owner;
36         }
38         [CCode (cname = "struct fuse", has_type_id = false)]
39         public struct Fuse {
40         }
42         [CCode (cname = "struct fuse_context", has_type_id = false)]
43         public struct Context {
44                 Fuse fuse;
45                 Posix.uid_t uid;
46                 Posix.gid_t gid;
47                 /*Posix.pid_t pid;*/
48                 void *private_data;
49         }
51         [CCode (cname = "fuse_fill_dir_t", has_target = false)]
52         public delegate int FillDir (void* buf, string name, Posix.Stat? st, Posix.off_t offset);
54         [CCode (has_target = false)]
55         public delegate int GetAttr (string path, Posix.Stat* st);
56         [CCode (has_target = false)]
57         public delegate int Access (string path, int mask);
58         [CCode (has_target = false)]
59         public delegate int ReadLink (string path, char* buf, size_t size);
60         [CCode (has_target = false)]
61         public delegate int ReadDir (string path, void* buf, FillDir filler, Posix.off_t offset, ref FileInfo fi);
62         [CCode (has_target = false)]
63         public delegate int MkNod (string path, Posix.mode_t mode, Posix.dev_t rdev);
64         [CCode (has_target = false)]
65         public delegate int MkDir (string path, Posix.mode_t mode);
66         [CCode (has_target = false)]
67         public delegate int Unlink (string path);
68         [CCode (has_target = false)]
69         public delegate int RmDir (string path);
70         [CCode (has_target = false)]
71         public delegate int Symlink (string from, string to);
72         [CCode (has_target = false)]
73         public delegate int Rename (string from, string to);
74         [CCode (has_target = false)]
75         public delegate int Link (string from, string to);
76         [CCode (has_target = false)]
77         public delegate int Chmod (string path, Posix.mode_t mode);
78         [CCode (has_target = false)]
79         public delegate int Chown (string path, Posix.uid_t uid, Posix.gid_t gid);
80         [CCode (has_target = false)]
81         public delegate int Truncate (string path, Posix.off_t size);
82         [CCode (has_target = false)]
83         public delegate int Utimens (string path, Posix.timespec[] ts);
84         [CCode (has_target = false)]
85         public delegate int Create(string path, Posix.mode_t mode, ref FileInfo fi);
86         [CCode (has_target = false)]
87         public delegate int Open (string path, ref FileInfo fi);
88         [CCode (has_target = false)]
89         public delegate int Read (string path, char* buf, size_t size, Posix.off_t offset, ref FileInfo fi);
90         [CCode (has_target = false)]
91         public delegate int Write (string path, char* buf, size_t size, Posix.off_t offset, ref FileInfo fi);
92         [CCode (has_target = false)]
93         public delegate int StatFs (string path, Posix.statvfs *stbuf);
94         [CCode (has_target = false)]
95         public delegate int Release (string path, ref FileInfo fi);
96         [CCode (has_target = false)]
97         public delegate int Fsync (string path, int isdatasync, ref FileInfo fi);
99         [CCode (has_target = false)]
100         public delegate int SetXAttr (string path, string name, char* value, size_t size, int flags);
101         [CCode (has_target = false)]
102         public delegate int GetXAttr (string path, string name, char* value, size_t size);
103         [CCode (has_target = false)]
104         public delegate int ListXAttr (string path, char* list, size_t size);
105         [CCode (has_target = false)]
106         public delegate int RemoveXAttr (string path, string name);
108         [CCode (cname = "struct fuse_operations", has_type_id = false)]
109         public struct Operations {
110                 public GetAttr getattr;
111                 public Access access;
112                 public ReadLink readlink;
113                 public ReadDir readdir;
114                 public MkNod mknod;
115                 public MkDir mkdir;
116                 public Symlink symlink;
117                 public Unlink unlink;
118                 public RmDir rmdir;
119                 public Rename rename;
120                 public Link link;
121                 public Chmod chmod;
122                 public Chown chown;
123                 public Truncate truncate;
124                 public Utimens utimens;
125                 public Create create;
126                 public Open open;
127                 public Read read;
128                 public Write write;
129                 public StatFs statfs;
130                 public Release release;
131                 public Fsync fsync;
132                 public SetXAttr setxattr;
133                 public GetXAttr getxattr;
134                 public ListXAttr listxattr;
135                 public RemoveXAttr removexattr;
136         }
138         public int main ([CCode (array_length_pos = 0.9)] string[] args, Operations oper, void *user_data);
139         public Context get_context ();