X-Git-Url: https://git.draconx.ca/gitweb/upkg.git/blobdiff_plain/03072b0891e7d96690a6299864f6a738ae54038f..a6f1f69cc4874e2f2f878289bfc0f677220dfda9:/src/upkg.h diff --git a/src/upkg.h b/src/upkg.h index ab2dacb..775f918 100644 --- a/src/upkg.h +++ b/src/upkg.h @@ -44,6 +44,7 @@ struct upkg { unsigned version, license; + unsigned char guid[16]; unsigned long flags; unsigned long name_count, export_count, import_count; @@ -52,6 +53,10 @@ struct upkg { }; struct upkg_file { + const char *name; + + int eof; + struct upkg *pkg; unsigned long base, offset, len; }; @@ -61,9 +66,16 @@ int upkg_close(struct upkg *pkg); const char *upkg_get_name(struct upkg *pkg, unsigned long idx); +long upkg_export_find(struct upkg *pkg, const char *name); +const char *upkg_export_name(struct upkg *pkg, unsigned long idx); +const char *upkg_export_class(struct upkg *pkg, unsigned long idx, + const char **package); + struct upkg_file *upkg_export_open(struct upkg *pkg, unsigned long idx); size_t upkg_export_read(struct upkg_file *f, void *buf, size_t n); -void upkg_export_close(struct upkg_file *f); +int upkg_export_seek(struct upkg_file *f, long offset, int whence); +long upkg_export_tell(struct upkg_file *f); +void upkg_export_close(struct upkg_file *f); size_t upkg_decode_index(long *val, unsigned char *bytes, size_t n);