Initial Commit
[Projects.git] / pkgbuilds / wiifuse / src / wiifuse-0.2.0 / server / source / fs_nand.h
blob3492d9c27be28976162faf04f3a8f52ca020baf1
1 /*
2 * Copyright (C) 2008 dhewg, #wiidev efnet
4 * this file is part of wiifuse
5 * http://wiibrew.org/index.php?title=Wiifuse
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef _FS_NAND_H_
23 #define _FS_NAND_H_
25 #include <gctypes.h>
27 #include "../../shared.h"
29 bool nand_init (u8 **data, u16 *data_size);
30 bool nand_deinit ();
32 enum remote_result nand_access (const char *filename, u8 mode);
33 enum remote_result nand_getattr (const char *filename,
34 struct remote_attr *attributes);
35 enum remote_result nand_open (const char *filename);
36 enum remote_result nand_read (const char *filename, const u64 offset,
37 u16 *size, u8 *buffer);
38 enum remote_result nand_opendir (const char *dirname);
39 enum remote_result nand_readdir (const char *dirname, u8 **data,
40 u16 *data_size);
42 enum remote_result nand_mkdir (const char *dirname, const u16 perms);
43 enum remote_result nand_rmdir (const char *dirname);
44 enum remote_result nand_write (const char *filename, const u64 offset,
45 u16 *size, u8 *buffer);
46 enum remote_result nand_create (const char *filename, const u16 perms);
47 enum remote_result nand_chown (const char *filename, const u32 uid,
48 const u32 gid);
49 enum remote_result nand_chmod (const char *filename, const u16 perms);
50 enum remote_result nand_rename (const char *src, const char *dst);
51 enum remote_result nand_unlink (const char *filename);
52 enum remote_result nand_statfs (const char *filename, u64 *bsize, u64 *blocks,
53 u64 *bfree, u64 *files, u64 *ffree);
55 #endif