apply some patch for pythons rpm from opensource
[platform/upstream/rpm.git] / lib / rpmds_internal.h
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  * @param nopromote     dont promote epoch in comparison?
18  * @return              1 if dependency overlaps, 0 otherwise
19  */
20 RPM_GNUC_INTERNAL
21 int rpmdsMatches(rpmstrPool pool, Header h, int prix,
22                  rpmds req, int selfevr, int nopromote);
23
24 /** \ingroup rpmds
25  * Notify of results of dependency match.
26  * @param ds            dependency set
27  * @param where         where dependency was resolved (or NULL)
28  * @param rc            0 == YES, otherwise NO
29  */
30 RPM_GNUC_INTERNAL
31 void rpmdsNotify(rpmds ds, const char * where, int rc);
32
33 /** \ingroup rpmds
34  * Return current dependency name pool id.
35  * @param ds            dependency set
36  * @return              current dependency name id, 0 on invalid
37  */
38 RPM_GNUC_INTERNAL
39 rpmsid rpmdsNId(rpmds ds);
40
41 /** \ingroup rpmds
42  * Return current dependency epoch-version-release pool id.
43  * @param ds            dependency set
44  * @return              current dependency EVR id, 0 on invalid
45  */
46 RPM_GNUC_INTERNAL
47 rpmsid rpmdsEVRId(rpmds ds);
48
49 /** \ingroup rpmds
50  * Return dependency set string pool handle
51  * @param ds            dependency set
52  * @return              string pool handle (weak reference)
53  */
54 RPM_GNUC_INTERNAL
55 rpmstrPool rpmdsPool(rpmds ds);
56
57 RPM_GNUC_INTERNAL
58 rpmsid rpmdsNIdIndex(rpmds ds, int i);
59
60 RPM_GNUC_INTERNAL
61 rpmsid rpmdsEVRIdIndex(rpmds ds, int i);
62
63 RPM_GNUC_INTERNAL
64 const char * rpmdsNIndex(rpmds ds, int i);
65
66 RPM_GNUC_INTERNAL
67 const char * rpmdsEVRIndex(rpmds ds, int i);
68
69 RPM_GNUC_INTERNAL
70 rpmsenseFlags rpmdsFlagsIndex(rpmds ds, int i);
71
72 RPM_GNUC_INTERNAL
73 int rpmdsTiIndex(rpmds ds, int i);
74
75 RPM_GNUC_INTERNAL
76 rpm_color_t rpmdsColorIndex(rpmds ds, int i);
77
78 RPM_GNUC_INTERNAL
79 int rpmdsCompareIndex(rpmds A, int aix, rpmds B, int bix);
80
81 /** \ingroup rpmds
82  * Filter dependency set and return new dependency set containing only items
83  * with given trigger index.
84  * @param ds            dependency set
85  * @param ti            trigger index
86  * @return              new filtered dependency set
87  */
88 RPM_GNUC_INTERNAL
89 rpmds rpmdsFilterTi(rpmds ds, int ti);
90 #ifdef __cplusplus
91 }
92 #endif
93
94 #endif /* _RPMDS_INTERNAL_H */