rpm  5.4.10
rpmal.h
Go to the documentation of this file.
1 #ifndef H_RPMAL
2 #define H_RPMAL
3 
9 #include <rpmds.h>
10 #include <rpmfi.h>
11 
12 /*@-exportlocal@*/
13 /*@unchecked@*/
14 extern int _rpmal_debug;
15 /*@=exportlocal@*/
16 
17 #define RPMAL_NOMATCH ((alKey)-1L)
18 
22 /*@-mutrep@*/
23 typedef /*@abstract@*/ int alNum;
24 /*@=mutrep@*/
25 
28 typedef /*@abstract@*/ struct rpmal_s * rpmal;
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
40 /*@unused@*/ /*@null@*/
41 rpmal rpmalUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmal al,
42  /*@null@*/ const char * msg)
43  /*@modifies al @*/;
44 #define rpmalUnlink(_al, _msg) \
45  ((rpmal)rpmioUnlinkPoolItem((rpmioItem)(_al), _msg, __FILE__, __LINE__))
46 
53 /*@unused@*/ /*@newref@*/ /*@null@*/
54 rpmal rpmalLink (/*@null@*/ rpmal al, /*@null@*/ const char * msg)
55  /*@modifies al @*/;
56 #define rpmalLink(_al, _msg) \
57  ((rpmal)rpmioLinkPoolItem((rpmioItem)(_al), _msg, __FILE__, __LINE__))
58 
64 /*@null@*/
65 rpmal rpmalFree(/*@killref@*/ /*@null@*/ rpmal al)
66  /*@modifies al @*/;
67 #define rpmalFree(_al) \
68  ((rpmal)rpmioFreePoolItem((rpmioItem)(_al), __FUNCTION__, __FILE__, __LINE__))
69 
75 /*@-exportlocal@*/
76 /*@only@*/
77 rpmal rpmalNew(int delta)
78  /*@*/;
79 /*@=exportlocal@*/
80 
86 /*@-exportlocal@*/
87 void rpmalDel(/*@null@*/ rpmal al, /*@null@*/ alKey pkgKey)
88  /*@globals fileSystem @*/
89  /*@modifies al, fileSystem @*/;
90 /*@=exportlocal@*/
91 
102 alKey rpmalAdd(rpmal * alistp,
103  /*@dependent@*/ /*@null@*/ alKey pkgKey,
104  /*@dependent@*/ /*@null@*/ fnpyKey key,
105  /*@null@*/ rpmds provides, /*@null@*/ rpmfi fi,
107  /*@globals fileSystem @*/
108  /*@modifies *alistp, provides, fi, fileSystem @*/;
109 
117 /*@-exportlocal@*/
118 void rpmalAddProvides(rpmal al,
119  /*@dependent@*/ /*@null@*/ alKey pkgKey,
120  /*@null@*/ rpmds provides, rpmuint32_t tscolor)
121  /*@modifies al, provides @*/;
122 /*@=exportlocal@*/
123 
128 void rpmalMakeIndex(/*@null@*/ rpmal al)
129  /*@modifies al @*/;
130 
138 /*@-exportlocal@*/
139 /*@only@*/ /*@null@*/
140 fnpyKey * rpmalAllFileSatisfiesDepend(/*@null@*/ const rpmal al,
141  /*@null@*/ const rpmds ds, /*@null@*/ alKey * keyp)
142  /*@globals fileSystem, internalState @*/
143  /*@modifies al, *keyp, fileSystem, internalState @*/;
144 /*@=exportlocal@*/
145 
153 /*@only@*/ /*@null@*/
154 fnpyKey * rpmalAllSatisfiesDepend(const rpmal al, const rpmds ds,
155  /*@null@*/ alKey * keyp)
156  /*@globals fileSystem, internalState @*/
157  /*@modifies al, *keyp, fileSystem, internalState @*/;
158 
167 /*@null@*/
168 fnpyKey rpmalSatisfiesDepend(const rpmal al, const rpmds ds,
169  /*@null@*/ alKey * keyp)
170  /*@globals fileSystem, internalState @*/
171  /*@modifies al, *keyp, fileSystem, internalState @*/;
172 
173 #ifdef __cplusplus
174 }
175 #endif
176 
177 #endif /* H_RPMAL */
void rpmalAddProvides(rpmal al, alKey pkgKey, rpmds provides, rpmuint32_t tscolor)
Add package provides to available list index.
Definition: rpmal.c:277
fnpyKey * rpmalAllSatisfiesDepend(const rpmal al, const rpmds ds, alKey *keyp)
Check added package file lists for package(s) that have a provide.
Definition: rpmal.c:391
Structure(s) used for file info tag sets.
int alNum
An added/available package retrieval index.
Definition: rpmal.h:23
#define rpmalFree(_al)
Definition: rpmal.h:67
rpmal rpmalNew(int delta)
Initialize available list.
Definition: rpmal.c:178
rpmuint32_t tscolor
Definition: rpmal.c:93
int _rpmal_debug
Definition: rpmal.c:31
struct rpmds_s * rpmds
Dependency tag sets from a header, so that a header can be discarded early.
Definition: rpmtypes.h:28
unsigned int rpmuint32_t
Definition: rpmiotypes.h:25
alKey rpmalAdd(rpmal *alistp, alKey pkgKey, fnpyKey key, rpmds provides, rpmfi fi, rpmuint32_t tscolor)
Add package to available list.
Definition: rpmal.c:213
struct rpmfi_s * rpmfi
File info tag sets from a header, so that a header can be discarded early.
Definition: rpmfi.h:78
int delta
Definition: rpmal.c:90
Set of available packages, items, and directories.
Definition: rpmal.c:85
Structure(s) used for dependency tag sets.
void * alKey
An added/available package retrieval key.
Definition: rpmtypes.h:19
fnpyKey rpmalSatisfiesDepend(const rpmal al, const rpmds ds, alKey *keyp)
Check added package file lists for first package that has a provide.
Definition: rpmal.c:480
#define rpmalLink(_al, _msg)
Definition: rpmal.h:56
const void * fnpyKey
Definition: rpmiotypes.h:118
void rpmalDel(rpmal al, alKey pkgKey)
Delete package from available list.
Definition: rpmal.c:194
void rpmalMakeIndex(rpmal al)
Generate index for available list.
Definition: rpmal.c:320
struct rpmal_s * rpmal
Definition: rpmal.h:28
fnpyKey * rpmalAllFileSatisfiesDepend(const rpmal al, const rpmds ds, alKey *keyp)
Check added package file lists for package(s) that provide a file.
Definition: rpmal.c:350
#define rpmalUnlink(_al, _msg)
Definition: rpmal.h:44