#define ZPM_PATH_MAX 256
#endif
+#define ZPM_LOCAL_DB "/var/lib/zpm/local.db"
+
#define ZPM_PACKAGE_NAME_MAX 191
#define ZPM_PACKAGE_VERSION_MAX 58
#define ZPM_PACKAGE_RELEASE_MAX 4
sqlite3 *db;
char *path; /* path to db file */
int error;
+ int dbresult;
+ char *dberrmsg;
char *errmsg;
char *pkgid;
struct zpm_package *current_package;
int zpm_exec(struct zpm *z, const char *sql, int(*callback)(void *, int, char **, char**), void *arg, char **errmsg);
-int zpm_foreach_path(struct zpm *zpm, char *pkgid,
+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_script_hash(struct zpm *zpm, char *pkgstr, char *phase, char *hash);
+int zpm_package_hash(struct zpm *zpm, char *pkgid, char *hash);
+int zpm_package_sethash(struct zpm *zpm, char *pkgid, char *hash);
sqlite3_stmt *zpm_dbquery(struct zpm *zpm, char *query, ...);
+struct zpm *zpm_clearmem(struct zpm *zpm);
#endif