csomh / source-git / rpm

Forked from source-git/rpm 4 years ago
Clone
2ff057
#ifndef _RPMFI_INTERNAL_H
2ff057
#define _RPMFI_INTERNAL_H
2ff057
2ff057
#include <rpm/header.h>
2ff057
#include <rpm/rpmfi.h>
2ff057
#include <rpm/rpmstrpool.h>
2ff057
#include "lib/fprint.h"
2ff057
#include "lib/cpio.h"
2ff057
2ff057
#define	RPMFIMAGIC	0x09697923
2ff057
2ff057
#ifdef __cplusplus
2ff057
extern "C" {
2ff057
#endif
2ff057
2ff057
/** \ingroup rpmfi
2ff057
 * Return file info set string pool handle
2ff057
 * @param fi		file info
2ff057
 * @return		string pool handle (weak reference)
2ff057
 */
2ff057
RPM_GNUC_INTERNAL
2ff057
rpmstrPool rpmfilesPool(rpmfiles fi);
2ff057
2ff057
/** \ingroup rpmfi
2ff057
 * Return current base name pool id from file info set.
2ff057
 * @param fi		file info set
2ff057
 * @return		current base name id, 0 on invalid
2ff057
 */
2ff057
RPM_GNUC_INTERNAL
2ff057
rpmsid rpmfiBNId(rpmfi fi);
2ff057
2ff057
/** \ingroup rpmfi
2ff057
 * Return current directory name pool id from file info set.
2ff057
 * @param fi		file info set
2ff057
 * @return		current base name id, 0 on invalid
2ff057
 */
2ff057
RPM_GNUC_INTERNAL
2ff057
rpmsid rpmfiDNId(rpmfi fi);
2ff057
2ff057
RPM_GNUC_INTERNAL
2ff057
rpmsid rpmfilesBNId(rpmfiles fi, int ix);
2ff057
2ff057
RPM_GNUC_INTERNAL
2ff057
rpmsid rpmfilesDNId(rpmfiles fi, int jx);
2ff057
2ff057
/** \ingroup rpmfi
2ff057
 * Return current original base name pool id from file info set.
2ff057
 * @param fi		file info set
2ff057
 * @return		current base name id, 0 on invalid
2ff057
 */
2ff057
RPM_GNUC_INTERNAL
2ff057
rpmsid rpmfiOBNId(rpmfi fi);
2ff057
2ff057
/** \ingroup rpmfi
2ff057
 * Return current original directory name pool id from file info set.
2ff057
 * @param fi		file info set
2ff057
 * @return		current base name id, 0 on invalid
2ff057
 */
2ff057
RPM_GNUC_INTERNAL
2ff057
rpmsid rpmfiODNId(rpmfi fi);
2ff057
2ff057
RPM_GNUC_INTERNAL
2ff057
rpmsid rpmfilesOBNId(rpmfiles fi, int ix);
2ff057
2ff057
RPM_GNUC_INTERNAL
2ff057
rpmsid rpmfilesODNId(rpmfiles fi, int jx);
2ff057
2ff057
RPM_GNUC_INTERNAL
2ff057
struct fingerPrint_s *rpmfilesFps(rpmfiles fi);
2ff057
2ff057
/** \ingroup rpmfi
2ff057
 * Check if the file in new package, in old package and on the disk have the same contents.
2ff057
 * @param 	new file info set
2ff057
 * @param 	new file index
2ff057
 * @param 	old file info set
2ff057
 * @param 	old file index
2ff057
 * @return	1 if the condition is satisfied, 0 otherwise
2ff057
 */
2ff057
RPM_GNUC_INTERNAL
2ff057
int rpmfileContentsEqual(rpmfiles ofi, int oix, rpmfiles nfi, int nix);
2ff057
2ff057
2ff057
RPM_GNUC_INTERNAL
2ff057
rpmFileAction rpmfilesDecideFate(rpmfiles ofi, int oix,
2ff057
				   rpmfiles nfi, int nix,
2ff057
                                   int skipMissing);
2ff057
2ff057
RPM_GNUC_INTERNAL
2ff057
int rpmfilesConfigConflict(rpmfiles fi, int ix);
2ff057
2ff057
RPM_GNUC_INTERNAL
2ff057
void rpmfilesSetFReplacedSize(rpmfiles fi, int ix, rpm_loff_t newsize);
2ff057
2ff057
RPM_GNUC_INTERNAL
2ff057
rpm_loff_t rpmfilesFReplacedSize(rpmfiles fi, int ix);
2ff057
2ff057
RPM_GNUC_INTERNAL
2ff057
void rpmfilesFpLookup(rpmfiles fi, fingerPrintCache fpc);
2ff057
2ff057
rpmfiles rpmfiFiles(rpmfi fi);
2ff057
2ff057
/** \ingroup rpmfi
2ff057
 * Return file iterator through files starting with given prefix.
2ff057
 * @param fi		file info set
2ff057
 * @param pfx		prefix
2ff057
 * @return		file iterator
2ff057
 */
2ff057
RPM_GNUC_INTERNAL
2ff057
rpmfi rpmfilesFindPrefix(rpmfiles fi, const char *pfx);
2ff057
#ifdef __cplusplus
2ff057
}
2ff057
#endif
2ff057
2ff057
#endif	/* _RPMFI_INTERNAL_H */
2ff057