rpm  4.9.1.3
rpmlib.h
Go to the documentation of this file.
00001 #ifndef H_RPMLIB
00002 #define H_RPMLIB
00003 
00011 #include <popt.h>
00012 
00013 #include <rpm/rpmio.h>
00014 #include <rpm/header.h>
00015 #include <rpm/rpmtag.h>
00016 #include <rpm/rpmds.h>  /* XXX move rpmlib provides to rpmds instead */
00017 #include <rpm/rpmpgp.h>
00018 #ifdef _RPM_4_4_COMPAT
00019 #include <rpm/rpmlegacy.h> /* legacy compat definitions if enabled */
00020 #endif
00021 
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025 
00026 extern struct rpmMacroContext_s * rpmGlobalMacroContext;
00027 
00028 extern struct rpmMacroContext_s * rpmCLIMacroContext;
00029 
00030 extern const char * const RPMVERSION;
00031 
00032 extern const char * const rpmNAME;
00033 
00034 extern const char * const rpmEVR;
00035 
00036 extern const int rpmFLAGS;
00037 
00044 void headerMergeLegacySigs(Header h, const Header sigh);
00045 
00053 Header headerRegenSigHeader(const Header h, int noArchiveSize);
00054 
00055 /* ==================================================================== */
00062 enum rpm_machtable_e {
00063     RPM_MACHTABLE_INSTARCH      = 0,    
00064     RPM_MACHTABLE_INSTOS        = 1,    
00065     RPM_MACHTABLE_BUILDARCH     = 2,    
00066     RPM_MACHTABLE_BUILDOS       = 3     
00067 };
00068 #define RPM_MACHTABLE_COUNT     4       
00076 int rpmReadConfigFiles(const char * file,
00077                 const char * target);
00078 
00085 void rpmGetArchInfo( const char ** name,
00086                 int * num);
00087 
00094 void rpmGetOsInfo( const char ** name,
00095                 int * num);
00096 
00110 int rpmMachineScore(int type, const char * name);
00111 
00117 int rpmShowRC(FILE * fp);
00118 
00126 void rpmSetTables(int archTable, int osTable);
00127 
00132 void rpmFreeRpmrc(void);
00133 
00140 int rpmVersionCompare(Header first, Header second);
00141 
00147 rpmRC headerCheckPayloadFormat(Header h);
00148 
00162 rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, char ** msg);
00163 
00172 rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, char ** msg);
00173 
00182 rpmRC rpmReadPackageFile(rpmts ts, FD_t fd,
00183                 const char * fn, Header * hdrp);
00184 
00193 rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
00194                         char ** specFilePtr,
00195                         char ** cookie);
00196 
00204 int rpmvercmp(const char * a, const char * b);
00205 
00206 #ifdef __cplusplus
00207 }
00208 #endif
00209 
00210 #endif  /* H_RPMLIB */