17 extern int _rpmgi_debug;
22 typedef /*@abstract@*/ struct rpmgi_s * rpmgi;
26 typedef enum rpmgiTag_e {
27 RPMGI_RPMDB = RPMDBI_PACKAGES,
28 RPMGI_HDLIST = 6, /* XXX next after RPMDBI_AVAILABLE */
33 #if defined(_RPMGI_INTERNAL)
41 rpmdbMatchIterator mi;
59 * Unreference a generalized iterator instance.
60 * @param gi generalized iterator
64 /*@unused@*/ /*@null@*/
65 rpmgi rpmgiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi,
66 /*@null@*/ const char * msg)
69 /** @todo Remove debugging entry from the ABI. */
72 rpmgi XrpmgiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi,
73 /*@null@*/ const char * msg, const char * fn, unsigned ln)
76 #define rpmgiUnlink(_gi, _msg) XrpmgiUnlink(_gi, _msg, __FILE__, __LINE__)
79 * Reference a generalized iterator instance.
80 * @param gi generalized iterator
82 * @return new generalized iterator reference
84 /*@unused@*/ /*@newref@*/ /*@null@*/
85 rpmgi rpmgiLink (/*@null@*/ rpmgi gi, /*@null@*/ const char * msg)
88 /** @todo Remove debugging entry from the ABI. */
89 /*@newref@*/ /*@null@*/
90 rpmgi XrpmgiLink (/*@null@*/ rpmgi gi, /*@null@*/ const char * msg,
91 const char * fn, unsigned ln)
93 #define rpmgiLink(_gi, _msg) XrpmgiLink(_gi, _msg, __FILE__, __LINE__)
95 /** Destroy a generalized iterator.
96 * @param gi generalized iterator
100 rpmgi rpmgiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi)
103 /** Create a generalized iterator.
104 * @param argv iterator argv array
105 * @param flags iterator flags
106 * @return new general iterator
109 rpmgi rpmgiNew(rpmts ts, int tag, const void * keyp, size_t keylen)
112 const char * rpmgiNext(/*@null@*/ rpmgi gi)