]> git.draconx.ca Git - liblbx.git/blob - src/lbx.h
Initial implementation of list and extract operations.
[liblbx.git] / src / lbx.h
1 #ifndef LBX_H_
2 #define LBX_H_
3
4 #include <stddef.h>
5
6 /* Errors */
7 enum {
8         LBX_ESUCCESS,
9         LBX_EMAGIC,
10         LBX_EEOF,
11         LBX_ERANGE,
12 };
13 extern int lbx_errno;
14
15 /* Opaque */
16 typedef struct lbx_state LBX;
17
18 struct lbx_statbuf {
19         const char *name;
20         size_t size;
21 };
22
23 /* Archive operations */
24 LBX   *lbx_fopen(FILE *, const char *);
25 LBX   *lbx_open(const char *);
26 void   lbx_close(LBX *);
27 size_t lbx_numfiles(LBX *);
28
29 /* File operations */
30 int    lbx_stat(LBX *, size_t, struct lbx_statbuf *);
31 size_t lbx_extract(LBX *, size_t, FILE *);
32
33 /* Misc operations */
34 const char *lbx_strerror(void);
35
36 #endif