|
Header | headerNew (void) |
|
Header | headerFree (Header h) |
|
Header | headerLink (Header h) |
|
void | headerSort (Header h) |
|
void | headerUnsort (Header h) |
|
unsigned int | headerSizeof (Header h, int magicp) |
|
int | headerVerifyInfo (int il, int dl, const void *pev, void *iv, int negate) |
|
void * | headerUnload (Header h) |
|
void * | headerExport (Header h, unsigned int *bsize) |
|
Header | headerReload (Header h, rpmTagVal tag) |
|
Header | headerCopy (Header h) |
|
Header | headerLoad (void *uh) |
|
Header | headerCopyLoad (const void *uh) |
|
Header | headerImport (void *blob, unsigned int bsize, headerImportFlags flags) |
|
Header | headerRead (FD_t fd, int magicp) |
|
int | headerWrite (FD_t fd, Header h, int magicp) |
|
int | headerIsEntry (Header h, rpmTagVal tag) |
|
int | headerGet (Header h, rpmTagVal tag, rpmtd td, headerGetFlags flags) |
|
int | headerPut (Header h, rpmtd td, headerPutFlags flags) |
|
int | headerAddI18NString (Header h, rpmTagVal tag, const char *string, const char *lang) |
|
int | headerMod (Header h, rpmtd td) |
|
int | headerDel (Header h, rpmTagVal tag) |
|
char * | headerFormat (Header h, const char *fmt, errmsg_t *errmsg) |
|
void | headerCopyTags (Header headerFrom, Header headerTo, const rpmTagVal *tagstocopy) |
|
HeaderIterator | headerFreeIterator (HeaderIterator hi) |
|
HeaderIterator | headerInitIterator (Header h) |
|
int | headerNext (HeaderIterator hi, rpmtd td) |
|
rpmTagVal | headerNextTag (HeaderIterator hi) |
|
RPM_GNUC_DEPRECATED int | headerNVR (Header h, const char **np, const char **vp, const char **rp) |
|
RPM_GNUC_DEPRECATED int | headerNEVRA (Header h, const char **np, uint32_t **ep, const char **vp, const char **rp, const char **ap) |
|
RPM_GNUC_DEPRECATED char * | headerGetNEVR (Header h, const char **np) |
|
RPM_GNUC_DEPRECATED char * | headerGetNEVRA (Header h, const char **np) |
|
RPM_GNUC_DEPRECATED char * | headerGetEVR (Header h, const char **np) |
|
char * | headerGetAsString (Header h, rpmTagVal tag) |
|
const char * | headerGetString (Header h, rpmTagVal tag) |
|
uint64_t | headerGetNumber (Header h, rpmTagVal tag) |
|
RPM_GNUC_DEPRECATED rpm_color_t | headerGetColor (Header h) |
|
int | headerIsSource (Header h) |
|
unsigned int | headerGetInstance (Header h) |
|
int | headerConvert (Header h, int op) |
|
|
int | headerPutBin (Header h, rpmTagVal tag, const uint8_t *val, rpm_count_t size) |
|
int | headerPutString (Header h, rpmTagVal tag, const char *val) |
|
int | headerPutStringArray (Header h, rpmTagVal tag, const char **val, rpm_count_t size) |
|
int | headerPutChar (Header h, rpmTagVal tag, const char *val, rpm_count_t size) |
|
int | headerPutUint8 (Header h, rpmTagVal tag, const uint8_t *val, rpm_count_t size) |
|
int | headerPutUint16 (Header h, rpmTagVal tag, const uint16_t *val, rpm_count_t size) |
|
int | headerPutUint32 (Header h, rpmTagVal tag, const uint32_t *val, rpm_count_t size) |
|
int | headerPutUint64 (Header h, rpmTagVal tag, const uint64_t *val, rpm_count_t size) |
|
An rpm header carries all information about a package. A header is a collection of data elements called tags. Each tag has a data type, and includes 1 or more values.
Definition in file header.h.
Modifier flags for headerGet() operation. For consistent behavior you'll probably want to use ALLOC to ensure the caller owns the data, but MINMEM is useful for avoiding extra copy of data when you are sure the header wont go away. Most of the time you'll probably want EXT too, but note that extensions tags don't generally honor the other flags, MINMEM, RAW, ALLOC and ARGV are only relevant for non-extension data.
Enumerator |
---|
HEADERGET_DEFAULT | |
HEADERGET_MINMEM | |
HEADERGET_EXT | |
HEADERGET_RAW | |
HEADERGET_ALLOC | |
HEADERGET_ARGV | |
Definition at line 186 of file header.h.
int headerAddI18NString |
( |
Header |
h, |
|
|
rpmTagVal |
tag, |
|
|
const char * |
string, |
|
|
const char * |
lang |
|
) |
| |
Add locale specific tag to header. A NULL lang is interpreted as the C locale. Here are the rules:
* - If the tag isn't in the header, it's added with the passed string
* as new value.
* - If the tag occurs multiple times in entry, which tag is affected
* by the operation is undefined.
* - If the tag is in the header w/ this language, the entry is
* *replaced* (like headerMod()).
*
This function is intended to just "do the right thing". If you need more fine grained control use headerPut() and headerMod().
- Parameters
-
h | header |
tag | tag |
string | tag value |
lang | locale |
- Returns
- 1 on success, 0 on failure
Type-safe methods for inserting tag data to header. Tag data type is validated to match the function type, ie things like headerPutUint32(h, RPMTAG_NAME, ...) will return failure. For non-array types size must equal 1, and data is checked to be non-NULL. For array types, add-or-append mode is always used.
headerPutString() can be used on both RPM_STRING_TYPE and RPM_STRING_ARRAY_TYPE (to add a single string into the array) tags, for others the type must match exactly.
These are intended to "do the right thing" in the common case, if you need more fine grained control use headerPut() & friends instead.
- Todo:
- Make doxygen group these meaningfully.
- Parameters
-
h | header |
tag | tag to insert |
val | pointer to value(s) |
size | number of items in array (1 or larger) |
- Returns
- 1 on success, 0 on failure