00001 #ifndef H_RPMLIB
00002 #define H_RPMLIB
00003
00011 #include <rpmtag.h>
00012 #include <rpmversion.h>
00013
00014 #define RPM_FORMAT_VERSION 5
00015 #define RPM_MAJOR_VERSION 0
00016 #define RPM_MINOR_VERSION 0
00017
00021 typedef enum rpmRC_e {
00022 RPMRC_OK = 0,
00023 RPMRC_NOTFOUND = 1,
00024 RPMRC_FAIL = 2,
00025 RPMRC_NOTTRUSTED = 3,
00026 RPMRC_NOKEY = 4
00027 } rpmRC;
00028
00029
00030
00031 extern struct MacroContext_s * rpmGlobalMacroContext;
00032
00033
00034 extern struct MacroContext_s * rpmCLIMacroContext;
00035
00036
00037 extern const char * RPMVERSION;
00038
00039
00040 extern const char * rpmNAME;
00041
00042
00043 extern const char * rpmEVR;
00044
00045
00046 extern int rpmFLAGS;
00047
00048
00049
00050 extern unsigned int * keyids;
00051
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #endif
00055
00062 typedef struct rpmts_s * rpmts;
00063
00066 typedef struct Spec_s * Spec;
00067
00071 typedef void * alKey;
00072 #define RPMAL_NOMATCH ((alKey)-1L)
00073
00077
00078 typedef int alNum;
00079
00080
00084 typedef struct rpmds_s * rpmds;
00085
00089 typedef struct rpmPRCO_s * rpmPRCO;
00090
00094 typedef struct rpmfi_s * rpmfi;
00095
00099 typedef struct rpmte_s * rpmte;
00100
00104 typedef struct rpmdb_s * rpmdb;
00105
00109 typedef struct rpmdbMatchIterator_s * rpmdbMatchIterator;
00110
00114 typedef struct rpmgi_s * rpmgi;
00115
00120
00121
00122 extern headerSprintfExtension rpmHeaderFormats;
00123
00124
00128 typedef enum rpmScriptID_e {
00129 RPMSCRIPT_UNKNOWN = 0,
00130 RPMSCRIPT_PRETRANS = 1,
00131 RPMSCRIPT_TRIGGERPREIN = 2,
00132 RPMSCRIPT_PREIN = 3,
00133 RPMSCRIPT_POSTIN = 4,
00134 RPMSCRIPT_TRIGGERIN = 5,
00135 RPMSCRIPT_TRIGGERUN = 6,
00136 RPMSCRIPT_PREUN = 7,
00137 RPMSCRIPT_POSTUN = 8,
00138 RPMSCRIPT_TRIGGERPOSTUN = 9,
00139 RPMSCRIPT_POSTTRANS = 10,
00140
00141 RPMSCRIPT_VERIFY = 16,
00142 RPMSCRIPT_SANITYCHECK = 17,
00143 RPMSCRIPT_MAX = 32
00144 } rpmScriptID;
00145
00149 typedef enum rpmScriptState_e {
00150 RPMSCRIPT_STATE_UNKNOWN = 0,
00151
00152 RPMSCRIPT_STATE_EXEC = (1 << 16),
00153 RPMSCRIPT_STATE_REAPED = (1 << 17),
00154
00155 RPMSCRIPT_STATE_SELINUX = (1 << 24),
00156 RPMSCRIPT_STATE_EMULATOR = (1 << 25),
00157 RPMSCRIPT_STATE_LUA = (1 << 26)
00158 } rpmScriptState;
00159
00160
00163
00169 enum rpm_machtable_e {
00170 RPM_MACHTABLE_INSTARCH = 0,
00171 RPM_MACHTABLE_INSTOS = 1,
00172 RPM_MACHTABLE_BUILDARCH = 2,
00173 RPM_MACHTABLE_BUILDOS = 3
00174 };
00175 #define RPM_MACHTABLE_COUNT 4
00183 int rpmReadConfigFiles( const char * file,
00184 const char * target)
00185
00186
00187
00188 ;
00189
00190
00191 extern void * platpat;
00192
00193 extern int nplatpat;
00194
00206 int rpmPlatformScore(const char * platform, void * mi_re, int mi_nre)
00207 ;
00208
00214 int rpmShowRC(FILE * fp)
00215
00216 ;
00217
00225 void rpmSetTables(int archTable, int osTable)
00226
00227 ;
00228
00234 void rpmFreeRpmrc(void)
00235
00236 ;
00237
00239
00242
00246 typedef struct rpmRelocation_s * rpmRelocation;
00247 #if !defined(SWIG)
00248 struct rpmRelocation_s {
00249
00250 const char * oldPath;
00251
00252 const char * newPath;
00253 };
00254 #endif
00255
00264 int rpmVersionCompare(Header first, Header second)
00265 ;
00266
00270 typedef struct fsmIterator_s * FSMI_t;
00271
00275 typedef struct fsm_s * FSM_t;
00276
00280 typedef struct rpmpsm_s * rpmpsm;
00281
00290 rpmRC rpmReadPackageFile(rpmts ts, void * _fd,
00291 const char * fn, Header * hdrp)
00292
00293
00294 ;
00295
00306 rpmRC rpmInstallSourcePackage(rpmts ts, void * _fd,
00307 const char ** specFilePtr,
00308 const char ** cookie)
00309
00310
00311 ;
00312
00315 #ifdef __cplusplus
00316 }
00317 #endif
00318
00319 #endif