rpm  4.10.0
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 
00038 /* ==================================================================== */
00045 enum rpm_machtable_e {
00046     RPM_MACHTABLE_INSTARCH      = 0,    
00047     RPM_MACHTABLE_INSTOS        = 1,    
00048     RPM_MACHTABLE_BUILDARCH     = 2,    
00049     RPM_MACHTABLE_BUILDOS       = 3     
00050 };
00051 #define RPM_MACHTABLE_COUNT     4       
00059 int rpmReadConfigFiles(const char * file,
00060                 const char * target);
00061 
00068 void rpmGetArchInfo( const char ** name,
00069                 int * num);
00070 
00077 void rpmGetOsInfo( const char ** name,
00078                 int * num);
00079 
00093 int rpmMachineScore(int type, const char * name);
00094 
00100 int rpmShowRC(FILE * fp);
00101 
00106 void rpmFreeRpmrc(void);
00107 
00114 int rpmVersionCompare(Header first, Header second);
00115 
00129 rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, char ** msg);
00130 
00139 rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, char ** msg);
00140 
00149 rpmRC rpmReadPackageFile(rpmts ts, FD_t fd,
00150                 const char * fn, Header * hdrp);
00151 
00160 rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
00161                         char ** specFilePtr,
00162                         char ** cookie);
00163 
00171 int rpmvercmp(const char * a, const char * b);
00172 
00173 #ifdef __cplusplus
00174 }
00175 #endif
00176 
00177 #endif  /* H_RPMLIB */