1 #ifndef _RPMFI_INTERNAL_H
2 #define _RPMFI_INTERNAL_H
4 #include <rpm/header.h>
6 #include "lib/fsm.h" /* for FSM_t */
10 typedef struct sharedFileInfo_s * sharedFileInfo;
14 struct sharedFileInfo_s {
22 * A package filename set.
25 int i; /*!< Current file index. */
26 int j; /*!< Current directory index. */
28 const char * Type; /*!< Tag name. */
30 rpmTag tagN; /*!< Header tag. */
31 Header h; /*!< Header for file info set (or NULL) */
34 const char ** bnl; /*!< Base name(s) (from header) */
36 const char ** dnl; /*!< Directory name(s) (from header) */
38 const char ** flinks; /*!< File link(s) (from header) */
39 const char ** flangs; /*!< File lang(s) (from header) */
41 uint32_t * dil; /*!< Directory indice(s) (from header) */
43 const rpm_flag_t * fflags; /*!< File flag(s) (from header) */
45 const rpm_off_t * fsizes; /*!< File size(s) (from header) */
47 const rpm_time_t * fmtimes; /*!< File modification time(s) (from header) */
49 rpm_mode_t * fmodes; /*!< File mode(s) (from header) */
51 const rpm_rdev_t * frdevs; /*!< File rdev(s) (from header) */
53 const rpm_ino_t * finodes; /*!< File inodes(s) (from header) */
55 const char ** fuser; /*!< File owner(s) (from header) */
56 const char ** fgroup; /*!< File group(s) (from header) */
58 char * fstates; /*!< File state(s) (from header) */
60 const rpm_color_t * fcolors;/*!< File color bits (header) */
62 const char ** fcontexts; /*! FIle security contexts. */
64 const char ** fcaps; /*! File capabilities (header) */
66 const char ** cdict; /*!< File class dictionary (header) */
67 rpm_count_t ncdict; /*!< No. of class entries. */
68 const uint32_t * fcdictx; /*!< File class dictionary index (header) */
70 const uint32_t * ddict; /*!< File depends dictionary (header) */
71 rpm_count_t nddict; /*!< No. of depends entries. */
72 const uint32_t * fddictx; /*!< File depends dictionary start (header) */
73 const uint32_t * fddictn; /*!< File depends dictionary count (header) */
76 const rpm_flag_t * vflags; /*!< File verify flag(s) (from header) */
78 rpm_count_t dc; /*!< No. of directories. */
79 rpm_count_t fc; /*!< No. of files. */
81 /*=============================*/
84 headerGetFlags scareFlags; /*!< headerGet flags wrt scareMem */
85 /*-----------------------------*/
86 rpmfileAttrs flags; /*!< File flags (default). */
87 rpmFileAction action; /*!< File disposition (default). */
88 rpmFileAction * actions; /*!< File disposition(s). */
89 struct fingerPrint_s * fps; /*!< File fingerprint(s). */
91 pgpHashAlgo digestalgo; /*!< File checksum algorithm */
92 unsigned char * digests; /*!< File checksums in binary. */
94 #define RPMFI_HAVE_PRETRANS (1 << 0)
95 #define RPMFI_HAVE_POSTTRANS (1 << 1)
96 int transscripts; /*!< pre/posttrans script existence */
98 char * fn; /*!< File name buffer. */
102 rpm_loff_t archiveSize;
104 FSM_t fsm; /*!< File state machine data. */
105 int keep_header; /*!< Keep header? */
106 sharedFileInfo replaced; /*!< (TR_ADDED) */
107 rpm_off_t * replacedSizes; /*!< (TR_ADDED) */
108 unsigned int record; /*!< (TR_REMOVED) */
110 #define RPMFIMAGIC 0x09697923
111 /*=============================*/
113 int nrefs; /*!< Reference count. */
117 rpmfi rpmfiUpdateState(rpmfi fi, rpmts ts, rpmte p);
119 #endif /* _RPMFI_INTERNAL_H */