00001 #ifndef H_RPMDS
00002 #define H_RPMDS
00003 
00009 #include "rpmps.h"
00010 
00013 
00014 
00015 extern int _rpmds_debug;
00016 
00017 
00020 
00021 
00022 extern int _rpmds_nopromote;
00023 
00024 
00025 #if defined(_RPMDS_INTERNAL)
00026 
00029 struct rpmds_s {
00030 
00031     const char * Type;          
00032  
00033     const char * DNEVR;         
00034  
00035     Header h;                   
00036 
00037     const char ** N;            
00038  
00039     const char ** EVR;          
00040  
00041     int_32 * Flags;             
00042  
00043     uint_32 * Color;            
00044  
00045     int_32 * Refs;              
00046     int_32 BT;                  
00047     rpmTag tagN;                
00048     rpmTagType Nt, EVRt, Ft;    
00049     int_32 Count;               
00050     int i;                      
00051     unsigned l;                 
00052     unsigned u;                 
00053     int nopromote;              
00054 
00055     int nrefs;                  
00056 };
00057 #endif  
00058 
00059 #ifdef __cplusplus
00060 extern "C" {
00061 #endif
00062 
00069  
00070 rpmds rpmdsUnlink (   rpmds ds,
00071                  const char * msg)
00072         ;
00073 
00075 
00076 
00077 rpmds XrpmdsUnlink (   rpmds ds,
00078                  const char * msg, const char * fn, unsigned ln)
00079         ;
00080 
00081 #define rpmdsUnlink(_ds, _msg)  XrpmdsUnlink(_ds, _msg, __FILE__, __LINE__)
00082 
00089   
00090 rpmds rpmdsLink ( rpmds ds,  const char * msg)
00091         ;
00092 
00094  
00095 rpmds XrpmdsLink ( rpmds ds,  const char * msg,
00096                 const char * fn, unsigned ln)
00097         ;
00098 #define rpmdsLink(_ds, _msg)    XrpmdsLink(_ds, _msg, __FILE__, __LINE__)
00099 
00105 
00106 rpmds rpmdsFree(   rpmds ds)
00107         ;
00116 
00117 rpmds rpmdsNew(Header h, rpmTag tagN, int flags)
00118         
00119         ;
00120 
00127 
00128 char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds)
00129         ;
00130 
00138 
00139 rpmds rpmdsThis(Header h, rpmTag tagN, int_32 Flags)
00140         ;
00141 
00150 
00151 rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, int_32 Flags)
00152         ;
00153 
00159 int rpmdsCount( const rpmds ds)
00160         ;
00161 
00167 int rpmdsIx( const rpmds ds)
00168         ;
00169 
00176 int rpmdsSetIx( rpmds ds, int ix)
00177         ;
00178 
00184  
00185 extern const char * rpmdsDNEVR( const rpmds ds)
00186         ;
00187 
00193  
00194 extern const char * rpmdsN( const rpmds ds)
00195         ;
00196 
00202  
00203 extern const char * rpmdsEVR( const rpmds ds)
00204         ;
00205 
00211 int_32 rpmdsFlags( const rpmds ds)
00212         ;
00213 
00219 rpmTag rpmdsTagN( const rpmds ds)
00220         ;
00221 
00227 time_t rpmdsBT( const rpmds ds)
00228         ;
00229 
00236 time_t rpmdsSetBT( const rpmds ds, time_t BT)
00237         ;
00238 
00252 int rpmdsNoPromote( const rpmds ds)
00253         ;
00254 
00261 int rpmdsSetNoPromote( rpmds ds, int nopromote)
00262         ;
00263 
00269 uint_32 rpmdsColor( const rpmds ds)
00270         ;
00271 
00278 uint_32 rpmdsSetColor( const rpmds ds, uint_32 color)
00279         ;
00280 
00286 int_32 rpmdsRefs( const rpmds ds)
00287         ;
00288 
00295 int_32 rpmdsSetRefs( const rpmds ds, int_32 refs)
00296         ;
00297 
00304  
00305 void rpmdsNotify( rpmds ds,  const char * where, int rc)
00306         
00307         ;
00308 
00309 
00315 int rpmdsNext( rpmds ds)
00316         ;
00317 
00323 
00324 rpmds rpmdsInit( rpmds ds)
00325         ;
00326 
00333 
00334 int rpmdsFind(rpmds ds,  const rpmds ods)
00335         ;
00336 
00343 
00344 int rpmdsMerge( rpmds * dsp,  rpmds ods)
00345         ;
00346 
00353 int rpmdsCompare(const rpmds A, const rpmds B)
00354         ;
00355 
00364 void rpmdsProblem( rpmps ps, const char * pkgNEVR, const rpmds ds,
00365                   const fnpyKey * suggestedKeys,
00366                 int adding)
00367         ;
00368 
00376 int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote)
00377         
00378         ;
00379 
00387 int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote)
00388         ;
00389 
00390 #ifdef __cplusplus
00391 }
00392 #endif
00393 
00394 #endif