/* Copyright (C) 2008 Emmanuel Varoquaux This file is part of XOS. This program 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. This program 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 . */ #ifndef VFAT_INSTANCE_H #define VFAT_INSTANCE_H struct vfat_instance_struct; struct device_struct; struct stat_struct; int vfat_instance_init(struct vfat_instance_struct *vfat_instance, const struct device_struct *device); void vfat_instance_destroy(struct vfat_instance_struct *vfat_instance); int vfat_instance_find(struct vfat_instance_struct *vfat_instance, unsigned long dir_id, const char *fs_basename, unsigned long *id, int *type); int vfat_instance_get_name(struct vfat_instance_struct *vfat_instance, unsigned long id, char name[]); int vfat_instance_get_size(struct vfat_instance_struct *vfat_instance, unsigned long reg_id, unsigned long *size); int vfat_instance_stat(struct vfat_instance_struct *vfat_instance, unsigned long id, struct stat_struct *fs_buf); int vfat_instance_read_dir(struct vfat_instance_struct *vfat_instance, unsigned long dir_id, unsigned long pos, char *fs_buf, unsigned int count); int vfat_instance_read(struct vfat_instance_struct *vfat_instance, unsigned long leaf_id, unsigned long pos, char *fs_buf, unsigned int count); int vfat_instance_write(struct vfat_instance_struct *vfat_instance, unsigned long leaf_id, unsigned long pos, const char *fs_buf, unsigned int count); int vfat_instance_create(struct vfat_instance_struct *vfat_instance, unsigned long dir_id, const char *fs_basename); int vfat_instance_mkdir(struct vfat_instance_struct *vfat_instance, unsigned long dir_id, const char *fs_basename); int vfat_instance_can_remove(struct vfat_instance_struct *vfat_instance, unsigned long leaf_id); int vfat_instance_remove(struct vfat_instance_struct *vfat_instance, unsigned long leaf_id, unsigned long parent_dir_id); int vfat_instance_rmdir(struct vfat_instance_struct *vfat_instance, unsigned long dir_id, unsigned long parent_dir_id); int vfat_instance_rename(struct vfat_instance_struct *vfat_instance, unsigned long old_id, unsigned long old_parent_dir_id, unsigned long new_dir_id, const char *fs_basename); #endif