Make rpmfi struct opaque outside rpmfi.c

- Now that its possible (no matter how feebly), this makes changing
  rpmfi internals a bit easier
This commit is contained in:
Panu Matilainen 2013-11-06 11:50:50 +02:00
parent 9550e13978
commit ffda2460cd
2 changed files with 64 additions and 64 deletions

View File

@ -39,6 +39,70 @@ typedef struct hardlinks_s * hardlinks_t;
#undef HTKEYTYPE
#undef HTDATATYPE
/**
* A package filename set.
*/
struct rpmfi_s {
int i; /*!< Current file index. */
int j; /*!< Current directory index. */
Header h; /*!< Header for file info set (or NULL) */
rpmstrPool pool; /*!< String pool of this file info set */
rpmsid * bnid; /*!< Index to base name(s) (pool) */
rpmsid * dnid; /*!< Index to directory name(s) (pool) */
rpmsid * flinks; /*!< Index to file link(s) (pool) */
uint32_t * dil; /*!< Directory indice(s) (from header) */
rpm_flag_t * fflags; /*!< File flag(s) (from header) */
rpm_off_t * fsizes; /*!< File size(s) (from header) */
rpm_loff_t * lfsizes; /*!< File size(s) (from header) */
rpm_time_t * fmtimes; /*!< File modification time(s) (from header) */
rpm_mode_t * fmodes; /*!< File mode(s) (from header) */
rpm_rdev_t * frdevs; /*!< File rdev(s) (from header) */
rpm_ino_t * finodes; /*!< File inodes(s) (from header) */
rpmsid * fuser; /*!< Index to file owner(s) (misc pool) */
rpmsid * fgroup; /*!< Index to file group(s) (misc pool) */
rpmsid * flangs; /*!< Index to file lang(s) (misc pool) */
char * fstates; /*!< File state(s) (from header) */
rpm_color_t * fcolors; /*!< File color bits (header) */
char ** fcaps; /*!< File capability strings (header) */
char ** cdict; /*!< File class dictionary (header) */
rpm_count_t ncdict; /*!< No. of class entries. */
uint32_t * fcdictx; /*!< File class dictionary index (header) */
uint32_t * ddict; /*!< File depends dictionary (header) */
rpm_count_t nddict; /*!< No. of depends entries. */
uint32_t * fddictx; /*!< File depends dictionary start (header) */
uint32_t * fddictn; /*!< File depends dictionary count (header) */
rpm_flag_t * vflags; /*!< File verify flag(s) (from header) */
rpm_count_t dc; /*!< No. of directories. */
rpm_count_t fc; /*!< No. of files. */
rpmfiFlags fiflags; /*!< file info set control flags */
struct fingerPrint_s * fps; /*!< File fingerprint(s). */
int digestalgo; /*!< File digest algorithm */
unsigned char * digests; /*!< File digests in binary. */
char * fn; /*!< File name buffer. */
char ** apath;
struct nlinkHash_s * nlinks;/*!< Files connected by hardlinks */
rpm_off_t * replacedSizes; /*!< (TR_ADDED) */
rpm_loff_t * replacedLSizes;/*!< (TR_ADDED) */
rpmcpio_t archive; /*!< Archive with payload */
int magic;
int nrefs; /*!< Reference count. */
};
static rpmfi rpmfiUnlink(rpmfi fi)
{
if (fi)

View File

@ -9,70 +9,6 @@
#define RPMFIMAGIC 0x09697923
/**
* A package filename set.
*/
struct rpmfi_s {
int i; /*!< Current file index. */
int j; /*!< Current directory index. */
Header h; /*!< Header for file info set (or NULL) */
rpmstrPool pool; /*!< String pool of this file info set */
rpmsid * bnid; /*!< Index to base name(s) (pool) */
rpmsid * dnid; /*!< Index to directory name(s) (pool) */
rpmsid * flinks; /*!< Index to file link(s) (pool) */
uint32_t * dil; /*!< Directory indice(s) (from header) */
rpm_flag_t * fflags; /*!< File flag(s) (from header) */
rpm_off_t * fsizes; /*!< File size(s) (from header) */
rpm_loff_t * lfsizes; /*!< File size(s) (from header) */
rpm_time_t * fmtimes; /*!< File modification time(s) (from header) */
rpm_mode_t * fmodes; /*!< File mode(s) (from header) */
rpm_rdev_t * frdevs; /*!< File rdev(s) (from header) */
rpm_ino_t * finodes; /*!< File inodes(s) (from header) */
rpmsid * fuser; /*!< Index to file owner(s) (misc pool) */
rpmsid * fgroup; /*!< Index to file group(s) (misc pool) */
rpmsid * flangs; /*!< Index to file lang(s) (misc pool) */
char * fstates; /*!< File state(s) (from header) */
rpm_color_t * fcolors; /*!< File color bits (header) */
char ** fcaps; /*!< File capability strings (header) */
char ** cdict; /*!< File class dictionary (header) */
rpm_count_t ncdict; /*!< No. of class entries. */
uint32_t * fcdictx; /*!< File class dictionary index (header) */
uint32_t * ddict; /*!< File depends dictionary (header) */
rpm_count_t nddict; /*!< No. of depends entries. */
uint32_t * fddictx; /*!< File depends dictionary start (header) */
uint32_t * fddictn; /*!< File depends dictionary count (header) */
rpm_flag_t * vflags; /*!< File verify flag(s) (from header) */
rpm_count_t dc; /*!< No. of directories. */
rpm_count_t fc; /*!< No. of files. */
rpmfiFlags fiflags; /*!< file info set control flags */
struct fingerPrint_s * fps; /*!< File fingerprint(s). */
int digestalgo; /*!< File digest algorithm */
unsigned char * digests; /*!< File digests in binary. */
char * fn; /*!< File name buffer. */
char ** apath;
struct nlinkHash_s * nlinks;/*!< Files connected by hardlinks */
rpm_off_t * replacedSizes; /*!< (TR_ADDED) */
rpm_loff_t * replacedLSizes;/*!< (TR_ADDED) */
rpmcpio_t archive; /*!< Archive with payload */
int magic;
int nrefs; /*!< Reference count. */
};
#ifdef __cplusplus
extern "C" {
#endif