X-Git-Url: https://pd.if.org/git/?p=zpackage;a=blobdiff_plain;f=zpm.h;h=b090b3ad50ce5bed6fbd071926c238c744942975;hp=fec1aee134963adcc4e3ee338311c6503d267017;hb=09c80a1f8918d888063f4d1a75921a99fe5f0b5c;hpb=f95bbd4578ad67bd09e925bd91da2b0ab159ef9c diff --git a/zpm.h b/zpm.h index fec1aee..b090b3a 100644 --- a/zpm.h +++ b/zpm.h @@ -7,9 +7,11 @@ #include #include #include +#include +#include -#include -#include +#include "sqlite3.h" +#include "lib/jsw/jsw_atree.h" #define ZPM_HASH_STRLEN 64 @@ -41,6 +43,14 @@ struct zpm { struct zpm_package *current_package; }; +struct zpm_stat { + struct stat st; + int configuration; + char hash[65]; /* length + room for a nul byte */ + char diskhash[65]; /* hash of actual file on disk */ + char *target; /* malloced link target */ +}; + struct zpm_dependency { char minpkg[ZPM_PACKAGE_ID_MAX+1]; char maxpkg[ZPM_PACKAGE_ID_MAX+1]; @@ -153,8 +163,9 @@ int zpm_package(struct zpm *zp, int n); /* get file information */ int zpm_stat(struct zpm *z, struct zpm_file *f, int n); -/* will also set the package context to the new package */ -int zpm_newpkg(struct zpm *z, char *base, char *version, int release); +//int zpm_newpkg(struct zpm *z, char *base, char *version, int release); +int zpm_create_package(struct zpm *zpm, char *name, char *ver, int rel); +int zpm_create_pkgid(struct zpm *zpm, char *pkgstr); /* transactions */ int zpm_begin(struct zpm *z);