rpm 5.2.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

rpmdb/rpmtag.h
Go to the documentation of this file.

    00001 #ifndef H_RPMTAG
    00002 #define H_RPMTAG
    00003
    00008 #include <rpmiotypes.h>
    00009 #include <rpmsw.h>
    00010
    00011 #ifdef __cplusplus
    00012 extern "C" {
    00013 #endif
    00014
    00017 typedef const char *    errmsg_t;
    00018
    00021 typedef /*@abstract@*/ /*@refcounted@*/ struct headerToken_s * Header;
    00022
    00026 enum rpmTagType_e {
    00027         /* RPM_NULL_TYPE =  0   - never been used. */
    00028         /* RPM_CHAR_TYPE =  1   - never been used, same as RPM_UINT8_TYPE. */
    00029     RPM_UINT8_TYPE              =  2,
    00030     RPM_UINT16_TYPE             =  3,
    00031     RPM_UINT32_TYPE             =  4,
    00032     RPM_UINT64_TYPE             =  5,
    00033     RPM_STRING_TYPE             =  6,
    00034     RPM_BIN_TYPE                =  7,
    00035     RPM_STRING_ARRAY_TYPE       =  8,
    00036     RPM_I18NSTRING_TYPE         =  9
    00037         /* RPM_ASN1_TYPE = 10   - never been used. */
    00038         /* RPM_OPENPGP_TYPE= 11 - never been used. */
    00039 };
    00040 #define RPM_MIN_TYPE            2
    00041 #define RPM_MAX_TYPE            9
    00042 #define RPM_MASK_TYPE           0x0000ffff
    00043
    00046 typedef enum rpmTagType_e rpmTagType;
    00050 typedef union rpmDataType_u rpmTagData;
    00054 typedef rpmuint32_t rpmTagCount;
    00058 typedef struct _HE_s * HE_t;
    00062 /*@-typeuse -fielduse@*/
    00063 #if !defined(SWIG)
    00064 union rpmDataType_u {
    00065 /*@null@*/
    00066     void * ptr;
    00067     rpmuint8_t * ui8p;
    00068     rpmuint16_t * ui16p;
    00069     rpmuint32_t * ui32p;
    00070     rpmuint64_t * ui64p;
    00071 /*@relnull@*/
    00072     const char * str;
    00073     unsigned char * blob;
    00074     const char ** argv;
    00075     HE_t he;
    00076 };
    00077 #endif
    00078 /*@=typeuse =fielduse@*/
    00079
    00080 /*@=typeuse =fielduse@*/
    00083 /*@-enummemuse -typeuse @*/
    00084 typedef enum rpmSubTagType_e {
    00085     RPM_REGION_TYPE             = -10,
    00086     RPM_BIN_ARRAY_TYPE          = -11,
    00087     RPM_XREF_TYPE               = -12
    00088 } rpmSubTagType;
    00089 /*@=enummemuse =typeuse @*/
    00090
    00094 /*@-enummemuse -typeuse @*/
    00095 typedef enum rpmTagReturnType_e {
    00096     RPM_ANY_RETURN_TYPE         = 0,
    00097     RPM_SCALAR_RETURN_TYPE      = 0x00010000,
    00098     RPM_ARRAY_RETURN_TYPE       = 0x00020000,
    00099     RPM_MAPPING_RETURN_TYPE     = 0x00040000,
    00100         /* 0x00080000 */
    00101     RPM_PROBE_RETURN_TYPE       = 0x00100000,
    00102     RPM_TREE_RETURN_TYPE        = 0x00200000,
    00103     RPM_OPENPGP_RETURN_TYPE     = 0x00400000,
    00104     RPM_X509_RETURN_TYPE        = 0x00800000,
    00105     RPM_ASN1_RETURN_TYPE        = 0x01000000,
    00106     RPM_OPAQUE_RETURN_TYPE      = 0x10000000,
    00107     RPM_MASK_RETURN_TYPE        = 0xffff0000
    00108 } rpmTagReturnType;
    00109 /*@=enummemuse =typeuse @*/
    00110
    00115 #define HEADER_IMAGE            61
    00116 #define HEADER_SIGNATURES       62
    00117 #define HEADER_IMMUTABLE        63
    00118 #define HEADER_REGIONS          64
    00119 #define HEADER_I18NTABLE        100
    00120 #define HEADER_SIGBASE          256
    00121 #define HEADER_TAGBASE          1000
    00122
    00125 typedef /*@abstract@*/ struct headerIterator_s * HeaderIterator;
    00126
    00129 typedef /*@abstract@*/ struct headerTagIndices_s * headerTagIndices;
    00130
    00133 typedef /*@abstract@*/ const struct headerSprintfExtension_s * headerSprintfExtension;
    00134
    00138 #define RPMDBI_PACKAGES         0       /* Installed package headers. */
    00139 #define RPMDBI_DEPENDS          1       /* Dependency resolution cache. */
    00140 #define RPMDBI_LABEL            2       /* Fingerprint search marker. */
    00141 #define RPMDBI_ADDED            3       /* Added package headers. */
    00142 #define RPMDBI_REMOVED          4       /* Removed package headers. */
    00143 #define RPMDBI_AVAILABLE        5       /* Available package headers. */
    00144 #define RPMDBI_HDLIST           6       /* (rpmgi) Header list. */
    00145 #define RPMDBI_ARGLIST          7       /* (rpmgi) Argument list. */
    00146 #define RPMDBI_FTSWALK          8       /* (rpmgi) File tree  walk. */
    00147
    00152 enum rpmTag_e {
    00153
    00154     RPMTAG_HEADERIMAGE          = HEADER_IMAGE,
    00155     RPMTAG_HEADERSIGNATURES     = HEADER_SIGNATURES,
    00156     RPMTAG_HEADERIMMUTABLE      = HEADER_IMMUTABLE,
    00157 /*@-enummemuse@*/
    00158     RPMTAG_HEADERREGIONS        = HEADER_REGIONS,
    00160     RPMTAG_HEADERI18NTABLE      = HEADER_I18NTABLE,
    00161 /*@=enummemuse@*/
    00162
    00163 /* Retrofit (and uniqify) signature tags for use by tagName() and rpmQuery. */
    00164 /* the md5 sum was broken *twice* on big endian machines */
    00165 /* XXX 2nd underscore prevents tagTable generation */
    00166     RPMTAG_SIG_BASE             = HEADER_SIGBASE,
    00167     RPMTAG_SIGSIZE              = RPMTAG_SIG_BASE+1,    /* i */
    00168     RPMTAG_SIGLEMD5_1           = RPMTAG_SIG_BASE+2,    /* internal - obsolete */
    00169     RPMTAG_SIGPGP               = RPMTAG_SIG_BASE+3,    /* x */
    00170     RPMTAG_SIGLEMD5_2           = RPMTAG_SIG_BASE+4,    /* x internal - obsolete */
    00171     RPMTAG_SIGMD5               = RPMTAG_SIG_BASE+5,    /* x */
    00172 #define RPMTAG_PKGID    RPMTAG_SIGMD5                   /* x */
    00173     RPMTAG_SIGGPG               = RPMTAG_SIG_BASE+6,    /* x */
    00174     RPMTAG_SIGPGP5              = RPMTAG_SIG_BASE+7,    /* internal - obsolete */
    00175
    00176     RPMTAG_BADSHA1_1            = RPMTAG_SIG_BASE+8,    /* internal - obsolete */
    00177     RPMTAG_BADSHA1_2            = RPMTAG_SIG_BASE+9,    /* internal - obsolete */
    00178     RPMTAG_PUBKEYS              = RPMTAG_SIG_BASE+10,   /* s[] */
    00179     RPMTAG_DSAHEADER            = RPMTAG_SIG_BASE+11,   /* x */
    00180     RPMTAG_RSAHEADER            = RPMTAG_SIG_BASE+12,   /* x */
    00181     RPMTAG_SHA1HEADER           = RPMTAG_SIG_BASE+13,   /* s */
    00182 #define RPMTAG_HDRID    RPMTAG_SHA1HEADER       /* s */
    00183
    00184     RPMTAG_NAME                 = 1000, /* s */
    00185 #define RPMTAG_N        RPMTAG_NAME     /* s */
    00186     RPMTAG_VERSION              = 1001, /* s */
    00187 #define RPMTAG_V        RPMTAG_VERSION  /* s */
    00188     RPMTAG_RELEASE              = 1002, /* s */
    00189 #define RPMTAG_R        RPMTAG_RELEASE  /* s */
    00190     RPMTAG_EPOCH                = 1003, /* i */
    00191 #define RPMTAG_E        RPMTAG_EPOCH    /* i */
    00192     RPMTAG_SUMMARY              = 1004, /* s{} */
    00193     RPMTAG_DESCRIPTION          = 1005, /* s{} */
    00194     RPMTAG_BUILDTIME            = 1006, /* i */
    00195     RPMTAG_BUILDHOST            = 1007, /* s */
    00196     RPMTAG_INSTALLTIME          = 1008, /* i[] */
    00197     RPMTAG_SIZE                 = 1009, /* i */
    00198     RPMTAG_DISTRIBUTION         = 1010, /* s */
    00199     RPMTAG_VENDOR               = 1011, /* s */
    00200     RPMTAG_GIF                  = 1012, /* x */
    00201     RPMTAG_XPM                  = 1013, /* x */
    00202     RPMTAG_LICENSE              = 1014, /* s */
    00203     RPMTAG_PACKAGER             = 1015, /* s */
    00204     RPMTAG_GROUP                = 1016, /* s{} */
    00205 /*@-enummemuse@*/
    00206     RPMTAG_CHANGELOG            = 1017, /* s[] internal */
    00207 /*@=enummemuse@*/
    00208     RPMTAG_SOURCE               = 1018, /* s[] */
    00209     RPMTAG_PATCH                = 1019, /* s[] */
    00210     RPMTAG_URL                  = 1020, /* s */
    00211     RPMTAG_OS                   = 1021, /* s legacy used int */
    00212     RPMTAG_ARCH                 = 1022, /* s legacy used int */
    00213     RPMTAG_PREIN                = 1023, /* s */
    00214     RPMTAG_POSTIN               = 1024, /* s */
    00215     RPMTAG_PREUN                = 1025, /* s */
    00216     RPMTAG_POSTUN               = 1026, /* s */
    00217     RPMTAG_OLDFILENAMES         = 1027, /* s[] obsolete */
    00218     RPMTAG_FILESIZES            = 1028, /* i[] */
    00219     RPMTAG_FILESTATES           = 1029, /* c[] */
    00220     RPMTAG_FILEMODES            = 1030, /* h[] */
    00221     RPMTAG_FILEUIDS             = 1031, /* i[] internal */
    00222     RPMTAG_FILEGIDS             = 1032, /* i[] internal */
    00223     RPMTAG_FILERDEVS            = 1033, /* h[] */
    00224     RPMTAG_FILEMTIMES           = 1034, /* i[] */
    00225     RPMTAG_FILEDIGESTS          = 1035, /* s[] */
    00226 #define RPMTAG_FILEMD5S RPMTAG_FILEDIGESTS /* s[] */
    00227     RPMTAG_FILELINKTOS          = 1036, /* s[] */
    00228     RPMTAG_FILEFLAGS            = 1037, /* i[] */
    00229 /*@-enummemuse@*/
    00230     RPMTAG_ROOT                 = 1038, /* internal - obsolete */
    00231 /*@=enummemuse@*/
    00232     RPMTAG_FILEUSERNAME         = 1039, /* s[] */
    00233     RPMTAG_FILEGROUPNAME        = 1040, /* s[] */
    00234 /*@-enummemuse@*/
    00235     RPMTAG_EXCLUDE              = 1041, /* internal - obsolete */
    00236     RPMTAG_EXCLUSIVE            = 1042, /* internal - obsolete */
    00237 /*@=enummemuse@*/
    00238     RPMTAG_ICON                 = 1043, /* x */
    00239     RPMTAG_SOURCERPM            = 1044, /* s */
    00240     RPMTAG_FILEVERIFYFLAGS      = 1045, /* i[] */
    00241     RPMTAG_ARCHIVESIZE          = 1046, /* i */
    00242     RPMTAG_PROVIDENAME          = 1047, /* s[] */
    00243 #define RPMTAG_PROVIDES RPMTAG_PROVIDENAME      /* s[] */
    00244 #define RPMTAG_P        RPMTAG_PROVIDENAME      /* s[] */
    00245     RPMTAG_REQUIREFLAGS         = 1048, /* i[] */
    00246     RPMTAG_REQUIRENAME          = 1049, /* s[] */
    00247 #define RPMTAG_REQUIRES RPMTAG_REQUIRENAME      /* s[] */
    00248     RPMTAG_REQUIREVERSION       = 1050, /* s[] */
    00249     RPMTAG_NOSOURCE             = 1051, /* i internal */
    00250     RPMTAG_NOPATCH              = 1052, /* i internal */
    00251     RPMTAG_CONFLICTFLAGS        = 1053, /* i[] */
    00252     RPMTAG_CONFLICTNAME         = 1054, /* s[] */
    00253 #define RPMTAG_CONFLICTS RPMTAG_CONFLICTNAME    /* s[] */
    00254 #define RPMTAG_C        RPMTAG_CONFLICTNAME     /* s[] */
    00255     RPMTAG_CONFLICTVERSION      = 1055, /* s[] */
    00256     RPMTAG_DEFAULTPREFIX        = 1056, /* s internal - deprecated */
    00257     RPMTAG_BUILDROOT            = 1057, /* s internal */
    00258     RPMTAG_INSTALLPREFIX        = 1058, /* s internal - deprecated */
    00259     RPMTAG_EXCLUDEARCH          = 1059, /* s[] */
    00260     RPMTAG_EXCLUDEOS            = 1060, /* s[] */
    00261     RPMTAG_EXCLUSIVEARCH        = 1061, /* s[] */
    00262     RPMTAG_EXCLUSIVEOS          = 1062, /* s[] */
    00263     RPMTAG_AUTOREQPROV          = 1063, /* s internal */
    00264     RPMTAG_RPMVERSION           = 1064, /* s */
    00265     RPMTAG_TRIGGERSCRIPTS       = 1065, /* s[] */
    00266     RPMTAG_TRIGGERNAME          = 1066, /* s[] */
    00267     RPMTAG_TRIGGERVERSION       = 1067, /* s[] */
    00268     RPMTAG_TRIGGERFLAGS         = 1068, /* i[] */
    00269     RPMTAG_TRIGGERINDEX         = 1069, /* i[] */
    00270     RPMTAG_VERIFYSCRIPT         = 1079, /* s */
    00271     RPMTAG_CHANGELOGTIME        = 1080, /* i[] */
    00272     RPMTAG_CHANGELOGNAME        = 1081, /* s[] */
    00273     RPMTAG_CHANGELOGTEXT        = 1082, /* s[] */
    00274 /*@-enummemuse@*/
    00275     RPMTAG_BROKENMD5            = 1083, /* internal - obsolete */
    00276 /*@=enummemuse@*/
    00277     RPMTAG_PREREQ               = 1084, /* internal */
    00278     RPMTAG_PREINPROG            = 1085, /* s */
    00279     RPMTAG_POSTINPROG           = 1086, /* s */
    00280     RPMTAG_PREUNPROG            = 1087, /* s */
    00281     RPMTAG_POSTUNPROG           = 1088, /* s */
    00282     RPMTAG_BUILDARCHS           = 1089, /* s[] */
    00283     RPMTAG_OBSOLETENAME         = 1090, /* s[] */
    00284 #define RPMTAG_OBSOLETES RPMTAG_OBSOLETENAME    /* s[] */
    00285 #define RPMTAG_O        RPMTAG_OBSOLETENAME     /* s[] */
    00286     RPMTAG_VERIFYSCRIPTPROG     = 1091, /* s */
    00287     RPMTAG_TRIGGERSCRIPTPROG    = 1092, /* s[] */
    00288     RPMTAG_DOCDIR               = 1093, /* internal */
    00289     RPMTAG_COOKIE               = 1094, /* s */
    00290     RPMTAG_FILEDEVICES          = 1095, /* i[] */
    00291     RPMTAG_FILEINODES           = 1096, /* i[] */
    00292     RPMTAG_FILELANGS            = 1097, /* s[] */
    00293     RPMTAG_PREFIXES             = 1098, /* s[] */
    00294     RPMTAG_INSTPREFIXES         = 1099, /* s[] */
    00295     RPMTAG_TRIGGERIN            = 1100, /* internal */
    00296     RPMTAG_TRIGGERUN            = 1101, /* internal */
    00297     RPMTAG_TRIGGERPOSTUN        = 1102, /* internal */
    00298     RPMTAG_AUTOREQ              = 1103, /* internal */
    00299     RPMTAG_AUTOPROV             = 1104, /* internal */
    00300 /*@-enummemuse@*/
    00301     RPMTAG_CAPABILITY           = 1105, /* i legacy - obsolete */
    00302 /*@=enummemuse@*/
    00303     RPMTAG_SOURCEPACKAGE        = 1106, /* i legacy - obsolete */
    00304 /*@-enummemuse@*/
    00305     RPMTAG_OLDORIGFILENAMES     = 1107, /* internal - obsolete */
    00306 /*@=enummemuse@*/
    00307     RPMTAG_BUILDPREREQ          = 1108, /* internal */
    00308     RPMTAG_BUILDREQUIRES        = 1109, /* internal */
    00309     RPMTAG_BUILDCONFLICTS       = 1110, /* internal */
    00310 /*@-enummemuse@*/
    00311     RPMTAG_BUILDMACROS          = 1111, /* s[] srpms only */
    00312 /*@=enummemuse@*/
    00313     RPMTAG_PROVIDEFLAGS         = 1112, /* i[] */
    00314     RPMTAG_PROVIDEVERSION       = 1113, /* s[] */
    00315     RPMTAG_OBSOLETEFLAGS        = 1114, /* i[] */
    00316     RPMTAG_OBSOLETEVERSION      = 1115, /* s[] */
    00317     RPMTAG_DIRINDEXES           = 1116, /* i[] */
    00318     RPMTAG_BASENAMES            = 1117, /* s[] */
    00319     RPMTAG_DIRNAMES             = 1118, /* s[] */
    00320     RPMTAG_ORIGDIRINDEXES       = 1119, /* i[] relocation */
    00321     RPMTAG_ORIGBASENAMES        = 1120, /* s[] relocation */
    00322     RPMTAG_ORIGDIRNAMES         = 1121, /* s[] relocation */
    00323     RPMTAG_OPTFLAGS             = 1122, /* s */
    00324     RPMTAG_DISTURL              = 1123, /* s */
    00325     RPMTAG_PAYLOADFORMAT        = 1124, /* s */
    00326     RPMTAG_PAYLOADCOMPRESSOR    = 1125, /* s */
    00327     RPMTAG_PAYLOADFLAGS         = 1126, /* s */
    00328     RPMTAG_INSTALLCOLOR         = 1127, /* i transaction color when installed */
    00329     RPMTAG_INSTALLTID           = 1128, /* i[] */
    00330     RPMTAG_REMOVETID            = 1129, /* i[] */
    00331 /*@-enummemuse@*/
    00332     RPMTAG_SHA1RHN              = 1130, /* internal - obsolete */
    00333 /*@=enummemuse@*/
    00334     RPMTAG_RHNPLATFORM          = 1131, /* s deprecated */
    00335     RPMTAG_PLATFORM             = 1132, /* s */
    00336     RPMTAG_PATCHESNAME          = 1133, /* s[] deprecated placeholder (SuSE) */
    00337     RPMTAG_PATCHESFLAGS         = 1134, /* i[] deprecated placeholder (SuSE) */
    00338     RPMTAG_PATCHESVERSION       = 1135, /* s[] deprecated placeholder (SuSE) */
    00339     RPMTAG_CACHECTIME           = 1136, /* i rpmcache(8) only */
    00340     RPMTAG_CACHEPKGPATH         = 1137, /* s rpmcache(8) only */
    00341     RPMTAG_CACHEPKGSIZE         = 1138, /* i rpmcache(8) only */
    00342     RPMTAG_CACHEPKGMTIME        = 1139, /* i rpmcache(8) only */
    00343     RPMTAG_FILECOLORS           = 1140, /* i[] */
    00344     RPMTAG_FILECLASS            = 1141, /* i[] */
    00345     RPMTAG_CLASSDICT            = 1142, /* s[] */
    00346     RPMTAG_FILEDEPENDSX         = 1143, /* i[] */
    00347     RPMTAG_FILEDEPENDSN         = 1144, /* i[] */
    00348     RPMTAG_DEPENDSDICT          = 1145, /* i[] */
    00349     RPMTAG_SOURCEPKGID          = 1146, /* x */
    00350     RPMTAG_FILECONTEXTS         = 1147, /* s[] */
    00351     RPMTAG_FSCONTEXTS           = 1148, /* s[] extension */
    00352     RPMTAG_RECONTEXTS           = 1149, /* s[] extension */
    00353     RPMTAG_POLICIES             = 1150, /* s[] selinux *.te policy file. */
    00354     RPMTAG_PRETRANS             = 1151, /* s */
    00355     RPMTAG_POSTTRANS            = 1152, /* s */
    00356     RPMTAG_PRETRANSPROG         = 1153, /* s */
    00357     RPMTAG_POSTTRANSPROG        = 1154, /* s */
    00358     RPMTAG_DISTTAG              = 1155, /* s */
    00359     RPMTAG_SUGGESTSNAME         = 1156, /* s[] extension */
    00360 #define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME     /* s[] */
    00361     RPMTAG_SUGGESTSVERSION      = 1157, /* s[] extension */
    00362     RPMTAG_SUGGESTSFLAGS        = 1158, /* i[] extension */
    00363     RPMTAG_ENHANCESNAME         = 1159, /* s[] extension placeholder */
    00364 #define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME     /* s[] */
    00365     RPMTAG_ENHANCESVERSION      = 1160, /* s[] extension placeholder */
    00366     RPMTAG_ENHANCESFLAGS        = 1161, /* i[] extension placeholder */
    00367     RPMTAG_PRIORITY             = 1162, /* i[] extension placeholder */
    00368     RPMTAG_CVSID                = 1163, /* s */
    00369 #define RPMTAG_SVNID    RPMTAG_CVSID    /* s */
    00370     RPMTAG_BLINKPKGID           = 1164, /* s[] */
    00371     RPMTAG_BLINKHDRID           = 1165, /* s[] */
    00372     RPMTAG_BLINKNEVRA           = 1166, /* s[] */
    00373     RPMTAG_FLINKPKGID           = 1167, /* s[] */
    00374     RPMTAG_FLINKHDRID           = 1168, /* s[] */
    00375     RPMTAG_FLINKNEVRA           = 1169, /* s[] */
    00376     RPMTAG_PACKAGEORIGIN        = 1170, /* s */
    00377     RPMTAG_TRIGGERPREIN         = 1171, /* internal */
    00378     RPMTAG_BUILDSUGGESTS        = 1172, /* internal */
    00379     RPMTAG_BUILDENHANCES        = 1173, /* internal */
    00380     RPMTAG_SCRIPTSTATES         = 1174, /* i[] scriptlet exit codes */
    00381     RPMTAG_SCRIPTMETRICS        = 1175, /* i[] scriptlet execution times */
    00382     RPMTAG_BUILDCPUCLOCK        = 1176, /* i */
    00383     RPMTAG_FILEDIGESTALGOS      = 1177, /* i[] */
    00384     RPMTAG_VARIANTS             = 1178, /* s[] */
    00385     RPMTAG_XMAJOR               = 1179, /* i */
    00386     RPMTAG_XMINOR               = 1180, /* i */
    00387     RPMTAG_REPOTAG              = 1181, /* s */
    00388     RPMTAG_KEYWORDS             = 1182, /* s[] */
    00389     RPMTAG_BUILDPLATFORMS       = 1183, /* s[] */
    00390     RPMTAG_PACKAGECOLOR         = 1184, /* i */
    00391     RPMTAG_PACKAGEPREFCOLOR     = 1185, /* i (unimplemented) */
    00392     RPMTAG_XATTRSDICT           = 1186, /* s[] (unimplemented) */
    00393     RPMTAG_FILEXATTRSX          = 1187, /* i[] (unimplemented) */
    00394     RPMTAG_DEPATTRSDICT         = 1188, /* s[] (unimplemented) */
    00395     RPMTAG_CONFLICTATTRSX       = 1189, /* i[] (unimplemented) */
    00396     RPMTAG_OBSOLETEATTRSX       = 1190, /* i[] (unimplemented) */
    00397     RPMTAG_PROVIDEATTRSX        = 1191, /* i[] (unimplemented) */
    00398     RPMTAG_REQUIREATTRSX        = 1192, /* i[] (unimplemented) */
    00399     RPMTAG_BUILDPROVIDES        = 1193, /* internal */
    00400     RPMTAG_BUILDOBSOLETES       = 1194, /* internal */
    00401     RPMTAG_DBINSTANCE           = 1195, /* i */
    00402     RPMTAG_NVRA                 = 1196, /* s */
    00403     RPMTAG_FILEPATHS            = 1197, /* s[] */
    00404     RPMTAG_ORIGPATHS            = 1198, /* s[] */
    00405     RPMTAG_RPMLIBVERSION        = 1199, /* i */
    00406     RPMTAG_RPMLIBTIMESTAMP      = 1200, /* i */
    00407     RPMTAG_RPMLIBVENDOR         = 1201, /* i */
    00408     RPMTAG_CLASS                = 1202, /* s arbitrary */
    00409     RPMTAG_TRACK                = 1203, /* s internal arbitrary */
    00410     RPMTAG_TRACKPROG            = 1204, /* s internal arbitrary */
    00411     RPMTAG_SANITYCHECK          = 1205, /* s */
    00412     RPMTAG_SANITYCHECKPROG      = 1206, /* s */
    00413     RPMTAG_FILESTAT             = 1207, /* s[] stat(2) from metadata extension*/
    00414     RPMTAG_STAT                 = 1208, /* s[] stat(2) from disk extension */
    00415     RPMTAG_ORIGINTID            = 1209, /* i[] */
    00416     RPMTAG_ORIGINTIME           = 1210, /* i[] */
    00417     RPMTAG_HEADERSTARTOFF       = 1211, /* l */
    00418     RPMTAG_HEADERENDOFF         = 1212, /* l */
    00419     RPMTAG_PACKAGETIME          = 1213, /* l */
    00420     RPMTAG_PACKAGESIZE          = 1214, /* l */
    00421     RPMTAG_PACKAGEDIGEST        = 1215, /* s */
    00422     RPMTAG_PACKAGESTAT          = 1216, /* x */
    00423     RPMTAG_PACKAGEBASEURL       = 1217, /* s */
    00424     RPMTAG_DISTEPOCH            = 1218, /* s */
    00425 #define RPMTAG_D RPMTAG_DISTEPOCH       /* s */
    00426
    00427     RPMTAG_FILEDIGESTALGO       = 5011, /* i file checksum algorithm */
    00428
    00429 /*@-enummemuse@*/
    00430     RPMTAG_FIRSTFREE_TAG,
    00431 /*@=enummemuse@*/
    00432
    00433     RPMTAG_PACKAGETRANSFLAGS    = 0x4efaafd9, /* s[] arbitrary */
    00434     RPMTAG_PACKAGEDEPFLAGS      = 0x748a8314, /* s[] arbitrary */
    00435
    00436     RPMTAG_BUILDPREPPROG        = 0x4ba37c9e, /* s[] arbitrary */
    00437     RPMTAG_BUILDPREP            = 0x799c0b4d, /* s[] arbitrary */
    00438     RPMTAG_BUILDBUILDPROG       = 0x6fb46014, /* s[] arbitrary */
    00439     RPMTAG_BUILDBUILD           = 0x5bae1a5a, /* s[] arbitrary */
    00440     RPMTAG_BUILDINSTALLPROG     = 0x70d4ab6f, /* s[] arbitrary */
    00441     RPMTAG_BUILDINSTALL         = 0x567f5983, /* s[] arbitrary */
    00442     RPMTAG_BUILDCHECKPROG       = 0x488a60ce, /* s[] arbitrary */
    00443     RPMTAG_BUILDCHECK           = 0x7f3b97b5, /* s[] arbitrary */
    00444     RPMTAG_BUILDCLEANPROG       = 0x42c93d41, /* s[] arbitrary */
    00445     RPMTAG_BUILDCLEAN           = 0x566042bf, /* s[] arbitrary */
    00446
    00447     RPMTAG_LASTARBITRARY_TAG    = 0x80000000
    00448 };
    00449
    00450 #define RPMTAG_EXTERNAL_TAG             1000000
    00451
    00455 enum rpmSigTag_e {
    00456     RPMSIGTAG_SIZE      = 1000,
    00457     RPMSIGTAG_LEMD5_1   = 1001,
    00458     RPMSIGTAG_PGP       = 1002,
    00459     RPMSIGTAG_LEMD5_2   = 1003,
    00460     RPMSIGTAG_MD5       = 1004,
    00461     RPMSIGTAG_GPG       = 1005,
    00462     RPMSIGTAG_PGP5      = 1006,
    00463     RPMSIGTAG_PAYLOADSIZE = 1007,
    00464     RPMSIGTAG_BADSHA1_1 = RPMTAG_BADSHA1_1,
    00465     RPMSIGTAG_BADSHA1_2 = RPMTAG_BADSHA1_2,
    00466     RPMSIGTAG_SHA1      = RPMTAG_SHA1HEADER,
    00467     RPMSIGTAG_DSA       = RPMTAG_DSAHEADER,
    00468     RPMSIGTAG_RSA       = RPMTAG_RSAHEADER,
    00469     RPMSIGTAG_PADDING   = 0x3fffffff
    00470 };
    00471
    00474 typedef enum rpmTag_e rpmTag;
    00475
    00478 typedef enum rpmSigTag_e rpmSigTag;
    00479
    00482 /*@-typeuse -fielduse@*/
    00483 #if !defined(SWIG)
    00484 struct _HE_s {
    00485     rpmTag tag;
    00486     rpmTagType t;
    00487 /*@owned@*/ /*@null@*/
    00488     rpmTagData p;
    00489     rpmTagCount c;
    00490     int ix;
    00491     unsigned int freeData       : 1;
    00492     unsigned int avail          : 1;
    00493     unsigned int append         : 1;
    00494 };
    00495 #endif
    00496
    00499 typedef struct _HE_s HE_s;
    00500
    00503 typedef struct tagStore_s * tagStore_t;
    00504
    00507 typedef /*@abstract@*/ const struct headerTagTableEntry_s * headerTagTableEntry;
    00508
    00509 #if defined(_RPMTAG_INTERNAL)
    00510
    00515 #if !defined(SWIG)
    00516 struct headerTagTableEntry_s {
    00517 /*@observer@*/ /*@relnull@*/
    00518     const char * name;
    00519     rpmTag val;
    00520     rpmTagType type;
    00521 };
    00522 #endif
    00523
    00526 struct tagStore_s {
    00527 /*@only@*/
    00528     const char * str;
    00529     rpmTag tag;
    00530     rpmiob iob;
    00531 };
    00532 #endif  /* _RPMTAG_INTERNAL */
    00533
    00537 /*@-redecl@*/
    00538 /*@observer@*/ /*@unchecked@*/
    00539 extern headerTagTableEntry rpmTagTable;
    00540 /*@=redecl@*/
    00541
    00545 /*@-redecl@*/
    00546 /*@unchecked@*/
    00547 extern int rpmTagTableSize;
    00548
    00549 /*@unchecked@*/
    00550 extern headerTagIndices rpmTags;
    00551 /*@=redecl@*/
    00552
    00553 #if defined(_RPMTAG_INTERNAL)
    00554
    00556 #if !defined(SWIG)
    00557 struct headerTagIndices_s {
    00558 /*@relnull@*/
    00559     int (*loadIndex) (headerTagTableEntry ** ipp, size_t * np,
    00560                 int (*cmp) (const void * avp, const void * bvp))
    00561         /*@ modifies *ipp, *np */;
    00562 /*@relnull@*/
    00563     headerTagTableEntry * byName;
    00564     size_t byNameSize;
    00565     int (*byNameCmp) (const void * avp, const void * bvp)
    00566         /*@*/;
    00567     rpmTag (*tagValue) (const char * name)
    00568         /*@*/;
    00569 /*@relnull@*/
    00570     headerTagTableEntry * byValue;
    00571     size_t byValueSize;
    00572     int (*byValueCmp) (const void * avp, const void * bvp)
    00573         /*@*/;
    00574     const char * (*tagName) (rpmTag value)
    00575         /*@*/;
    00576     rpmTag (*tagType) (rpmTag value)
    00577         /*@*/;
    00578     size_t nameBufLen;
    00579 /*@relnull@*/
    00580     const char ** aTags;
    00581 /*@owned@*/ /*@null@*/
    00582     char * nameBuf;                     /* Name buffer. */
    00583 /*@only@*/
    00584     char * (*tagCanonicalize) (const char * s)
    00585         /*@*/;
    00586     rpmTag (*tagGenerate) (const char * s)
    00587         /*@*/;
    00588 };
    00589 #endif
    00590 #endif  /* _RPMTAG_INTERNAL */
    00591
    00597 /*@observer@*/
    00598 const char * tagName(rpmTag tag)
    00599         /*@*/;
    00600
    00607 unsigned int tagType(rpmTag tag)
    00608         /*@*/;
    00609
    00615 rpmTag tagValue(const char * tagstr)
    00616         /*@*/;
    00617
    00623 /*@only@*/
    00624 char * tagCanonicalize(const char * s)
    00625         /*@*/;
    00626
    00632 rpmTag tagGenerate(const char * s)
    00633         /*@*/;
    00634
    00639 void tagClean(/*@null@*/ headerTagIndices _rpmTags)
    00640         /*@globals rpmTags @*/
    00641         /*@modifies _rpmTags, rpmTags @*/;
    00642
    00649 /*@null@*/
    00650 tagStore_t tagStoreFree(/*@only@*//*@null@*/tagStore_t dbiTags, size_t dbiNTags)
    00651         /*@modifies dbiTags @*/;
    00652
    00653 #if defined(_RPMTAG_INTERNAL)
    00654
    00656 typedef enum headerSprintfExtensionType_e {
    00657     HEADER_EXT_LAST = 0,
    00658     HEADER_EXT_FORMAT,
    00659     HEADER_EXT_MORE,
    00660     HEADER_EXT_TAG
    00661 } headerSprintfExtensionType;
    00662
    00670 typedef /*only@*/ char * (*headerTagFormatFunction) (HE_t he, /*@null@*/ const char ** av)
    00671         /*@modifies he @*/;
    00672
    00681 typedef int (*headerTagTagFunction) (Header h, HE_t he)
    00682         /*@modifies he @*/;
    00683
    00687 #if !defined(SWIG)
    00688 struct headerSprintfExtension_s {
    00689     headerSprintfExtensionType type;
    00690 /*@observer@*/ /*@null@*/
    00691     const char * name;
    00692     union {
    00693 /*@observer@*/ /*@null@*/
    00694         void * generic;
    00695         headerTagFormatFunction fmtFunction;
    00696         headerTagTagFunction tagFunction;
    00697         headerSprintfExtension * more;
    00698     } u;
    00699 };
    00700 #endif
    00701 #endif  /* _RPMTAG_INTERNAL */
    00702
    00706 /*@unchecked@*/ /*@observer@*/
    00707 extern headerSprintfExtension headerDefaultFormats;
    00708
    00712 /*@unchecked@*/ /*@observer@*/
    00713 extern headerSprintfExtension headerCompoundFormats;
    00714
    00721 void rpmDisplayQueryTags(/*@null@*/ FILE * fp,
    00722                 /*@null@*/ headerTagTableEntry _rpmTagTable,
    00723                 /*@null@*/ headerSprintfExtension _rpmHeaderFormats)
    00724         /*@globals fileSystem, internalState @*/
    00725         /*@modifies *fp, fileSystem, internalState @*/;
    00726
    00738 /*@only@*/ /*@null@*/
    00739 char * headerSprintf(Header h, const char * fmt,
    00740                 /*@null@*/ headerTagTableEntry tags,
    00741                 /*@null@*/ headerSprintfExtension exts,
    00742                 /*@null@*/ /*@out@*/ errmsg_t * errmsg)
    00743         /*@globals headerCompoundFormats, fileSystem, internalState @*/
    00744         /*@modifies h, *errmsg, fileSystem, internalState @*/;
    00745
    00754 int headerGet(Header h, HE_t he, unsigned int flags)
    00755         /*@globals internalState @*/
    00756         /*@modifies he, internalState @*/;
    00757 #define HEADERGET_NOEXTENSION   (1 << 0)
    00758 #define HEADERGET_NOI18NSTRING  (1 << 1)
    00768 /*@mayexit@*/
    00769 int headerPut(Header h, HE_t he, /*@unused@*/ unsigned int flags)
    00770         /*@modifies h @*/;
    00771
    00780 /*@mayexit@*/
    00781 int headerDel(Header h, HE_t he, /*@unused@*/ unsigned int flags)
    00782         /*@modifies h @*/;
    00783
    00792 int headerMod(Header h, HE_t he, /*@unused@*/ unsigned int flags)
    00793         /*@modifies h @*/;
    00794
    00800 /*@null@*/
    00801 HeaderIterator headerFini(/*@only@*/ HeaderIterator hi)
    00802         /*@globals fileSystem @*/
    00803         /*@modifies hi, fileSystem */;
    00804
    00810 HeaderIterator headerInit(Header h)
    00811         /*@globals fileSystem @*/
    00812         /*@modifies h, fileSystem */;
    00813
    00821 int headerNext(HeaderIterator hi, HE_t he, /*@unused@*/ unsigned int flags)
    00822         /*@globals internalState @*/
    00823         /*@modifies hi, he, internalState @*/;
    00824
    00830 Header headerLink(Header h)
    00831         /*@modifies h @*/;
    00832 #define headerLink(_h)        \
    00833     ((Header)rpmioLinkPoolItem((rpmioItem)(_h), __FUNCTION__, __FILE__, __LINE__))
    00834
    00840 /*@null@*/
    00841 Header headerUnlink(/*@killref@*/ /*@null@*/ Header h)
    00842         /*@modifies h @*/;
    00843 #define headerUnlink(_h)        \
    00844     ((Header)rpmioUnlinkPoolItem((rpmioItem)(_h), __FUNCTION__, __FILE__, __LINE__))
    00845
    00851 /*@null@*/
    00852 Header headerFree(/*@killref@*/ /*@null@*/ Header h)
    00853         /*@modifies h @*/;
    00854 #define headerFree(_h)        \
    00855     ((Header)rpmioFreePoolItem((rpmioItem)(_h), __FUNCTION__, __FILE__, __LINE__))
    00856
    00861 Header headerNew(void)
    00862         /*@globals fileSystem @*/
    00863         /*@modifies fileSystem @*/;
    00864
    00870 size_t headerSizeof(/*@null@*/ Header h)
    00871         /*@modifies h @*/;
    00872
    00879 /*@only@*/ /*@null@*/
    00880 void * headerUnload(Header h, /*@out@*/ /*@null@*/ size_t * lenp)
    00881         /*@globals internalState @*/
    00882         /*@modifies h, *lenp, internalState @*/;
    00883
    00892 /*@null@*/
    00893 Header headerReload(/*@only@*/ Header h, int tag)
    00894         /*@globals fileSystem, internalState @*/
    00895         /*@modifies h, fileSystem, internalState @*/;
    00896
    00902 /*@null@*/
    00903 Header headerCopy(Header h)
    00904         /*@globals fileSystem, internalState @*/
    00905         /*@modifies h, fileSystem, internalState @*/;
    00906
    00912 /*@null@*/
    00913 Header headerLoad(/*@kept@*/ void * uh)
    00914         /*@globals fileSystem, internalState @*/
    00915         /*@modifies uh, fileSystem, internalState @*/;
    00916
    00922 /*@null@*/
    00923 Header headerCopyLoad(const void * uh)
    00924         /*@globals fileSystem, internalState @*/
    00925         /*@modifies fileSystem, internalState @*/;
    00926
    00933 int headerIsEntry(/*@null@*/ Header h, rpmTag tag)
    00934         /*@*/;
    00935
    00956 int headerAddI18NString(Header h, rpmTag tag, const char * string,
    00957                 const char * lang)
    00958         /*@modifies h @*/;
    00959
    00966 void headerCopyTags(Header headerFrom, Header headerTo, rpmTag * tagstocopy)
    00967         /*@globals internalState @*/
    00968         /*@modifies headerTo, internalState @*/;
    00969
    00977 int headerGetMagic(/*@null@*/ Header h, unsigned char **magicp, size_t *nmagicp)
    00978         /*@modifies *magicp, *nmagicp @*/;
    00979
    00987 int headerSetMagic(/*@null@*/ Header h, unsigned char * magic, size_t nmagic)
    00988         /*@modifies h @*/;
    00989
    00995 /*@observer@*/ /*@null@*/
    00996 const char * headerGetOrigin(/*@null@*/ Header h)
    00997         /*@*/;
    00998
    01005 int headerSetOrigin(/*@null@*/ Header h, const char * origin)
    01006         /*@modifies h @*/;
    01007
    01013 /*@observer@*/ /*@null@*/
    01014 const char * headerGetBaseURL(/*@null@*/ Header h)
    01015         /*@*/;
    01016
    01023 int headerSetBaseURL(/*@null@*/ Header h, const char * baseurl)
    01024         /*@modifies h @*/;
    01025
    01031 struct stat * headerGetStatbuf(/*@null@*/ Header h)
    01032         /*@*/;
    01033
    01040 int headerSetStatbuf(/*@null@*/ Header h, struct stat * st)
    01041         /*@modifies h @*/;
    01042
    01048 /*@null@*/
    01049 const char * headerGetDigest(/*@null@*/ Header h)
    01050         /*@*/;
    01051
    01058 int headerSetDigest(/*@null@*/ Header h, const char * digest)
    01059         /*@modifies h @*/;
    01060
    01066 /*@null@*/
    01067 void * headerGetRpmdb(/*@null@*/ Header h)
    01068         /*@*/;
    01069
    01076 /*@null@*/
    01077 void * headerSetRpmdb(/*@null@*/ Header h, /*@null@*/ void * rpmdb)
    01078         /*@modifies h @*/;
    01079
    01085 rpmuint32_t headerGetInstance(/*@null@*/ Header h)
    01086         /*@*/;
    01087
    01094 rpmuint32_t headerSetInstance(/*@null@*/ Header h, rpmuint32_t instance)
    01095         /*@modifies h @*/;
    01096
    01102 rpmuint32_t headerGetStartOff(/*@null@*/ Header h)
    01103         /*@*/;
    01104
    01111 rpmuint32_t headerSetStartOff(/*@null@*/ Header h, rpmuint32_t startoff)
    01112         /*@modifies h @*/;
    01113
    01119 rpmuint32_t headerGetEndOff(/*@null@*/ Header h)
    01120         /*@*/;
    01121
    01128 rpmuint32_t headerSetEndOff(/*@null@*/ Header h, rpmuint32_t endoff)
    01129         /*@modifies h @*/;
    01130
    01137 /*@null@*/
    01138 void * headerGetStats(Header h, int opx)
    01139         /*@*/;
    01140
    01146 int headerMacrosLoad(Header h)
    01147         /*@globals internalState @*/
    01148         /*@modifies internalState @*/;
    01149
    01155 int headerMacrosUnload(Header h)
    01156         /*@globals internalState @*/
    01157         /*@modifies internalState @*/;
    01158
    01169 int headerNEVRA(Header h,
    01170                 /*@null@*/ /*@out@*/ const char ** np,
    01171                 /*@null@*/ /*@out@*/ /*@unused@*/ const char ** ep,
    01172                 /*@null@*/ /*@out@*/ const char ** vp,
    01173                 /*@null@*/ /*@out@*/ const char ** rp,
    01174                 /*@null@*/ /*@out@*/ const char ** ap)
    01175         /*@globals internalState @*/
    01176         /*@modifies h, *np, *vp, *rp, *ap, internalState @*/;
    01177
    01183 rpmuint32_t hGetColor(Header h)
    01184         /*@globals internalState @*/
    01185         /*@modifies h, internalState @*/;
    01186
    01193 void headerMergeLegacySigs(Header h, const Header sigh)
    01194         /*@globals fileSystem, internalState @*/
    01195         /*@modifies h, sigh, fileSystem, internalState @*/;
    01196
    01204 Header headerRegenSigHeader(const Header h, int noArchiveSize)
    01205         /*@globals fileSystem, internalState @*/
    01206         /*@modifies h, fileSystem, internalState @*/;
    01207
    01208 #ifdef __cplusplus
    01209 }
    01210 #endif
    01211
    01212 #endif  /* H_RPMTAG */