X-Git-Url: http://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/8ecf99dea1442f58a460c7eef60872ce5f5c94f1..84ff721b88b3c2bc9fa50f97e85cdba5e5d74e8d:/src/lbx.h diff --git a/src/lbx.h b/src/lbx.h index 563ef4e..a2ca456 100644 --- a/src/lbx.h +++ b/src/lbx.h @@ -1,25 +1,38 @@ #ifndef LBX_H_ #define LBX_H_ -#include +#include /* Errors */ enum { LBX_ESUCCESS, LBX_EMAGIC, LBX_EEOF, + LBX_ERANGE, + LBX_EFORMAT, }; extern int lbx_errno; /* Opaque */ typedef struct lbx_state LBX; -/* File operations */ -LBX *lbx_fopen(FILE *); +struct lbx_statbuf { + const char *name; + size_t size; +}; + +/* Archive operations */ +LBX *lbx_fopen(FILE *, const char *); +LBX *lbx_mopen(void *, size_t, const char *); LBX *lbx_open(const char *); void lbx_close(LBX *); size_t lbx_numfiles(LBX *); +/* File operations */ +int lbx_stat(LBX *, size_t, struct lbx_statbuf *); +size_t lbx_extract(LBX *, size_t, FILE *); +void *lbx_mmap(LBX *, size_t, size_t *); + /* Misc operations */ const char *lbx_strerror(void);