#include <rpm/rpmio.h>
#include <rpm/rpmtypes.h>
#include <rpm/rpmtd.h>
#include <rpm/rpmutil.h>
Go to the source code of this file.
Typedefs | |
typedef enum headerGetFlags_e | headerGetFlags |
typedef enum headerPutFlags_e | headerPutFlags |
typedef enum headerConvOps_e | headerConvOps |
Enumerations | |
enum | hMagic { HEADER_MAGIC_NO = 0, HEADER_MAGIC_YES = 1 } |
Include calculation for 8 bytes of (magic, 0)? More... | |
enum | headerGetFlags_e { HEADERGET_DEFAULT = 0, HEADERGET_MINMEM = (1 << 0), HEADERGET_EXT = (1 << 1), HEADERGET_RAW = (1 << 2), HEADERGET_ALLOC = (1 << 3) } |
enum | headerPutFlags_e { HEADERPUT_DEFAULT = 0, HEADERPUT_APPEND = (1 << 0) } |
enum | headerConvOps_e { HEADERCONV_EXPANDFILELIST = 0, HEADERCONV_COMPRESSFILELIST = 1, HEADERCONV_RETROFIT_V3 = 2 } |
Functions | |
Header | headerNew (void) |
Create new (empty) header instance. | |
Header | headerFree (Header h) |
Dereference a header instance. | |
Header | headerLink (Header h) |
Reference a header instance. | |
Header | headerUnlink (Header h) |
Dereference a header instance. | |
void | headerSort (Header h) |
Sort tags in header. | |
void | headerUnsort (Header h) |
Restore tags in header to original ordering. | |
unsigned int | headerSizeof (Header h, enum hMagic magicp) |
Return size of on-disk header representation in bytes. | |
int | headerVerifyInfo (int il, int dl, const void *pev, void *iv, int negate) |
Perform simple sanity and range checks on header tag(s). | |
void * | headerUnload (Header h) |
Convert header to on-disk representation. | |
Header | headerReload (Header h, rpmTag tag) |
Convert header to on-disk representation, and then reload. | |
Header | headerCopy (Header h) |
Duplicate a header. | |
Header | headerLoad (void *uh) |
Convert header to in-memory representation. | |
Header | headerCopyLoad (const void *uh) |
Make a copy and convert header to in-memory representation. | |
Header | headerRead (FD_t fd, enum hMagic magicp) |
Read (and load) header from file handle. | |
int | headerWrite (FD_t fd, Header h, enum hMagic magicp) |
Write (with unload) header to file handle. | |
int | headerIsEntry (Header h, rpmTag tag) |
Check if tag is in header. | |
int | headerGet (Header h, rpmTag tag, rpmtd td, headerGetFlags flags) |
Retrieve tag value. | |
int | headerPut (Header h, rpmtd td, headerPutFlags flags) |
Add or append tag to header. | |
int | headerAddI18NString (Header h, rpmTag tag, const char *string, const char *lang) |
Add locale specific tag to header. | |
int | headerMod (Header h, rpmtd td) |
Modify tag in header. | |
int | headerDel (Header h, rpmTag tag) |
Delete tag in header. | |
char * | headerFormat (Header h, const char *fmt, errmsg_t *errmsg) |
Return formatted output string from header tags. | |
void | headerCopyTags (Header headerFrom, Header headerTo, const rpmTag *tagstocopy) |
Duplicate tag values from one header into another. | |
HeaderIterator | headerFreeIterator (HeaderIterator hi) |
Destroy header tag iterator. | |
HeaderIterator | headerInitIterator (Header h) |
Create header tag iterator. | |
int | headerNext (HeaderIterator hi, rpmtd td) |
Return next tag from header. | |
int | headerNVR (Header h, const char **np, const char **vp, const char **rp) |
Return name, version, release strings from header. | |
int | headerNEVRA (Header h, const char **np, uint32_t **ep, const char **vp, const char **rp, const char **ap) |
Return name, epoch, version, release, arch strings from header. | |
char * | headerGetNEVR (Header h, const char **np) |
Return (malloc'd) header name-version-release string. | |
char * | headerGetNEVRA (Header h, const char **np) |
Return (malloc'd) header name-version-release.arch string. | |
char * | headerGetEVR (Header h, const char **np) |
rpm_color_t | headerGetColor (Header h) |
Return header color. | |
int | headerIsSource (Header h) |
Check if header is a source or binary package header. | |
int | headerConvert (Header h, headerConvOps op) |
Convert header to/from (legacy) data presentation. | |
int | headerPutString (Header h, rpmTag tag, const char *val) |
Type-safe methods for inserting tag data to header. | |
int | headerPutStringArray (Header h, rpmTag tag, const char **val, rpm_count_t size) |
int | headerPutBin (Header h, rpmTag tag, uint8_t *val, rpm_count_t size) |
int | headerPutChar (Header h, rpmTag tag, char *val, rpm_count_t size) |
int | headerPutUint8 (Header h, rpmTag tag, uint8_t *val, rpm_count_t size) |
int | headerPutUint16 (Header h, rpmTag tag, uint16_t *val, rpm_count_t size) |
int | headerPutUint32 (Header h, rpmTag tag, uint32_t *val, rpm_count_t size) |
int | headerPutUint64 (Header h, rpmTag tag, uint64_t *val, rpm_count_t size) |
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.
typedef enum headerConvOps_e headerConvOps |
typedef enum headerGetFlags_e headerGetFlags |
typedef enum headerPutFlags_e headerPutFlags |
enum headerConvOps_e |
enum headerGetFlags_e |
enum headerPutFlags_e |
char* headerGetEVR | ( | Header | h, | |
const char ** | np | |||
) |