]> git.draconx.ca Git - upkg.git/blob - upkg.h
Implement parsing of old format name tables.
[upkg.git] / upkg.h
1 #ifndef UPKG_H_
2 #define UPKG_H_
3
4 #define UPKG_FLAG_ALLOW_DOWNLOAD  0x0001
5 #define UPKG_FLAG_CLIENT_OPTIONAL 0x0002
6 #define UPKG_FLAG_SERVER_ONLY     0x0004
7 #define UPKG_FLAG_BROKEN_LINKS    0x0008
8 #define UPKG_FLAG_INSECURE        0x0010
9 #define UPKG_FLAG_REQUIRED        0x8000
10
11 #define UPKG_HDR_MAGIC 0x9e2a83c1
12 #define UPKG_HDR_SIZE  36
13
14 struct upkg {
15         unsigned version, license;
16         unsigned long flags;
17
18         unsigned long name_count, export_count, import_count;
19
20         struct upkg_private *priv;
21 };
22
23 struct upkg *upkg_fopen(const char *path);
24 int upkg_close(struct upkg *pkg);
25 const char *upkg_get_name(struct upkg *pkg, unsigned long idx);
26
27 #endif