From cef9afbf2ab652e3a8d9f1aa96d517036408d81b Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 22 Dec 2009 13:25:48 +0200 Subject: Make header struct really opaque outside header.c - the low-level stuff in signature.c and package.c need entryInfo_s and indexEntry_s but not the header itself - also move the other defines which have no use outside header.c there --- lib/header_internal.h | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'lib/header_internal.h') diff --git a/lib/header_internal.h b/lib/header_internal.h index d9cb67ecb..cc8b8939c 100644 --- a/lib/header_internal.h +++ b/lib/header_internal.h @@ -5,12 +5,8 @@ * \file lib/header_internal.h */ -#include - #include -#define INDEX_MALLOC_SIZE 8 - /** \ingroup header * Description of tag data. */ @@ -25,10 +21,6 @@ struct entryInfo_s { #define REGION_TAG_TYPE RPM_BIN_TYPE #define REGION_TAG_COUNT sizeof(struct entryInfo_s) -#define ENTRY_IS_REGION(_e) \ - (((_e)->info.tag >= HEADER_IMAGE) && ((_e)->info.tag < HEADER_REGIONS)) -#define ENTRY_IN_REGION(_e) ((_e)->info.offset < 0) - /** \ingroup header * A single tag from a Header. */ @@ -40,26 +32,6 @@ struct indexEntry_s { int rdlen; /*!< No. bytes of data in region. */ }; -typedef enum headerFlags_e { - HEADERFLAG_SORTED = (1 << 0), /*!< Are header entries sorted? */ - HEADERFLAG_ALLOCATED = (1 << 1), /*!< Is 1st header region allocated? */ - HEADERFLAG_LEGACY = (1 << 2), /*!< Header came from legacy source? */ - HEADERFLAG_DEBUG = (1 << 3), /*!< Debug this header? */ -} headerFlags; - -/** \ingroup header - * The Header data structure. - */ -struct headerToken_s { - void * blob; /*!< Header region blob. */ - indexEntry index; /*!< Array of tags. */ - int indexUsed; /*!< Current size of tag array. */ - int indexAlloced; /*!< Allocated size of tag array. */ - unsigned int instance; /*!< Rpmdb instance (offset) */ - headerFlags flags; - int nrefs; /*!< Reference count. */ -}; - /** * Sanity check on no. of tags. * This check imposes a limit of 65K tags, more than enough. -- cgit v1.2.3