allow rpm to custom systemd installation
[platform/upstream/rpm.git] / lib / rpmgi.h
1 #ifndef H_RPMGI
2 #define H_RPMGI
3
4 /** \ingroup rpmio
5  * \file lib/rpmgi.h
6  */
7
8 #include <rpm/rpmtypes.h>
9 #include <rpm/argv.h>
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 /** \ingroup rpmgi
16  */
17 enum rpmgiFlags_e {
18     RPMGI_NONE          = 0,
19     RPMGI_NOGLOB        = (1 << 2),
20     RPMGI_NOMANIFEST    = (1 << 3),
21 };
22
23 typedef rpmFlags rpmgiFlags;
24
25 extern rpmgiFlags giFlags;
26
27 /** \ingroup rpmgi 
28  * Destroy a generalized iterator.
29  * @param gi            generalized iterator
30  * @return              NULL always
31  */
32 RPM_GNUC_INTERNAL
33 rpmgi rpmgiFree(rpmgi gi);
34
35 /** \ingroup rpmgi
36  * Return a generalized iterator.
37  * @param ts            transaction set
38  * @param flags         iterator flags
39  * @param argv          arg list
40  * @return              new iterator
41  */
42 RPM_GNUC_INTERNAL
43 rpmgi rpmgiNew(rpmts ts, rpmgiFlags flags, ARGV_const_t argv);
44
45 /** \ingroup rpmgi
46  * Perform next iteration step.
47  * @param gi            generalized iterator
48  * @returns             next header (new reference), NULL on end of iteration
49  */
50 RPM_GNUC_INTERNAL
51 Header rpmgiNext(rpmgi gi);
52
53 /** \ingroup rpmgi
54  * Return number of errors (file not found etc) encountered during iteration
55  * @param gi            generalized iterator
56  * @return              number of errors
57  */
58 RPM_GNUC_INTERNAL
59 int rpmgiNumErrors(rpmgi gi);
60
61 #ifdef __cplusplus
62 }
63 #endif
64
65 #endif  /* H_RPMGI */