rpm: rpmlib.h Source File

rpm 4.16.1.3

rpmlib.h
Go to the documentation of this file.
1 #ifndef H_RPMLIB
2 #define H_RPMLIB
3
11 #include <rpm/rpmio.h>
12 #include <rpm/header.h>
13 #include <rpm/rpmtag.h>
14 #include <rpm/rpmds.h> /* XXX move rpmlib provides to rpmds instead */
15 #include <rpm/rpmpgp.h>
16 #include <rpm/rpmver.h>
17
18 #ifdef _RPM_4_4_COMPAT
19 #error RPM 4.4.x compatibility layer has been removed in RPM >= 4.14
20 #endif
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 extern struct rpmMacroContext_s * rpmGlobalMacroContext;
27
28 extern struct rpmMacroContext_s * rpmCLIMacroContext;
29
30 extern const char * const RPMVERSION;
31
32 extern const char * const rpmNAME;
33
34 extern const char * const rpmEVR;
35
36 extern const int rpmFLAGS;
37
38 /* ==================================================================== */
45 enum rpm_machtable_e {
46 RPM_MACHTABLE_INSTARCH = 0,
47 RPM_MACHTABLE_INSTOS = 1,
48 RPM_MACHTABLE_BUILDARCH = 2,
49 RPM_MACHTABLE_BUILDOS = 3
50 };
51 #define RPM_MACHTABLE_COUNT 4
59 int rpmReadConfigFiles(const char * file,
60 const char * target);
61
68 void rpmGetArchInfo( const char ** name,
69 int * num);
70
76 int rpmGetArchColor(const char *arch);
77
84 void rpmGetOsInfo( const char ** name,
85 int * num);
86
100 int rpmMachineScore(int type, const char * name);
101
107 int rpmShowRC(FILE * fp);
108
113 void rpmFreeRpmrc(void);
114
121 int rpmVersionCompare(Header first, Header second);
122
136 rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, char ** msg);
137
146 rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, char ** msg);
147
156 rpmRC rpmReadPackageFile(rpmts ts, FD_t fd,
157 const char * fn, Header * hdrp);
158
167 rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
168 char ** specFilePtr,
169 char ** cookie);
170
171 #ifdef __cplusplus
172 }
173 #endif
174
175 #endif /* H_RPMLIB */
rpmts
struct rpmts_s * rpmts
The main types involved in transaction manipulation.
Definition: rpmtypes.h:63
headerCheck
rpmRC headerCheck(rpmts ts, const void *uh, size_t uc, char **msg)
Check header consistency, performing headerGetEntry() the hard way.
rpmFreeRpmrc
void rpmFreeRpmrc(void)
Destroy rpmrc arch/os compatibility tables.
rpmMachineScore
int rpmMachineScore(int type, const char *name)
Return arch/os score of a name.
rpmGetArchColor
int rpmGetArchColor(const char *arch)
Return color for an arch.
rpmGetOsInfo
void rpmGetOsInfo(const char **name, int *num)
Return current os name and/or number.
rpmReadPackageFile
rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char *fn, Header *hdrp)
Return package header from file handle, verifying digests/signatures.
RPM_MACHTABLE_INSTOS
@ RPM_MACHTABLE_INSTOS
Definition: rpmlib.h:47
rpmEVR
const char *const rpmEVR
rpmRC
enum rpmRC_e rpmRC
Package read return codes.
rpmCLIMacroContext
struct rpmMacroContext_s * rpmCLIMacroContext
rpmInstallSourcePackage
rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, char **specFilePtr, char **cookie)
Install source package.
rpmGetArchInfo
void rpmGetArchInfo(const char **name, int *num)
Return current arch name and/or number.
rpmReadHeader
rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, char **msg)
Return checked and loaded header.
rpmShowRC
int rpmShowRC(FILE *fp)
Display current rpmrc (and macro) configuration.
RPMVERSION
const char *const RPMVERSION
FD_t
struct _FD_s * FD_t
RPM IO file descriptor type.
Definition: rpmtypes.h:99
RPM_MACHTABLE_BUILDARCH
@ RPM_MACHTABLE_BUILDARCH
Definition: rpmlib.h:48
rpm_machtable_e
rpm_machtable_e
Build and install arch/os table identifiers.
Definition: rpmlib.h:45
rpmVersionCompare
int rpmVersionCompare(Header first, Header second)
Compare headers to determine which header is "newer".
rpmNAME
const char *const rpmNAME
Header
struct headerToken_s * Header
RPM header and data retrieval types.
Definition: rpmtypes.h:24
rpmFLAGS
const int rpmFLAGS
RPM_MACHTABLE_INSTARCH
@ RPM_MACHTABLE_INSTARCH
Definition: rpmlib.h:46
rpmGlobalMacroContext
struct rpmMacroContext_s * rpmGlobalMacroContext
RPM_MACHTABLE_BUILDOS
@ RPM_MACHTABLE_BUILDOS
Definition: rpmlib.h:49