1433d6423SLionel Sambuc /* Part of libvboxfs - (c) 2012, D.C. van Moolenbroek */ 2433d6423SLionel Sambuc 3433d6423SLionel Sambuc #ifndef _VBOXFS_PROTO_H 4433d6423SLionel Sambuc #define _VBOXFS_PROTO_H 5433d6423SLionel Sambuc 6433d6423SLionel Sambuc /* attr.c */ 7433d6423SLionel Sambuc void vboxfs_get_attr(struct sffs_attr *attr, vboxfs_objinfo_t *info); 8*94e65446SDavid van Moolenbroek int vboxfs_getattr(const char *path, struct sffs_attr *attr); 9*94e65446SDavid van Moolenbroek int vboxfs_setattr(const char *path, struct sffs_attr *attr); 10433d6423SLionel Sambuc 11433d6423SLionel Sambuc /* dir.c */ 12*94e65446SDavid van Moolenbroek int vboxfs_opendir(const char *path, sffs_dir_t *handle); 13433d6423SLionel Sambuc int vboxfs_readdir(sffs_dir_t handle, unsigned int index, char *buf, 14433d6423SLionel Sambuc size_t size, struct sffs_attr *attr); 15433d6423SLionel Sambuc int vboxfs_closedir(sffs_dir_t handle); 16433d6423SLionel Sambuc 17433d6423SLionel Sambuc /* file.c */ 18*94e65446SDavid van Moolenbroek int vboxfs_open(const char *path, int flags, int mode, sffs_file_t *handle); 19433d6423SLionel Sambuc ssize_t vboxfs_read(sffs_file_t handle, char *buf, size_t size, u64_t pos); 20433d6423SLionel Sambuc ssize_t vboxfs_write(sffs_file_t handle, char *buf, size_t len, u64_t pos); 21433d6423SLionel Sambuc int vboxfs_close(sffs_file_t handle); 22433d6423SLionel Sambuc size_t vboxfs_buffer(char **ptr); 23433d6423SLionel Sambuc 24433d6423SLionel Sambuc /* handle.c */ 25*94e65446SDavid van Moolenbroek int vboxfs_open_file(const char *path, int flags, int mode, 26*94e65446SDavid van Moolenbroek vboxfs_handle_t *handlep, vboxfs_objinfo_t *infop); 27433d6423SLionel Sambuc void vboxfs_close_file(vboxfs_handle_t handle); 28433d6423SLionel Sambuc 29433d6423SLionel Sambuc /* info.c */ 30433d6423SLionel Sambuc int vboxfs_getset_info(vboxfs_handle_t handle, u32_t flags, void *data, 31433d6423SLionel Sambuc size_t size); 32*94e65446SDavid van Moolenbroek int vboxfs_query_vol(const char *path, vboxfs_volinfo_t *volinfo); 33*94e65446SDavid van Moolenbroek int vboxfs_queryvol(const char *path, u64_t *free, u64_t *total); 34433d6423SLionel Sambuc 35433d6423SLionel Sambuc /* link.c */ 36*94e65446SDavid van Moolenbroek int vboxfs_mkdir(const char *path, int mode); 37*94e65446SDavid van Moolenbroek int vboxfs_unlink(const char *path); 38*94e65446SDavid van Moolenbroek int vboxfs_rmdir(const char *path); 39*94e65446SDavid van Moolenbroek int vboxfs_rename(const char *opath, const char *npath); 40433d6423SLionel Sambuc 41433d6423SLionel Sambuc /* path.c */ 42*94e65446SDavid van Moolenbroek int vboxfs_set_path(vboxfs_path_t *path, const char *name); 43433d6423SLionel Sambuc int vboxfs_get_path(vboxfs_path_t *path, char *name, size_t size); 44433d6423SLionel Sambuc size_t vboxfs_get_path_size(vboxfs_path_t *path); 45433d6423SLionel Sambuc 46433d6423SLionel Sambuc #endif /* !_VBOXFS_PROTO_H */ 47