Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

lib/header.h File Reference

An rpm header carries all information about a package. More...

#include <stdio.h>
#include <rpmio.h>

Go to the source code of this file.

Compounds

struct  headerSprintfExtension
struct  headerTagTableEntry

Defines

#define HEADER_DUMP_INLINE   1
#define RPM_MIN_TYPE   0
#define RPM_MAX_TYPE   9
#define HEADER_IMAGE   61
 Header private tags. More...

#define HEADER_SIGNATURES   62
#define HEADER_IMMUTABLE   63
#define HEADER_REGIONS   64
#define HEADER_I18NTABLE   100
#define HEADER_SIGBASE   256
#define HEADER_TAGBASE   1000

Typedefs

typedef int int_32
typedef short int int_16
typedef char int_8
typedef unsigned int uint_32
typedef unsigned short uint_16
typedef struct headerTokenHeader
typedef struct headerIteratorSHeaderIterator
typedef char* (* headerTagFormatFunction )(int_32 type, const void * data, char * formatPrefix, int padding, int element)
typedef int (* headerTagTagFunction )(Header h, int_32 * type, const void ** data, int_32 * count, int * freeData)
typedef const char* errmsg_t
typedef enum rpmTagType_e  rpmTagType
typedef enum rpmSubTagType_e  rpmSubTagType

Enumerations

enum  headerSprintfExtenstionType { HEADER_EXT_LAST = 0, HEADER_EXT_FORMAT, HEADER_EXT_MORE, HEADER_EXT_TAG }
enum  hMagic { HEADER_MAGIC_NO = 0, HEADER_MAGIC_YES = 1 }
enum  rpmTagType_e {
  RPM_NULL_TYPE = 0, RPM_CHAR_TYPE = 1, RPM_INT8_TYPE = 2, RPM_INT16_TYPE = 3,
  RPM_INT32_TYPE = 4, RPM_STRING_TYPE = 6, RPM_BIN_TYPE = 7, RPM_STRING_ARRAY_TYPE = 8,
  RPM_I18NSTRING_TYPE = 9#define RPM_MAX_TYPE
}
enum  rpmSubTagType_e { RPM_REGION_TYPE = -10, RPM_BIN_ARRAY_TYPE = -11, RPM_XREF_TYPE = -12 }

Functions

char* headerSprintf (Header h, const char * fmt, const struct headerTagTableEntry * tags, const struct headerSprintfExtension * extentions, errmsg_t * errmsg)
void headerCopyTags (Header headerFrom, Header headerTo, int_32 *tagstocopy)
void* headerFreeData ( const void * data, rpmTagType type)


Detailed Description

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.

Historical Issues
Here's a brief description of features/incompatibilities that have been added to headers and tags.

.
Development Issues
Here's a brief description of future features/incompatibilities that will be added to headers.

Definition in file header.h.


Define Documentation

#define HEADER_DUMP_INLINE   1
 

Definition at line 273 of file header.h.

#define HEADER_I18NTABLE   100
 

Definition at line 577 of file header.h.

#define HEADER_IMAGE   61
 

Header private tags.

Note:
General use tags should start at 1000 (RPM's tag space starts there).

Definition at line 573 of file header.h.

#define HEADER_IMMUTABLE   63
 

Definition at line 575 of file header.h.

#define HEADER_REGIONS   64
 

Definition at line 576 of file header.h.

#define HEADER_SIGBASE   256
 

Definition at line 578 of file header.h.

#define HEADER_SIGNATURES   62
 

Definition at line 574 of file header.h.

#define HEADER_TAGBASE   1000
 

Definition at line 579 of file header.h.

#define RPM_MAX_TYPE   9
 

#define RPM_MIN_TYPE   0
 


Typedef Documentation

typedef struct headerToken* Header
 

Definition at line 99 of file header.h.

typedef struct headerIteratorS* HeaderIterator
 

Definition at line 103 of file header.h.

typedef const char* errmsg_t
 

Definition at line 275 of file header.h.

typedef char* (* headerTagFormatFunction)(int_32 type, const void * data, char * formatPrefix, int padding, int element)
 

HEADER_EXT_TAG format function prototype. This will only ever be passed RPM_TYPE_INT32 or RPM_TYPE_STRING to help keep things simple

Parameters:
type   tag type
data   tag value
formatPrefix  
padding  
element  
Returns:
formatted string

Definition at line 134 of file header.h.

typedef int (* headerTagTagFunction)(Header h, int_32 * type, const void ** data, int_32 * count, int * freeData)
 

HEADER_EXT_FORMAT format function prototype. This is allowed to fail, which indicates the tag doesn't exist.

Parameters:
h   header
Return values:
type   address of tag type
data   address of tag value pointer
count   address of no. of data items
freedata   address of data-was-malloc'ed indicator
Returns:
0 on success

Definition at line 148 of file header.h.

typedef short int int_16
 

Definition at line 90 of file header.h.

typedef int int_32
 

Definition at line 89 of file header.h.

typedef char int_8
 

Definition at line 91 of file header.h.

typedef enum rpmSubTagType_e rpmSubTagType
 

New rpm data types under consideration/development. These data types may (or may not) be added to rpm at some point. In order to avoid incompatibility with legacy versions of rpm, these data (sub-)types are introduced into the header by overloading RPM_BIN_TYPE, with the binary value of the tag a 16 byte image of what should/will be in the header index, followed by per-tag private data.

typedef enum rpmTagType_e rpmTagType
 

The basic types of data in tags from headers.

typedef unsigned short uint_16
 

Definition at line 94 of file header.h.

typedef unsigned int uint_32
 

Definition at line 93 of file header.h.


Generated at Sun Apr 8 18:43:04 2001 for rpm by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000