]> pd.if.org Git - zpackage/blobdiff - zpm.h
add man pages
[zpackage] / zpm.h
diff --git a/zpm.h b/zpm.h
index f9e7b3391a8d725094e8127de6ba9f55a64c98d3..9be5f60aaffbf17c1e334b11a2896db6107417d6 100644 (file)
--- a/zpm.h
+++ b/zpm.h
@@ -9,6 +9,7 @@
 #include <sys/types.h>
 
 #include <sqlite3.h>
+#include <lib/jsw/jsw_atree.h>
 
 #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 */
@@ -76,7 +77,10 @@ struct zpm_package {
 };
 
 int zpm_parse_package(char *pstr, char *name, char *ver, int *rel);
-char *zpm_findpkg(struct zpm *zpm, char *pkgstr);
+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 {
@@ -174,9 +178,14 @@ int zpm_exec(struct zpm *z, const char *sql, int(*callback)(void *, int, char **
 int zpm_foreach_path(struct zpm *zpm, char *pkgid, char *where,
 int (*callback)(void *f, int ncols, char **vals, char **cols),
 void *data, char **errmsg);
+int zpm_foreach_package(struct zpm *zpm, char *where,
+int (*callback)(void *cbdata, int ncols, char **vals, char **cols),
+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);