123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- PJ_BEGIN_DECL
- enum pj_file_access
- {
- PJ_O_RDONLY = 0x1101,
- PJ_O_WRONLY = 0x1102,
- PJ_O_RDWR = 0x1103,
- PJ_O_APPEND = 0x1108,
- PJ_O_CLOEXEC = 0x1104,
- };
- enum pj_file_seek_type
- {
- PJ_SEEK_SET = 0x1201,
- PJ_SEEK_CUR = 0x1202,
- PJ_SEEK_END = 0x1203
- };
- PJ_DECL(pj_status_t) pj_file_open(pj_pool_t *pool,
- const char *pathname,
- unsigned flags,
- pj_oshandle_t *fd);
- PJ_DECL(pj_status_t) pj_file_close(pj_oshandle_t fd);
- PJ_DECL(pj_status_t) pj_file_write(pj_oshandle_t fd,
- const void *data,
- pj_ssize_t *size);
- PJ_DECL(pj_status_t) pj_file_read(pj_oshandle_t fd,
- void *data,
- pj_ssize_t *size);
- PJ_DECL(pj_status_t) pj_file_setpos(pj_oshandle_t fd,
- pj_off_t offset,
- enum pj_file_seek_type whence);
- PJ_DECL(pj_status_t) pj_file_getpos(pj_oshandle_t fd,
- pj_off_t *pos);
- PJ_DECL(pj_status_t) pj_file_flush(pj_oshandle_t fd);
- PJ_END_DECL
|