xref: /minix3/minix/lib/libvboxfs/proto.h (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1  /* Part of libvboxfs - (c) 2012, D.C. van Moolenbroek */
2  
3  #ifndef _VBOXFS_PROTO_H
4  #define _VBOXFS_PROTO_H
5  
6  /* attr.c */
7  void vboxfs_get_attr(struct sffs_attr *attr, vboxfs_objinfo_t *info);
8  int vboxfs_getattr(char *path, struct sffs_attr *attr);
9  int vboxfs_setattr(char *path, struct sffs_attr *attr);
10  
11  /* dir.c */
12  int vboxfs_opendir(char *path, sffs_dir_t *handle);
13  int vboxfs_readdir(sffs_dir_t handle, unsigned int index, char *buf,
14  	size_t size, struct sffs_attr *attr);
15  int vboxfs_closedir(sffs_dir_t handle);
16  
17  /* file.c */
18  int vboxfs_open(char *path, int flags, int mode, sffs_file_t *handle);
19  ssize_t vboxfs_read(sffs_file_t handle, char *buf, size_t size, u64_t pos);
20  ssize_t vboxfs_write(sffs_file_t handle, char *buf, size_t len, u64_t pos);
21  int vboxfs_close(sffs_file_t handle);
22  size_t vboxfs_buffer(char **ptr);
23  
24  /* handle.c */
25  int vboxfs_open_file(char *path, int flags, int mode, vboxfs_handle_t *handlep,
26  	vboxfs_objinfo_t *infop);
27  void vboxfs_close_file(vboxfs_handle_t handle);
28  
29  /* info.c */
30  int vboxfs_getset_info(vboxfs_handle_t handle, u32_t flags, void *data,
31  	size_t size);
32  int vboxfs_query_vol(char *path, vboxfs_volinfo_t *volinfo);
33  int vboxfs_queryvol(char *path, u64_t *free, u64_t *total);
34  
35  /* link.c */
36  int vboxfs_mkdir(char *path, int mode);
37  int vboxfs_unlink(char *path);
38  int vboxfs_rmdir(char *path);
39  int vboxfs_rename(char *opath, char *npath);
40  
41  /* path.c */
42  int vboxfs_set_path(vboxfs_path_t *path, char *name);
43  int vboxfs_get_path(vboxfs_path_t *path, char *name, size_t size);
44  size_t vboxfs_get_path_size(vboxfs_path_t *path);
45  
46  #endif /* !_VBOXFS_PROTO_H */
47