From: ewt Date: Wed, 27 Dec 1995 19:19:13 +0000 (+0000) Subject: added types for database access X-Git-Tag: tznext/4.11.0.1.tizen20130304~11862 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92ebd71318e3d8225f66e270bc893c440e7af25b;p=tools%2Flibrpm-tizen.git added types for database access CVS patchset: 98 CVS date: 1995/12/27 19:19:13 --- diff --git a/lib/rpmlib.h b/lib/rpmlib.h index b5f099d..c5c644a 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -3,6 +3,13 @@ /* This is the *only* module users of rpmlib should need to include */ +#include + +/* it shouldn't need these :-( */ +#include "dbindex.h" +#include "falloc.h" +#include "header.h" + /* these tags are for both the database and packages */ /* none of these can be 0 !! */ @@ -52,4 +59,23 @@ #define RPMFILE_CONFIG 1 #define RPMFILE_DOC 2 +struct rpmdb { + faFile pkgs; + dbIndex * nameIndex, * fileIndex, * groupIndex; +}; + +int rpmdbOpen (char * prefix, struct rpmdb *rpmdb, int mode, int perms); + /* 0 on error */ +int rpmdbCreate (struct rpmdb *rpmdb, int mode, int perms); + /* this fails if any part of the db already exists */ +void rpmdbClose (struct rpmdb *rpmdb); + +unsigned int rpmdbFirstRecNum(struct rpmdb * rpmdb); +unsigned int rpmdbNextRecNum(struct rpmdb * rpmdb, unsigned int lastOffset); + /* 0 at end */ + +Header rpmdbGetRecord(struct rpmdb * rpmdb, unsigned int offset); +int rpmdbFindByFile(struct rpmdb * rpmdb, char * filespec, + dbIndexSet * matches); + #endif