2 * Copyright (c) 2007-2008, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
13 extern int repo_add_rpmdb(Repo *repo, Repo *ref, int flags);
14 extern Id repo_add_rpm(Repo *repo, const char *rpm, int flags);
15 extern int repo_add_rpmdb_pubkeys(Repo *repo, int flags);
16 extern Id repo_add_pubkey(Repo *repo, const char *key, int flags);
18 #define RPMDB_REPORT_PROGRESS (1 << 8)
19 #define RPM_ADD_WITH_PKGID (1 << 9)
20 #define RPM_ADD_NO_FILELIST (1 << 10)
21 #define RPM_ADD_NO_RPMLIBREQS (1 << 11)
22 #define RPM_ADD_WITH_SHA1SUM (1 << 12)
23 #define RPM_ADD_WITH_SHA256SUM (1 << 13)
24 #define RPM_ADD_TRIGGERS (1 << 14)
25 #define RPM_ADD_WITH_HDRID (1 << 15)
26 #define RPM_ADD_WITH_LEADSIGID (1 << 16)
27 #define RPM_ADD_WITH_CHANGELOG (1 << 17)
29 #define RPM_ITERATE_FILELIST_ONLYDIRS (1 << 0)
30 #define RPM_ITERATE_FILELIST_WITHMD5 (1 << 1)
31 #define RPM_ITERATE_FILELIST_WITHCOL (1 << 2)
32 #define RPM_ITERATE_FILELIST_NOGHOSTS (1 << 3)
34 /* create and free internal state, rootdir is the rootdir of the rpm database */
35 extern void *rpm_state_create(Pool *pool, const char *rootdir);
36 extern void *rpm_state_free(void *rpmstate);
38 /* return all matching rpmdbids */
39 extern int rpm_installedrpmdbids(void *rpmstate, const char *index, const char *match, Queue *rpmdbidq);
41 /* return handles to a rpm header */
42 extern void *rpm_byrpmdbid(void *rpmstate, Id rpmdbid);
43 extern void *rpm_byfp(void *rpmstate, FILE *fp, const char *name);
44 extern void *rpm_byrpmh(void *rpmstate, struct headerToken_s *h);
46 /* operations on a rpm header handle */
56 extern char *rpm_query(void *rpmhandle, Id what);
57 extern void rpm_iterate_filelist(void *rpmhandle, int flags, void (*cb)(void *, const char *, struct filelistinfo *), void *cbdata);
58 extern Id repo_add_rpm_handle(Repo *repo, void *rpmhandle, int flags);