rpm
4.10.0
|
00001 #ifndef H_RPMDB 00002 #define H_RPMDB 00003 00009 #include <rpm/rpmtypes.h> 00010 #include <rpm/rpmsw.h> 00011 00012 #ifdef __cplusplus 00013 extern "C" { 00014 #endif 00015 00019 typedef enum rpmMireMode_e { 00020 RPMMIRE_DEFAULT = 0, 00021 RPMMIRE_STRCMP = 1, 00022 RPMMIRE_REGEX = 2, 00023 RPMMIRE_GLOB = 3 00024 } rpmMireMode; 00025 00026 typedef enum rpmdbOpX_e { 00027 RPMDB_OP_DBGET = 1, 00028 RPMDB_OP_DBPUT = 2, 00029 RPMDB_OP_DBDEL = 3, 00030 RPMDB_OP_MAX = 4 00031 } rpmdbOpX; 00032 00039 rpmop rpmdbOp(rpmdb db, rpmdbOpX opx); 00040 00046 int rpmdbOpenAll (rpmdb db); 00047 00054 int rpmdbCountPackages(rpmdb db, const char * name); 00055 00061 unsigned int rpmdbGetIteratorOffset(rpmdbMatchIterator mi); 00062 00068 int rpmdbGetIteratorCount(rpmdbMatchIterator mi); 00069 00072 unsigned int rpmdbGetIteratorFileNum(rpmdbMatchIterator mi); 00073 00081 int rpmdbAppendIterator(rpmdbMatchIterator mi, 00082 const int * hdrNums, int nHdrNums); 00083 00092 int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTagVal tag, 00093 rpmMireMode mode, const char * pattern); 00094 00102 int rpmdbSetIteratorRewrite(rpmdbMatchIterator mi, int rewrite); 00103 00110 int rpmdbSetIteratorModified(rpmdbMatchIterator mi, int modified); 00111 00119 int rpmdbSetHdrChk(rpmdbMatchIterator mi, rpmts ts, 00120 rpmRC (*hdrchk) (rpmts ts, const void * uh, size_t uc, char ** msg)); 00121 00130 rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmDbiTagVal rpmtag, 00131 const void * keyp, size_t keylen); 00132 00138 Header rpmdbNextIterator(rpmdbMatchIterator mi); 00139 00143 int rpmdbCheckSignals(void); 00144 00153 int rpmdbCheckTerminate(int terminate); 00154 00160 rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi); 00161 00168 rpmdbIndexIterator rpmdbIndexIteratorInit(rpmdb db, rpmDbiTag rpmtag); 00169 00178 int rpmdbIndexIteratorNext(rpmdbIndexIterator ii, const void ** key, size_t * keylen); 00179 00185 unsigned int rpmdbIndexIteratorNumPkgs(rpmdbIndexIterator ii); 00186 00193 unsigned int rpmdbIndexIteratorPkgOffset(rpmdbIndexIterator ii, unsigned int nr); 00194 00201 unsigned int rpmdbIndexIteratorTagNum(rpmdbIndexIterator ii, unsigned int nr); 00202 00208 rpmdbIndexIterator rpmdbIndexIteratorFree(rpmdbIndexIterator ii); 00209 00210 00211 #ifdef __cplusplus 00212 } 00213 #endif 00214 00215 #endif /* H_RPMDB */