From 113948c75c111b27d168719573d5c29c92e7dc0d Mon Sep 17 00:00:00 2001 From: jbj Date: Thu, 27 Apr 2000 01:11:48 +0000 Subject: Sanity and API clean up. (make dist) CVS patchset: 3705 CVS date: 2000/04/27 01:11:48 --- lib/rpmdb.h | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'lib/rpmdb.h') diff --git a/lib/rpmdb.h b/lib/rpmdb.h index 4a44ce9f0..7aacbac00 100644 --- a/lib/rpmdb.h +++ b/lib/rpmdb.h @@ -357,37 +357,43 @@ int dbiByteSwapped(dbiIndex dbi); char * db0basename(int rpmtag); /** - * Remove package header from rpm database and indices. - * @param rpmdb rpm database - * @param offset location in Packages dbi - * @param tolerant (legacy) print error messages? - * @return 0 on success */ -int rpmdbRemove(rpmdb db, unsigned int offset, int tolerant); +unsigned int rpmdbGetIteratorFileNum(rpmdbMatchIterator mi); /** - * Add package header to rpm database and indices. * @param rpmdb rpm database - * @param rpmtag rpm tag */ -int rpmdbAdd(rpmdb rpmdb, Header dbentry); +int rpmdbFindFpList(rpmdb rpmdb, fingerPrint * fpList, /*@out@*/dbiIndexSet * matchList, + int numItems); /** + * Destroy set of index database items. + * @param set set of index database items */ -unsigned int rpmdbGetIteratorFileNum(rpmdbMatchIterator mi); +void dbiFreeIndexSet(/*@only@*/ /*@null@*/ dbiIndexSet set); /** - * @param rpmdb rpm database + * Count items in index database set. + * @param set set of index database items + * @return number of items */ -int rpmdbFindFpList(rpmdb rpmdb, fingerPrint * fpList, /*@out@*/dbiIndexSet * matchList, - int numItems); +unsigned int dbiIndexSetCount(dbiIndexSet set); -/* XXX only for the benefit of runTransactions() */ /** - * @param rpmdb rpm database + * Return record offset of header from element in index database set. + * @param set set of index database items + * @param recno index of item in set + * @return record offset of header + */ +unsigned int dbiIndexRecordOffset(dbiIndexSet set, int recno); + +/** + * Return file index from element in index database set. + * @param set set of index database items + * @param recno index of item in set + * @return file index */ -int findMatches(rpmdb rpmdb, const char * name, const char * version, - const char * release, /*@out@*/ dbiIndexSet * matches); +unsigned int dbiIndexRecordFileNumber(dbiIndexSet set, int recno); #ifdef __cplusplus } -- cgit v1.2.3