1 #ifndef _RPMDS_INTERNAL_H
2 #define _RPMDS_INTERNAL_H
3 
4 #include <rpm/rpmds.h>
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 /** \ingroup rpmds
11  * Swiss army knife dependency matching function.
12  * @param pool		string pool (or NULL for private pool)
13  * @param h		header
14  * @param prix		index to provides (or -1 or any)
15  * @param req		dependency set
16  * @param selfevr	only look at package EVR?
17  * @return		1 if dependency overlaps, 0 otherwise
18  */
19 RPM_GNUC_INTERNAL
20 int rpmdsMatches(rpmstrPool pool, Header h, int prix,
21 		 rpmds req, int selfevr);
22 
23 /** \ingroup rpmds
24  * Notify of results of dependency match.
25  * @param ds		dependency set
26  * @param where		where dependency was resolved (or NULL)
27  * @param rc		0 == YES, otherwise NO
28  */
29 RPM_GNUC_INTERNAL
30 void rpmdsNotify(rpmds ds, const char * where, int rc);
31 
32 /** \ingroup rpmds
33  * Return current dependency name pool id.
34  * @param ds            dependency set
35  * @return              current dependency name id, 0 on invalid
36  */
37 RPM_GNUC_INTERNAL
38 rpmsid rpmdsNId(rpmds ds);
39 
40 /** \ingroup rpmds
41  * Return current dependency epoch-version-release pool id.
42  * @param ds            dependency set
43  * @return              current dependency EVR id, 0 on invalid
44  */
45 RPM_GNUC_INTERNAL
46 rpmsid rpmdsEVRId(rpmds ds);
47 
48 /** \ingroup rpmds
49  * Return dependency set string pool handle
50  * @param ds		dependency set
51  * @return		string pool handle (weak reference)
52  */
53 RPM_GNUC_INTERNAL
54 rpmstrPool rpmdsPool(rpmds ds);
55 
56 RPM_GNUC_INTERNAL
57 rpmsid rpmdsNIdIndex(rpmds ds, int i);
58 
59 RPM_GNUC_INTERNAL
60 rpmsid rpmdsEVRIdIndex(rpmds ds, int i);
61 
62 RPM_GNUC_INTERNAL
63 const char * rpmdsNIndex(rpmds ds, int i);
64 
65 RPM_GNUC_INTERNAL
66 const char * rpmdsEVRIndex(rpmds ds, int i);
67 
68 RPM_GNUC_INTERNAL
69 rpmsenseFlags rpmdsFlagsIndex(rpmds ds, int i);
70 
71 RPM_GNUC_INTERNAL
72 int rpmdsTiIndex(rpmds ds, int i);
73 
74 RPM_GNUC_INTERNAL
75 rpm_color_t rpmdsColorIndex(rpmds ds, int i);
76 
77 RPM_GNUC_INTERNAL
78 int rpmdsCompareIndex(rpmds A, int aix, rpmds B, int bix);
79 
80 /** \ingroup rpmds
81  * Filter dependency set and return new dependency set containing only items
82  * with given trigger index.
83  * @param ds		dependency set
84  * @param ti		trigger index
85  * @return		new filtered dependency set
86  */
87 RPM_GNUC_INTERNAL
88 rpmds rpmdsFilterTi(rpmds ds, int ti);
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif /* _RPMDS_INTERNAL_H */
94