summaryrefslogtreecommitdiff
path: root/lib/rpmgi.h
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2004-10-19 15:54:38 +0000
committerjbj <devnull@localhost>2004-10-19 15:54:38 +0000
commit343b3223e8d23b17809eb04db1d9826a8a709edb (patch)
tree1cc92f801cd6d99cd529ef83956b58ccd3543dbe /lib/rpmgi.h
parentfb6dac4267136d0209ccdd5ddb13691c178f0ffe (diff)
downloadrpm-343b3223e8d23b17809eb04db1d9826a8a709edb.tar.gz
rpm-343b3223e8d23b17809eb04db1d9826a8a709edb.tar.bz2
rpm-343b3223e8d23b17809eb04db1d9826a8a709edb.zip
Merge iterator types into pseudo tags.
Load argv and ftpopts through iterator modifier, not creator. CVS patchset: 7486 CVS date: 2004/10/19 15:54:38
Diffstat (limited to 'lib/rpmgi.h')
-rw-r--r--lib/rpmgi.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/lib/rpmgi.h b/lib/rpmgi.h
index 6d41cac41..160d6b471 100644
--- a/lib/rpmgi.h
+++ b/lib/rpmgi.h
@@ -17,16 +17,6 @@
extern int _rpmgi_debug;
/*@=exportlocal@*/
-/**
- * Iterator types.
- */
-typedef enum rpmgiTag_e {
- RPMGI_RPMDB = RPMDBI_PACKAGES,
- RPMGI_HDLIST = 6, /* XXX next after RPMDBI_AVAILABLE */
- RPMGI_ARGLIST = 7,
- RPMGI_FTSWALK = 8
-} rpmgiTag;
-
#if defined(_RPMGI_INTERNAL)
/** \ingroup rpmio
*/
@@ -34,12 +24,13 @@ struct rpmgi_s {
/*@refcounted@*/
rpmts ts; /*!< Iterator transaction set. */
int tag; /*!< Iterator type. */
- int active; /*!< Iterator is initialized? */
+ void * keyp; /*!< Iterator key. */
+ size_t keylen; /*!< Iterator key length. */
+
+ int active; /*!< Iterator is active? */
int i; /*!< Element index. */
/*@null@*/
- const char * queryFormat; /*!< Iterator query format. */
-/*@null@*/
- const char * hdrPath; /*!< Path to current header object. */
+ const char * hdrPath; /*!< Path to current iterator header. */
/*@refcounted@*/ /*@null@*/
Header h; /*!< Current iterator header. */
@@ -119,7 +110,7 @@ rpmgi rpmgiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi)
* @return new general iterator
*/
/*@null@*/
-rpmgi rpmgiNew(rpmts ts, int tag, void *const keyp, size_t keylen)
+rpmgi rpmgiNew(rpmts ts, int tag, void * keyp, size_t keylen)
/*@globals internalState @*/
/*@modifies ts, internalState @*/;
@@ -144,12 +135,20 @@ const char * rpmgiHdrPath(rpmgi gi)
/**
* Return current iteration header.
* @param gi generalized iterator
- * @returns next element
+ * @returns header
*/
/*@null@*/
Header rpmgiHeader(/*@null@*/ rpmgi gi)
/*@*/;
+/**
+ * Load iterator args.
+ * @param gi generalized iterator
+ * @returns RPMRC_OK
+ */
+rpmRC rpmgiSetArgs(rpmgi gi, ARGV_t, int flags)
+ /*@modifies gi @*/;
+
#ifdef __cplusplus
}
#endif