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

- File List
- Globals

# rpmfc.h

Go to the documentation of this file.

    00001 #ifndef _H_RPMFC_
    00002 #define _H_RPMFC_
    00003
    00009 #include <magic.h>
    00010
    00011 #include <rpm/rpmtypes.h>
    00012 #include <rpm/argv.h>   /* for ARGV_t */
    00013 #include <rpm/rpmstring.h>      /* for StringBuf */
    00014 #include <rpm/rpmspec.h>        /* for Package */
    00015
    00016 #ifdef __cplusplus
    00017 extern "C" {
    00018 #endif
    00019
    00020 extern int _rpmfc_debug;
    00021
    00024 typedef struct rpmfc_s * rpmfc;
    00025
    00028 enum FCOLOR_e {
    00029     RPMFC_BLACK                 = 0,
    00030     RPMFC_ELF32                 = (1 <<  0),
    00031     RPMFC_ELF64                 = (1 <<  1),
    00032     RPMFC_ELFMIPSN32            = (1 <<  2),
    00033 #define RPMFC_ELF       (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32)
    00034         /* (1 << 3) leaks into package headers, reserved */
    00035
    00036         /* bits 4-7 unused */
    00037     RPMFC_PKGCONFIG             = (1 <<  8),
    00038     RPMFC_LIBTOOL               = (1 <<  9),
    00039     RPMFC_BOURNE                = (1 << 10),
    00040     RPMFC_MONO                  = (1 << 11),
    00041
    00042     RPMFC_SCRIPT                = (1 << 12),
    00043     RPMFC_STATIC                = (1 << 13),
    00044     RPMFC_NOTSTRIPPED           = (1 << 14),
    00045         /* bit 15 unused */
    00046
    00047         /* bits 16-19 are enumerated, not bits */
    00048     RPMFC_DIRECTORY             = (1 << 16),
    00049     RPMFC_SYMLINK               = (2 << 16),
    00050     RPMFC_DEVICE                = (3 << 16),
    00051     RPMFC_LIBRARY               = (4 << 16),
    00052     RPMFC_FONT                  = (5 << 16),
    00053     RPMFC_IMAGE                 = (6 << 16),
    00054     RPMFC_MANPAGE               = (7 << 16),
    00055     RPMFC_TEXT                  = (8 << 16),
    00056     RPMFC_DOCUMENT              = (9 << 16),
    00057
    00058     RPMFC_ARCHIVE               = (1 << 20),
    00059     RPMFC_COMPRESSED            = (1 << 21),
    00060     RPMFC_MODULE                = (1 << 22),
    00061     RPMFC_EXECUTABLE            = (1 << 23),
    00062
    00063     RPMFC_PERL                  = (1 << 24),
    00064     RPMFC_JAVA                  = (1 << 25),
    00065     RPMFC_PYTHON                = (1 << 26),
    00066     RPMFC_PHP                   = (1 << 27),
    00067     RPMFC_TCL                   = (1 << 28),
    00068
    00069     RPMFC_WHITE                 = (1 << 29),
    00070     RPMFC_INCLUDE               = (1 << 30),
    00071     RPMFC_ERROR                 = (1 << 31)
    00072 };
    00073
    00076 typedef enum FCOLOR_e FCOLOR_t;
    00077
    00080 typedef const struct rpmfcTokens_s * rpmfcToken;
    00081
    00089 int rpmfcExec(ARGV_const_t av, StringBuf sb_stdin, StringBuf * sb_stdoutp,
    00090                 int failnonzero);
    00091
    00097 int rpmfcColoring(const char * fmstr);
    00098
    00106 void rpmfcPrint(const char * msg, rpmfc fc, FILE * fp);
    00107
    00113 rpmfc rpmfcFree(rpmfc fc);
    00114
    00119 rpmfc rpmfcNew(void);
    00120
    00128 rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode);
    00129
    00135 rpmRC rpmfcApply(rpmfc fc);
    00136
    00143 rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg);
    00144
    00150 rpmds rpmfcProvides(rpmfc fc);
    00151
    00157 rpmds rpmfcRequires(rpmfc fc);
    00158
    00159 #ifdef __cplusplus
    00160 }
    00161 #endif
    00162
    00163 #endif /* _H_RPMFC_ */