- Main Page
- Related Pages
- Modules
- Data Structures
- Files

# rpmfi.h

Go to the documentation of this file.

    00001 #ifndef H_RPMFI
    00002 #define H_RPMFI
    00003
    00009 #include <rpm/rpmtypes.h>
    00010 #include <rpm/rpmvf.h>
    00011 #include <rpm/rpmpgp.h>
    00012
    00013 #ifdef __cplusplus
    00014 extern "C" {
    00015 #endif
    00016
    00017 extern int _rpmfi_debug;
    00018
    00026 typedef enum rpmFileTypes_e {
    00027     PIPE        =  1,
    00028     CDEV        =  2,
    00029     XDIR        =  4,
    00030     BDEV        =  6,
    00031     REG         =  8,
    00032     LINK        = 10,
    00033     SOCK        = 12
    00034 } rpmFileTypes;
    00035
    00039 typedef enum rpmfileState_e {
    00040     RPMFILE_STATE_NORMAL        = 0,
    00041     RPMFILE_STATE_REPLACED      = 1,
    00042     RPMFILE_STATE_NOTINSTALLED  = 2,
    00043     RPMFILE_STATE_NETSHARED     = 3,
    00044     RPMFILE_STATE_WRONGCOLOR    = 4
    00045 } rpmfileState;
    00046 #define RPMFILE_STATE_MISSING   -1      /* XXX used for unavailable data */
    00047
    00051 typedef enum rpmfileAttrs_e {
    00052     RPMFILE_NONE        = 0,
    00053     RPMFILE_CONFIG      = (1 <<  0),
    00054     RPMFILE_DOC         = (1 <<  1),
    00055     RPMFILE_ICON        = (1 <<  2),
    00056     RPMFILE_MISSINGOK   = (1 <<  3),
    00057     RPMFILE_NOREPLACE   = (1 <<  4),
    00058     RPMFILE_SPECFILE    = (1 <<  5),
    00059     RPMFILE_GHOST       = (1 <<  6),
    00060     RPMFILE_LICENSE     = (1 <<  7),
    00061     RPMFILE_README      = (1 <<  8),
    00062     RPMFILE_EXCLUDE     = (1 <<  9),
    00063     RPMFILE_UNPATCHED   = (1 << 10),
    00064     RPMFILE_PUBKEY      = (1 << 11),
    00065     RPMFILE_POLICY      = (1 << 12)
    00066 } rpmfileAttrs;
    00067
    00068 #define RPMFILE_ALL     ~(RPMFILE_NONE)
    00069
    00073 typedef enum rpmFileAction_e {
    00074     FA_UNKNOWN = 0,
    00075     FA_CREATE,
    00076     FA_COPYIN,
    00077     FA_COPYOUT,
    00078     FA_BACKUP,
    00079     FA_SAVE,
    00080     FA_SKIP,
    00081     FA_ALTNAME,
    00082     FA_ERASE,
    00083     FA_SKIPNSTATE,
    00084     FA_SKIPNETSHARED,
    00085     FA_SKIPCOLOR
    00086 } rpmFileAction;
    00087
    00088 #define XFA_SKIPPING(_a)        \
    00089     ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)
    00090
    00094 struct rpmRelocation_s {
    00095     char * oldPath;
    00096     char * newPath;
    00097 };
    00098
    00105 rpmfi rpmfiUnlink (rpmfi fi,
    00106                 const char * msg);
    00107
    00114 rpmfi rpmfiLink (rpmfi fi, const char * msg);
    00115
    00121 rpm_count_t rpmfiFC(rpmfi fi);
    00122
    00128 int rpmfiFX(rpmfi fi);
    00129
    00136 int rpmfiSetFX(rpmfi fi, int fx);
    00137
    00143 rpm_count_t rpmfiDC(rpmfi fi);
    00144
    00150 int rpmfiDX(rpmfi fi);
    00151
    00158 int rpmfiSetDX(rpmfi fi, int dx);
    00159
    00165 const char * rpmfiBN(rpmfi fi);
    00166
    00172 const char * rpmfiDN(rpmfi fi);
    00173
    00179 const char * rpmfiFN(rpmfi fi);
    00180
    00186 rpmfileAttrs rpmfiFFlags(rpmfi fi);
    00187
    00193 rpmVerifyAttrs rpmfiVFlags(rpmfi fi);
    00194
    00200 rpm_mode_t rpmfiFMode(rpmfi fi);
    00201
    00207 rpmfileState rpmfiFState(rpmfi fi);
    00208
    00216 const unsigned char * rpmfiFDigest(rpmfi fi, pgpHashAlgo *algo, size_t *diglen);
    00217
    00227 char * rpmfiFDigestHex(rpmfi fi, pgpHashAlgo *algo);
    00228
    00235 const unsigned char * rpmfiMD5(rpmfi fi) RPM_GNUC_DEPRECATED;
    00236
    00242 const char * rpmfiFLink(rpmfi fi);
    00243
    00249 rpm_loff_t rpmfiFSize(rpmfi fi);
    00250
    00256 rpm_rdev_t rpmfiFRdev(rpmfi fi);
    00257
    00263 rpm_ino_t rpmfiFInode(rpmfi fi);
    00264
    00270 rpm_color_t rpmfiColor(rpmfi fi);
    00271
    00277 rpm_color_t rpmfiFColor(rpmfi fi);
    00278
    00284 const char * rpmfiFClass(rpmfi fi);
    00285
    00291 const char * rpmfiFContext(rpmfi fi);
    00292
    00299 uint32_t rpmfiFDepends(rpmfi fi,
    00300                 const uint32_t ** fddictp);
    00301
    00307 uint32_t rpmfiFNlink(rpmfi fi);
    00308
    00314 rpm_time_t rpmfiFMtime(rpmfi fi);
    00315
    00321 const char * rpmfiFUser(rpmfi fi);
    00322
    00328 const char * rpmfiFGroup(rpmfi fi);
    00329
    00335 int rpmfiNext(rpmfi fi);
    00336
    00343 rpmfi rpmfiInit(rpmfi fi, int fx);
    00344
    00350 int rpmfiNextD(rpmfi fi);
    00351
    00358 rpmfi rpmfiInitD(rpmfi fi, int dx);
    00359
    00365 rpmfi rpmfiFree(rpmfi fi);
    00366
    00376 rpmfi rpmfiNew(const rpmts ts, Header h, rpmTag tagN, int scareMem);
    00377
    00383 rpmFileTypes rpmfiWhatis(rpm_mode_t mode);
    00384
    00391 int rpmfiCompare(const rpmfi afi, const rpmfi bfi);
    00392
    00400 rpmFileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing);
    00401
    00407 int rpmfiConfigConflict(const rpmfi fi);
    00408
    00414 const char * rpmfiTypeString(rpmfi fi);
    00415
    00416 #ifdef __cplusplus
    00417 }
    00418 #endif
    00419
    00420 #endif  /* H_RPMDS */