PS2SDK
PS2 Homebrew Libraries
fileXio_rpc.h
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
16 #ifndef __FILEXIO_RPC_H__
17 #define __FILEXIO_RPC_H__
18 
19 #include <fileXio.h>
20 #include <sys/stat.h>
21 
22 #ifndef NEWLIB_PORT_AWARE
23 #error "Using fio/fileXio functions directly in the newlib port will lead to problems."
24 #error "Use posix function calls instead."
25 #endif
26 
27 #define FXIO_WAIT 0
28 #define FXIO_NOWAIT 1
29 
30 #define FXIO_COMPLETE 1
31 #define FXIO_INCOMPLETE 0
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 extern int fileXioInit(void);
38 extern void fileXioExit(void);
39 extern void fileXioSetBlockMode(int blocking);
40 extern int fileXioWaitAsync(int mode, int *retVal);
41 
42 extern void fileXioStop();
43 extern int fileXioGetDeviceList(struct fileXioDevice deviceEntry[], unsigned int req_entries);
44 extern int fileXioGetdir(const char* pathname, struct fileXioDirEntry DirEntry[], unsigned int req_entries);
45 extern int fileXioMount(const char* mountpoint, const char* blockdev, int flag);
46 extern int fileXioUmount(const char* mountpoint);
47 extern int fileXioCopyfile(const char* source, const char* dest, int mode);
48 extern int fileXioMkdir(const char* pathname, int mode);
49 extern int fileXioRmdir(const char* pathname);
50 extern int fileXioRemove(const char* pathname);
51 extern int fileXioRename(const char* source, const char* dest);
52 extern int fileXioSymlink(const char* source, const char* dest);
53 extern int fileXioReadlink(const char* source, char* buf, unsigned int buflen);
54 extern int fileXioChdir(const char* pathname);
55 extern int fileXioOpen(const char* source, int flags, ...);
56 extern int fileXioClose(int fd);
57 extern int fileXioRead(int fd, void *buf, int size);
58 extern int fileXioWrite(int fd, const void *buf, int size);
59 extern int fileXioLseek(int fd, int offset, int whence);
60 extern s64 fileXioLseek64(int fd, s64 offset, int whence);
61 extern int fileXioChStat(const char *name, iox_stat_t *stat, int mask);
62 extern int fileXioGetStat(const char *name, iox_stat_t *stat);
63 extern int fileXioFormat(const char *dev, const char *blockdev, const void *args, int arglen);
64 extern int fileXioSync(const char *devname, int flag);
65 extern int fileXioDopen(const char *name);
66 extern int fileXioDclose(int fd);
67 extern int fileXioDread(int fd, iox_dirent_t *dirent);
68 extern int fileXioDevctl(const char *name, int cmd, void *arg, unsigned int arglen, void *buf,unsigned int buflen);
69 extern int fileXioIoctl(int fd, int cmd, void *arg);
70 extern int fileXioIoctl2(int fd, int command, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
71 extern int fileXioSetRWBufferSize(int size);
72 
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 #endif /* __FILEXIO_RPC_H__ */
iox_stat_t
Definition: iox_stat.h:92
fileXioDevice
Definition: fileXio.h:106
fileXioDirEntry
Definition: fileXio.h:99
fileXio.h
iox_dirent_t
Definition: iox_stat.h:111