ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
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 int fileXioInit(void);
38 void fileXioExit(void);
39 void fileXioSetBlockMode(int blocking);
40 int fileXioWaitAsync(int mode, int *retVal);
41 
42 void fileXioStop();
43 int fileXioGetDeviceList(struct fileXioDevice deviceEntry[], unsigned int req_entries);
44 int fileXioGetdir(const char* pathname, struct fileXioDirEntry DirEntry[], unsigned int req_entries);
45 int fileXioMount(const char* mountpoint, const char* blockdev, int flag);
46 int fileXioUmount(const char* mountpoint);
47 int fileXioCopyfile(const char* source, const char* dest, int mode);
48 int fileXioMkdir(const char* pathname, int mode);
49 int fileXioRmdir(const char* pathname);
50 int fileXioRemove(const char* pathname);
51 int fileXioRename(const char* source, const char* dest);
52 int fileXioSymlink(const char* source, const char* dest);
53 int fileXioReadlink(const char* source, char* buf, int buflen);
54 int fileXioChdir(const char* pathname);
55 int fileXioOpen(const char* source, int flags, ...);
56 int fileXioClose(int fd);
57 int fileXioRead(int fd, void *buf, int size);
58 int fileXioWrite(int fd, const void *buf, int size);
59 int fileXioLseek(int fd, int offset, int whence);
60 s64 fileXioLseek64(int fd, s64 offset, int whence);
61 int fileXioChStat(const char *name, iox_stat_t *stat, int mask);
62 int fileXioGetStat(const char *name, iox_stat_t *stat);
63 int fileXioFormat(const char *dev, const char *blockdev, const void *args, int arglen);
64 int fileXioSync(const char *devname, int flag);
65 int fileXioDopen(const char *name);
66 int fileXioDclose(int fd);
67 int fileXioDread(int fd, iox_dirent_t *dirent);
68 int fileXioDevctl(const char *name, int cmd, void *arg, unsigned int arglen, void *buf,unsigned int buflen);
69 int fileXioIoctl(int fd, int cmd, void *arg);
70 int fileXioIoctl2(int fd, int command, void *arg, unsigned int arglen, void *buf, unsigned int buflen);
71 int fileXioSetRWBufferSize(int size);
72 
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 #endif /* __FILEXIO_RPC_H__ */
int fileXioMkdir(const char *pathname, int mode)
Definition: fileXio_rpc.c:398
int fileXioDread(int fd, iox_dirent_t *dirent)
Definition: fileXio_rpc.c:948
void fileXioExit(void)
Definition: fileXio_rpc.c:237
int fileXioRename(const char *source, const char *dest)
Definition: fileXio_rpc.c:474
int fileXioChdir(const char *pathname)
Definition: fileXio_rpc.c:556
int fileXioSymlink(const char *source, const char *dest)
Definition: fileXio_rpc.c:500
int fileXioClose(int fd)
Definition: fileXio_rpc.c:612
int fileXioCopyfile(const char *source, const char *dest, int mode)
Definition: fileXio_rpc.c:371
int fileXioDevctl(const char *name, int cmd, void *arg, unsigned int arglen, void *buf, unsigned int buflen)
Definition: fileXio_rpc.c:986
int fileXioRead(int fd, void *buf, int size)
Definition: fileXio_rpc.c:647
int fileXioIoctl(int fd, int cmd, void *arg)
Definition: fileXio_rpc.c:1028
int fileXioRmdir(const char *pathname)
Definition: fileXio_rpc.c:424
int fileXioMount(const char *mountpoint, const char *blockdev, int flag)
Definition: fileXio_rpc.c:319
void fileXioSetBlockMode(int blocking)
Definition: fileXio_rpc.c:1132
int fileXioRemove(const char *pathname)
Definition: fileXio_rpc.c:449
void fileXioStop()
Definition: fileXio_rpc.c:250
int fileXioInit(void)
Definition: fileXio_rpc.c:176
int fileXioDclose(int fd)
Definition: fileXio_rpc.c:924
int fileXioSetRWBufferSize(int size)
Definition: fileXio_rpc.c:1137
int fileXioDopen(const char *name)
Definition: fileXio_rpc.c:900
int fileXioSync(const char *devname, int flag)
Definition: fileXio_rpc.c:874
s64 fileXioLseek64(int fd, s64 offset, int whence)
Definition: fileXio_rpc.c:750
int fileXioUmount(const char *mountpoint)
Definition: fileXio_rpc.c:346
int fileXioGetdir(const char *pathname, struct fileXioDirEntry DirEntry[], unsigned int req_entries)
Definition: fileXio_rpc.c:287
int fileXioReadlink(const char *source, char *buf, int buflen)
Definition: fileXio_rpc.c:526
int fileXioIoctl2(int fd, int command, void *arg, unsigned int arglen, void *buf, unsigned int buflen)
Definition: fileXio_rpc.c:1055
int fileXioOpen(const char *source, int flags,...)
Definition: fileXio_rpc.c:581
int fileXioWrite(int fd, const void *buf, int size)
Definition: fileXio_rpc.c:678
int fileXioGetStat(const char *name, iox_stat_t *stat)
Definition: fileXio_rpc.c:814
int fileXioLseek(int fd, int offset, int whence)
Definition: fileXio_rpc.c:720
int fileXioFormat(const char *dev, const char *blockdev, const void *args, int arglen)
Definition: fileXio_rpc.c:843
int fileXioWaitAsync(int mode, int *retVal)
Definition: fileXio_rpc.c:1096
int fileXioGetDeviceList(struct fileXioDevice deviceEntry[], unsigned int req_entries)
Definition: fileXio_rpc.c:260
int fileXioChStat(const char *name, iox_stat_t *stat, int mask)
Definition: fileXio_rpc.c:784
s32 command
Definition: libpad.c:156
s32 mode
Definition: rpc_client.c:15
signed long s64
Definition: tamtypes.h:62