rpmfi.h
Go to the documentation of this file.
#ifndef H_RPMFI
#define H_RPMFI
#include <rpm/rpmtypes.h>
#include <rpm/rpmvf.h>
#include <rpm/rpmpgp.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum rpmFileTypes_e {
PIPE = 1,
CDEV = 2,
XDIR = 4,
BDEV = 6,
REG = 8,
LINK = 10,
SOCK = 12
} rpmFileTypes;
typedef enum rpmfileState_e {
RPMFILE_STATE_MISSING = -1, /* used for unavailable data */
RPMFILE_STATE_NORMAL = 0,
RPMFILE_STATE_REPLACED = 1,
RPMFILE_STATE_NOTINSTALLED = 2,
RPMFILE_STATE_NETSHARED = 3,
RPMFILE_STATE_WRONGCOLOR = 4
} rpmfileState;
#define RPMFILE_IS_INSTALLED(_x) ((_x) == RPMFILE_STATE_NORMAL || (_x) == RPMFILE_STATE_NETSHARED)
enum rpmfileAttrs_e {
RPMFILE_NONE = 0,
RPMFILE_CONFIG = (1 << 0),
RPMFILE_DOC = (1 << 1),
RPMFILE_ICON = (1 << 2),
RPMFILE_MISSINGOK = (1 << 3),
RPMFILE_NOREPLACE = (1 << 4),
RPMFILE_SPECFILE = (1 << 5),
RPMFILE_GHOST = (1 << 6),
RPMFILE_LICENSE = (1 << 7),
RPMFILE_README = (1 << 8),
/* bits 9-10 unused */
RPMFILE_PUBKEY = (1 << 11),
};
typedef rpmFlags rpmfileAttrs;
#define RPMFILE_ALL ~(RPMFILE_NONE)
typedef enum rpmFileAction_e {
FA_UNKNOWN = 0,
FA_CREATE,
FA_COPYIN,
FA_COPYOUT,
FA_BACKUP,
FA_SAVE,
FA_SKIP,
FA_ALTNAME,
FA_ERASE,
FA_SKIPNSTATE,
FA_SKIPNETSHARED,
FA_SKIPCOLOR
} rpmFileAction;
#define XFA_SKIPPING(_a) \
((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)
struct rpmRelocation_s {
char * oldPath;
char * newPath;
};
rpmfi rpmfiLink (rpmfi fi);
rpm_count_t rpmfiFC(rpmfi fi);
int rpmfiFX(rpmfi fi);
int rpmfiSetFX(rpmfi fi, int fx);
rpm_count_t rpmfiDC(rpmfi fi);
int rpmfiDX(rpmfi fi);
int rpmfiSetDX(rpmfi fi, int dx);
const char * rpmfiBN(rpmfi fi);
const char * rpmfiDN(rpmfi fi);
const char * rpmfiFN(rpmfi fi);
rpmfileAttrs rpmfiFFlags(rpmfi fi);
rpmVerifyAttrs rpmfiVFlags(rpmfi fi);
rpm_mode_t rpmfiFMode(rpmfi fi);
rpmfileState rpmfiFState(rpmfi fi);
int rpmfiDigestAlgo(rpmfi fi);
const unsigned char * rpmfiFDigest(rpmfi fi, int *algo, size_t *diglen);
char * rpmfiFDigestHex(rpmfi fi, int *algo);
const unsigned char * rpmfiMD5(rpmfi fi) RPM_GNUC_DEPRECATED;
const char * rpmfiFLink(rpmfi fi);
rpm_loff_t rpmfiFSize(rpmfi fi);
rpm_rdev_t rpmfiFRdev(rpmfi fi);
rpm_ino_t rpmfiFInode(rpmfi fi);
rpm_color_t rpmfiColor(rpmfi fi);
rpm_color_t rpmfiFColor(rpmfi fi);
const char * rpmfiFClass(rpmfi fi);
uint32_t rpmfiFDepends(rpmfi fi,
const uint32_t ** fddictp);
uint32_t rpmfiFNlink(rpmfi fi);
rpm_time_t rpmfiFMtime(rpmfi fi);
const char * rpmfiFUser(rpmfi fi);
const char * rpmfiFGroup(rpmfi fi);
const char * rpmfiFCaps(rpmfi fi);
const char * rpmfiFLangs(rpmfi fi);
int rpmfiNext(rpmfi fi);
rpmfi rpmfiInit(rpmfi fi, int fx);
int rpmfiNextD(rpmfi fi);
rpmfi rpmfiInitD(rpmfi fi, int dx);
rpmfi rpmfiFree(rpmfi fi);
enum rpmfiFlags_e {
RPMFI_NOHEADER = 0,
RPMFI_KEEPHEADER = (1 << 0),
RPMFI_NOFILECLASS = (1 << 1),
RPMFI_NOFILEDEPS = (1 << 2),
RPMFI_NOFILELANGS = (1 << 3),
RPMFI_NOFILEUSER = (1 << 4),
RPMFI_NOFILEGROUP = (1 << 5),
RPMFI_NOFILEMODES = (1 << 6),
RPMFI_NOFILESIZES = (1 << 7),
RPMFI_NOFILECAPS = (1 << 8),
RPMFI_NOFILELINKTOS = (1 << 9),
RPMFI_NOFILEDIGESTS = (1 << 10),
RPMFI_NOFILEMTIMES = (1 << 11),
RPMFI_NOFILERDEVS = (1 << 12),
RPMFI_NOFILEINODES = (1 << 13),
RPMFI_NOFILESTATES = (1 << 14),
RPMFI_NOFILECOLORS = (1 << 15),
RPMFI_NOFILEVERIFYFLAGS = (1 << 16),
RPMFI_NOFILEFLAGS = (1 << 17),
};
typedef rpmFlags rpmfiFlags;
#define RPMFI_FLAGS_ERASE \
(RPMFI_NOFILECLASS | RPMFI_NOFILELANGS | \
RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | RPMFI_NOFILEINODES | \
RPMFI_NOFILEVERIFYFLAGS)
#define RPMFI_FLAGS_INSTALL \
(RPMFI_NOFILECLASS | RPMFI_NOFILEVERIFYFLAGS)
#define RPMFI_FLAGS_VERIFY \
(RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
RPMFI_NOFILECOLORS)
#define RPMFI_FLAGS_QUERY \
(RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
RPMFI_NOFILECOLORS | RPMFI_NOFILEVERIFYFLAGS)
rpmfi rpmfiNewPool(rpmstrPool pool, Header h, rpmTagVal tagN, rpmfiFlags flags);
rpmfi rpmfiNew(const rpmts ts, Header h, rpmTagVal tagN, rpmfiFlags flags);
rpmFileTypes rpmfiWhatis(rpm_mode_t mode);
int rpmfiCompare(const rpmfi afi, const rpmfi bfi);
rpmFileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing);
int rpmfiConfigConflict(const rpmfi fi);
#ifdef __cplusplus
}
#endif
#endif /* H_RPMDS */