15#include <pspiofilemgr.h>
21#define STREAM_TYPE_MEM 0x01
22#define STREAM_TYPE_FILE 0x02
23#define STREAM_TYPE_AFILE 0x03
24#define STREAM_TYPE_BITS 0x04
25#define STREAM_TYPE_URL 0x05
26#define STREAM_TYPE_CON 0x06
29#define STREAM_TYPE_BUF 0x80
30#define STREAM_TYPE_ZIP 0x100
34#define STREAM_START 0x0
35#define STREAM_SET STREAM_START
41#define STREAM_RDONLY PSP_O_RDONLY
42#define STREAM_WRONLY PSP_O_WRONLY
43#define STREAM_RDWR PSP_O_RDWR
44#define STREAM_APPEND PSP_O_APPEND
45#define STREAM_CREATE PSP_O_CREAT
46#define STREAM_TRUNC PSP_O_TRUNC
48#define STREAM_RDONLY _O_RDONLY
49#define STREAM_WRONLY _O_WRONLY
50#define STREAM_RDWR _O_RDWR
51#define STREAM_APPEND _O_APPEND
52#define STREAM_CREATE _O_CREAT
53#define STREAM_TRUNC _O_TRUNC
56#define STREAM_ALL (STREAM_RDWR|STREAM_APPEND|STREAM_CREATE|STREAM_TRUNC)
60typedef stream* (*stream_open_func)(
char*, long );
61typedef int (*stream_close_func)(
stream* );
62typedef long (*stream_read_func)(
stream*,
void*,
unsigned long );
63typedef long (*stream_write_func)(
stream*,
void*,
unsigned long );
64typedef long (*stream_seek_func)(
stream*, long,
unsigned int );
65typedef long (*stream_tell_func)(
stream* );
75 stream_open_func open;
76 stream_close_func close;
77 stream_read_func read;
78 stream_write_func write;
79 stream_seek_func seek;
80 stream_tell_func tell;
116#define BFILE_WAIT_READ 1
117#define BFILE_WAIT_WRITE 2
118#define BFILE_WAIT_WRITEINCOMPLETE 4
121#define BFILE_BUFFER_SIZE (1024*128)
131 char data[BFILE_BUFFER_SIZE];
168 char data[BFILE_BUFFER_SIZE];
186 char inbuf[BFILE_BUFFER_SIZE];
187 char outbuf[BFILE_BUFFER_SIZE];
206stream* stream_fopen(
char* name,
long flags );
207stream* stream_afopen(
char* name,
long flags );
208stream* stream_mopen(
char* data,
long size );
209stream* stream_bopen(
char* data,
long size );
210stream* stream_uopen(
char* name,
long flags );
211stream* stream_open(
int type,
char* param1,
long param2 );
213stream* stream_zopen(
int type,
char* param1,
long param2 );
214stream* stream_bufopen(
int type,
char* param1,
long param2 );
217int stream_close(
stream* s );
220long stream_read(
stream* s,
void* buf,
unsigned long size );
223long stream_write(
stream* s,
void* buf,
unsigned long size );
226long stream_seek(
stream* s,
long offs,
unsigned int dir );
229long stream_tell(
stream* s );
232long stream_rewind(
stream* s );
235long stream_size(
stream* s );
238long stream_eos(
stream* s );
241long stream_type(
stream* s );
244char* stream_name(
stream* s );
251int stream_get_typeid();
255void* memcpy_vfpu(
void* dst,
void* src,
unsigned int size );
Definition: streams.h:123
Definition: streams.h:146
Definition: streams.h:163
Definition: streams.h:104
Definition: streams.h:200
Definition: streams.h:179