rpm  5.4.14
rpmns.h
Go to the documentation of this file.
1 #ifndef H_RPMNS
2 #define H_RPMNS
3 
4 #include <sys/types.h> /* XXX size_t typedef */
5 #include <rpmiotypes.h>
6 
14 /*@-exportlocal@*/
15 /*@unchecked@*/
16 extern int _rpmns_debug;
17 /*@=exportlocal@*/
18 
19 /*@unchecked@*/ /*@observer@*/ /*@relnull@*/
20 extern const char *_rpmns_N_at_A;
21 
22 typedef /*@abstract@*/ struct rpmns_s * rpmns;
23 
27 typedef enum nsType_e {
29  RPMNS_TYPE_STRING = (1 << 0),
30  RPMNS_TYPE_PATH = (1 << 1),
31  RPMNS_TYPE_DSO = (1 << 2),
32  RPMNS_TYPE_FUNCTION = (1 << 3),
33  RPMNS_TYPE_ARCH = (1 << 4),
34  RPMNS_TYPE_VERSION = (1 << 5),
35  RPMNS_TYPE_COMPOUND = (1 << 6),
36  /* 7 unused */
38  RPMNS_TYPE_RPMLIB = (1 << 9),
39  RPMNS_TYPE_CPUINFO = (1 << 10),
40  RPMNS_TYPE_GETCONF = (1 << 11),
41  RPMNS_TYPE_UNAME = (1 << 12),
42  RPMNS_TYPE_SONAME = (1 << 13),
43  RPMNS_TYPE_ACCESS = (1 << 14),
44  RPMNS_TYPE_TAG = (1 << 15),
45  RPMNS_TYPE_USER = (1 << 16),
46  RPMNS_TYPE_GROUP = (1 << 17),
47  RPMNS_TYPE_MOUNTED = (1 << 18),
48  RPMNS_TYPE_DISKSPACE= (1 << 19),
49  RPMNS_TYPE_DIGEST = (1 << 20),
50  RPMNS_TYPE_GNUPG = (1 << 21),
51  RPMNS_TYPE_MACRO = (1 << 22),
52  RPMNS_TYPE_ENVVAR = (1 << 23),
53  RPMNS_TYPE_RUNNING = (1 << 24),
54  RPMNS_TYPE_SANITY = (1 << 25),
55  RPMNS_TYPE_VCHECK = (1 << 26),
56  RPMNS_TYPE_SIGNATURE= (1 << 27),
57  RPMNS_TYPE_VERIFY = (1 << 28),
58  RPMNS_TYPE_CONFIG = (1 << 29),
59  RPMNS_TYPE_SET = (1 << 30),
60  RPMNS_TYPE_DPKG = (1 << 31)
61 } nsType;
62 
63 #if defined(_RPMNS_INTERNAL)
64 
67 struct rpmns_s {
68 /*@owned@*/
69  const char * str;
70  nsType Type;
71 /*@dependent@*/ /*@null@*/
72  const char * NS;
73 /*@dependent@*/ /*@relnull@*/
74  const char * N;
75 /*@dependent@*/ /*@null@*/
76  const char * A;
77  evrFlags Flags;
78 };
79 #endif /* _RPMNS_INTERNAL */
80 
81 #ifdef __cplusplus
82 extern "C" {
83 #endif
84 
90 nsType rpmnsArch(const char * str)
91  /*@*/;
92 
99 nsType rpmnsProbe(const char * s, size_t slen)
100  /*@*/;
101 
108 nsType rpmnsClassify(const char * s, size_t slen)
109  /*@*/;
110 
117 int rpmnsParse(const char * str, rpmns ns)
118  /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
119  /*@modifies ns, rpmGlobalMacroContext, internalState @*/;
120 
124 void rpmnsClean(void)
125  /*@globals internalState @*/
126  /*@modifies internalState @*/;
127 
138 rpmRC rpmnsProbeSignature(void * _ts, const char * fn,
139  /*@null@*/ const char * sigfn,
140  /*@null@*/ const char * pubfn,
141  /*@null@*/ const char * pubid,
142  int flags)
143  /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
144  /*@modifies _ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
145 
146 #ifdef __cplusplus
147 }
148 #endif
149 
150 #endif /* H_RPMNS */
int _rpmns_debug
Definition: rpmns.c:40
nsType rpmnsArch(const char *str)
Is string a known arch suffix?
Definition: rpmns.c:70
DBT * A
Definition: db3.c:1890
enum nsType_e nsType
Dependency types.
nsType rpmnsProbe(const char *s, size_t slen)
Is string a known probe namespace?
Definition: rpmns.c:170
nsType rpmnsClassify(const char *s, size_t slen)
Classify a string as a dependency type.
Definition: rpmns.c:197
repo _ts
Definition: rpmrepo.c:164
const char * N
Definition: rpmds.c:2714
enum evrFlags_e evrFlags
Dependency Attributes.
enum rpmRC_e rpmRC
RPM return codes.
Definition: signature.c:616
size_t ns
Definition: db3.c:1892
void rpmnsClean(void)
Clean global name space dependency sets.
Definition: depends.c:858
rpmRC rpmnsProbeSignature(void *_ts, const char *fn, const char *sigfn, const char *pubfn, const char *pubid, int flags)
Verify OpenPGP signature on a file.
Definition: rpmns.c:323
struct rpmns_s * rpmns
Definition: rpmns.h:22
nsType_e
Dependency types.
Definition: rpmns.h:27
const char * s
Definition: poptALL.c:734
int flags
Definition: fnmatch.c:282
const char * NS
Definition: rpmds.c:2713
evrFlags Flags
Definition: rpmds.c:2717
int rpmnsParse(const char *s, rpmns ns)
Expand and split NS(N).A string into namespace, name and arch components.
Definition: rpmns.c:236
const char * _rpmns_N_at_A
Definition: rpmns.c:43
size_t fn
Definition: macro.c:1698