pspsdk-1.0+beta2
pspiofilemgr.h
Go to the documentation of this file.
1 /*
2  * PSP Software Development Kit - http://www.pspdev.org
3  * -----------------------------------------------------------------------
4  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5  *
6  * pspiofilemgr.h - Prototypes for the sceIo library.
7  *
8  * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
9  * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
10  * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
11  *
12  * $Id: pspiofilemgr.h 1884 2006-04-30 08:55:54Z chip $
13  */
14 #ifndef __FILEIO_H__
15 #define __FILEIO_H__
16 
17 #include <pspkerneltypes.h>
18 #include <pspiofilemgr_fcntl.h>
19 #include <pspiofilemgr_stat.h>
20 #include <pspiofilemgr_dirent.h>
21 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
32 
35 {
40 };
41 
63 SceUID sceIoOpen(const char *file, int flags, SceMode mode);
64 
73 SceUID sceIoOpenAsync(const char *file, int flags, SceMode mode);
74 
85 int sceIoClose(SceUID fd);
86 
93 int sceIoCloseAsync(SceUID fd);
94 
109 int sceIoRead(SceUID fd, void *data, SceSize size);
110 
125 int sceIoReadAsync(SceUID fd, void *data, SceSize size);
126 
141 int sceIoWrite(SceUID fd, const void *data, SceSize size);
142 
152 int sceIoWriteAsync(SceUID fd, const void *data, SceSize size);
153 
169 SceOff sceIoLseek(SceUID fd, SceOff offset, int whence);
170 
181 int sceIoLseekAsync(SceUID fd, SceOff offset, int whence);
182 
198 int sceIoLseek32(SceUID fd, int offset, int whence);
199 
210 int sceIoLseek32Async(SceUID fd, int offset, int whence);
211 
218 int sceIoRemove(const char *file);
219 
227 int sceIoMkdir(const char *dir, SceMode mode);
228 
235 int sceIoRmdir(const char *path);
236 
243 int sceIoChdir(const char *path);
244 
252 int sceIoRename(const char *oldname, const char *newname);
253 
267 SceUID sceIoDopen(const char *dirname);
268 
280 int sceIoDread(SceUID fd, SceIoDirent *dir);
281 
288 int sceIoDclose(SceUID fd);
289 
306 int sceIoDevctl(const char *dev, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
307 
325 int sceIoAssign(const char *dev1, const char *dev2, const char *dev3, int mode, void* unk1, long unk2);
326 
334 int sceIoUnassign(const char *dev);
335 
344 int sceIoGetstat(const char *file, SceIoStat *stat);
345 
355 int sceIoChstat(const char *file, SceIoStat *stat, int bits);
356 
368 int sceIoIoctl(SceUID fd, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
369 
381 int sceIoIoctlAsync(SceUID fd, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);
382 
389 int sceIoSync(const char *device, unsigned int unk);
390 
399 int sceIoWaitAsync(SceUID fd, SceInt64 *res);
400 
409 int sceIoWaitAsyncCB(SceUID fd, SceInt64 *res);
410 
419 int sceIoPollAsync(SceUID fd, SceInt64 *res);
420 
430 int sceIoGetAsyncStat(SceUID fd, int poll, SceInt64 *res);
431 
439 int sceIoCancel(SceUID fd);
440 
448 int sceIoGetDevType(SceUID fd);
449 
458 int sceIoChangeAsyncPriority(SceUID fd, int pri);
459 
469 int sceIoSetAsyncCallback(SceUID fd, SceUID cb, void *argp);
470 
473 #ifdef __cplusplus
474 }
475 #endif
476 
477 #endif