PSP2SDK  dirty-f9e4f2d
The free SDK for PSP2
include/psp2/io/fcntl.h
Go to the documentation of this file.
00001 
00012 #ifndef _PSP2_IO_FCNTL_H_
00013 #define _PSP2_IO_FCNTL_H_
00014 
00015 #include <psp2/types.h>
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 
00021 /* Note: Not all of these sceIoOpen() flags are not compatible with the
00022    open() flags found in sys/unistd.h. */
00023 enum {
00024     PSP2_O_RDONLY   = 0x0001,
00025     PSP2_O_WRONLY   = 0x0002,
00026     PSP2_O_RDWR     = (PSP2_O_RDONLY | PSP2_O_WRONLY),
00027     PSP2_O_NBLOCK   = 0x0004,
00028     PSP2_O_DIROPEN  = 0x0008,  // Internal use for dopen
00029     PSP2_O_APPEND   = 0x0100,
00030     PSP2_O_CREAT    = 0x0200,
00031     PSP2_O_TRUNC    = 0x0400,
00032     PSP2_O_EXCL     = 0x0800,
00033     PSP2_O_NOWAIT   = 0x8000
00034 };
00035 
00036 enum {
00037     PSP2_SEEK_SET,
00038     PSP2_SEEK_CUR,
00039     PSP2_SEEK_END
00040 };
00041 
00063 SceUID sceIoOpen(const char *file, int flags, SceMode mode);
00064 
00073 SceUID sceIoOpenAsync(const char *file, int flags, SceMode mode);
00074 
00085 int sceIoClose(SceUID fd);
00086 
00093 int sceIoCloseAsync(SceUID fd);
00094 
00109 int sceIoRead(SceUID fd, void *data, SceSize size);
00110 
00125 int sceIoReadAsync(SceUID fd, void *data, SceSize size);
00126 
00141 int sceIoWrite(SceUID fd, const void *data, SceSize size);
00142 
00152 int sceIoWriteAsync(SceUID fd, const void *data, SceSize size);
00153 
00169 SceOff sceIoLseek(SceUID fd, SceOff offset, int whence);
00170 
00181 int sceIoLseekAsync(SceUID fd, SceOff offset, int whence);
00182 
00198 int sceIoLseek32(SceUID fd, int offset, int whence);
00199 
00210 int sceIoLseek32Async(SceUID fd, int offset, int whence);
00211 
00218 int sceIoRemove(const char *file);
00219 
00227 int sceIoRename(const char *oldname, const char *newname);
00228 
00235 int sceIoSync(const char *device, unsigned int unk);
00236 
00245 int sceIoWaitAsync(SceUID fd, SceInt64 *res);
00246 
00255 int sceIoWaitAsyncCB(SceUID fd, SceInt64 *res);
00256 
00265 int sceIoPollAsync(SceUID fd, SceInt64 *res);
00266 
00276 int sceIoGetAsyncStat(SceUID fd, int poll, SceInt64 *res);
00277 
00285 int sceIoCancel(SceUID fd);
00286 
00294 int sceIoGetDevType(SceUID fd);
00295 
00304 int sceIoChangeAsyncPriority(SceUID fd, int pri);
00305 
00315 int sceIoSetAsyncCallback(SceUID fd, SceUID cb, void *argp);
00316 
00317 #ifdef __cplusplus
00318 }
00319 #endif
00320 
00321 #endif /* _PSP2_IO_FCNTL_H_ */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines