X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm.h;h=ea9cd6c96ec406073662475e9086a5648b0b72de;hb=090abacfef5458a521c154ba735f5b84cea3724d;hp=adc69bba4376d03459d656ac70bf5a05d20e1c7e;hpb=30aa9bfe1e9a0e682f7c942b8e68054551f14857;p=zpackage diff --git a/zpm.h b/zpm.h index adc69bb..ea9cd6c 100644 --- a/zpm.h +++ b/zpm.h @@ -9,6 +9,7 @@ #include #include +#include #define ZPM_HASH_STRLEN 64 @@ -53,7 +54,7 @@ struct zpm_tag { struct zpm_package { struct zpm *zpm; - struct jsw_hash *ht; + struct jsw_hash_t *ht; /* char pointers are just pointers into the hash table */ /* integers/times and such are passed through atoi */ @@ -77,6 +78,9 @@ struct zpm_package { int zpm_parse_package(char *pstr, char *name, char *ver, int *rel); char *zpm_findpkg(struct zpm *zpm, char *pkgstr, char *where); +int zpm_findhash(struct zpm *zpm, char *find, char *dest); +char *zpm_findlib(struct zpm *zpm, char *soname, char *where); +int zpm_libraries_needed(struct zpm *zpm, char *pkgid, jsw_atree_t *list); int zpm_quote(char *value, char *dest, size_t n); struct zpm_file { @@ -180,6 +184,8 @@ void *data, char **errmsg); int zpm_script_hash(struct zpm *zpm, char *pkgstr, char *phase, char *hash); int zpm_script_set(struct zpm *zpm, char *pkgstr, char *phase, char *hash); +int zpm_foreach_script(struct zpm *zpm, char *pkgstr, char *stage, void *cbd, + int (*cb)(void *ud, const char *pkg, const char *stage, const char *hash)); int zpm_package_hash(struct zpm *zpm, char *pkgid, char *hash); int zpm_package_sethash(struct zpm *zpm, char *pkgid, char *hash); @@ -195,7 +201,7 @@ struct zpm *zpm_clearmem(struct zpm *zpm); struct zpm_note { int64_t id; - time_t ts; /* or timespec */ + char *ts; /* applications can parse it if they need to */ char *note; char *pkgid; char *path;