summaryrefslogtreecommitdiff
path: root/lib/rpmgi.h
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2004-10-19 02:30:25 +0000
committerjbj <devnull@localhost>2004-10-19 02:30:25 +0000
commitfb6dac4267136d0209ccdd5ddb13691c178f0ffe (patch)
treecad3536aafe219ba4e560c4167cbefe1364dff4a /lib/rpmgi.h
parent67ce81d2013ce58c55f65d151e0206d590a505bf (diff)
downloadrpm-fb6dac4267136d0209ccdd5ddb13691c178f0ffe.tar.gz
rpm-fb6dac4267136d0209ccdd5ddb13691c178f0ffe.tar.bz2
rpm-fb6dac4267136d0209ccdd5ddb13691c178f0ffe.zip
Store path to header in iterator.
Iterator returns rpmRC rather than value, eliminate queryFormat methods. CVS patchset: 7485 CVS date: 2004/10/19 02:30:25
Diffstat (limited to 'lib/rpmgi.h')
-rw-r--r--lib/rpmgi.h54
1 files changed, 14 insertions, 40 deletions
diff --git a/lib/rpmgi.h b/lib/rpmgi.h
index 0636f3537..6d41cac41 100644
--- a/lib/rpmgi.h
+++ b/lib/rpmgi.h
@@ -36,12 +36,14 @@ struct rpmgi_s {
int tag; /*!< Iterator type. */
int active; /*!< Iterator is initialized? */
int i; /*!< Element index. */
+/*@null@*/
const char * queryFormat; /*!< Iterator query format. */
- const char * hdrPath; /*!< Path to header objects. */
+/*@null@*/
+ const char * hdrPath; /*!< Path to current header object. */
/*@refcounted@*/ /*@null@*/
Header h; /*!< Current iterator header. */
-/*@relnull@*/
+/*@null@*/
rpmdbMatchIterator mi;
/*@refcounted@*/
@@ -122,59 +124,31 @@ rpmgi rpmgiNew(rpmts ts, int tag, void *const keyp, size_t keylen)
/*@modifies ts, internalState @*/;
/**
- * Return next iteration element.
+ * Perform next iteration step.
* @param gi generalized iterator
- * @returns next element
+ * @returns RPMRC_OK on success, RPMRC_NOTFOUND on EOI
*/
-/*@only@*/
-const char * rpmgiNext(/*@null@*/ rpmgi gi)
+rpmRC rpmgiNext(/*@null@*/ rpmgi gi)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/;
/**
- * Return current iteration header.
- * @param gi generalized iterator
- * @returns next element
- */
-/*@null@*/
-Header rpmgiHeader(/*@null@*/ rpmgi gi)
- /*@*/;
-
-/**
- * Return iterator query format.
- * @param gi generalized iterator
- * @returns query format
- */
-/*@observer@*/
-const char * rpmgiQueryFormat(rpmgi gi)
- /*@*/;
-
-/**
- * Set iterator query format.
- * @param gi generalized iterator
- * @param queryFormat query format
- * @returns 0
- */
-int rpmgiSetQueryFormat(rpmgi gi, const char * queryFormat)
- /*@modifies gi @*/;
-
-/**
- * Return iterator header objects path.
+ * Return current header path.
* @param gi generalized iterator
* @returns header path
*/
-/*@observer@*/
+/*@observer@*/ /*@null@*/
const char * rpmgiHdrPath(rpmgi gi)
/*@*/;
/**
- * Set iterator header objects path.
+ * Return current iteration header.
* @param gi generalized iterator
- * @param hdrPath header path
- * @returns 0
+ * @returns next element
*/
-int rpmgiSetHdrPath(rpmgi gi, const char * hdrPath)
- /*@modifies gi @*/;
+/*@null@*/
+Header rpmgiHeader(/*@null@*/ rpmgi gi)
+ /*@*/;
#ifdef __cplusplus
}