- add checksum generation code
[platform/upstream/libsolv.git] / ext / repo_rpmdb.h
1 /*
2  * Copyright (c) 2007-2008, Novell Inc.
3  *
4  * This program is licensed under the BSD license, read LICENSE.BSD
5  * for further information
6  */
7
8 #include "queue.h"
9
10 extern void repo_add_rpmdb(Repo *repo, Repo *ref, const char *rootdir, int flags);
11 extern void repo_add_rpms(Repo *repo, const char **rpms, int nrpms, int flags);
12
13 #define RPMDB_REPORT_PROGRESS   (1 << 8)
14 #define RPM_ADD_WITH_PKGID      (1 << 9)
15 #define RPM_ADD_NO_FILELIST     (1 << 10)
16 #define RPM_ADD_NO_RPMLIBREQS   (1 << 11)
17 #define RPM_ADD_WITH_SHA1SUM    (1 << 12)
18 #define RPM_ADD_WITH_SHA256SUM  (1 << 13)
19
20 #define RPM_ITERATE_FILELIST_ONLYDIRS   (1 << 0)
21 #define RPM_ITERATE_FILELIST_WITHMD5    (1 << 1)
22
23 void *rpm_byrpmdbid(Id rpmdbid, const char *rootdir, void **statep);
24 void *rpm_byfp(FILE *fp, const char *name, void **statep);
25 void rpm_iterate_filelist(void *rpmhandle, int flags, void (*cb)(void *, const char *, int, const char *), void *cbdata);
26 int  rpm_installedrpmdbids(const char *rootdir, Queue *rpmdbidq);