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