Split out rpmgi_internal.h from rpmgi.h

This commit is contained in:
Ralf Corsépius 2007-10-29 13:34:53 +01:00
parent 9a628446ce
commit 69f402c320
5 changed files with 49 additions and 38 deletions

View File

@ -23,7 +23,8 @@ librpm_la_SOURCES = \
cpio.c cpio.h depends.c formats.c fs.c fsm.c fsm.h getdate.c \
idtx.c manifest.c manifest.h misc.c package.c \
poptALL.c poptI.c poptQV.c psm.c psm.h query.c \
rpmal.c rpmchecksig.c rpmds.c rpmfi.c rpmgi.c rpminstall.c \
rpmal.c rpmchecksig.c rpmds.c rpmfi.c rpmgi.c rpmgi_internal.h \
rpminstall.c \
rpmlead.c rpmlead.h rpmlibprov.c rpmps.c rpmrc.c rpmte.c rpmts.c \
rpmvercmp.c signature.c signature.h stringbuf.c transaction.c \
verify.c rpmlock.c rpmlock.h misc.h

View File

@ -14,8 +14,7 @@
#include "rpmdb.h"
#include "rpmfi.h"
#define _RPMGI_INTERNAL /* XXX for gi->flags */
#include "rpmgi.h"
#include "rpmgi_internal.h"
#include "rpmts.h"
#include "manifest.h"

View File

@ -6,9 +6,8 @@
#include "rpmlib.h"
#include "rpmte.h" /* XXX rpmElementType */
#define _RPMGI_INTERNAL
#define _RPMTS_INTERNAL /* XXX ts->probs et al */
#include "rpmgi.h"
#include "rpmgi_internal.h"
#include "rpmdb.h"
#include "rpmmacro.h" /* XXX rpmExpand */

View File

@ -31,39 +31,6 @@ typedef enum rpmgiFlags_e {
extern rpmgiFlags giFlags;
#if defined(_RPMGI_INTERNAL)
#include "fts.h"
/** \ingroup rpmio
*/
struct rpmgi_s {
rpmts ts; /*!< Iterator transaction set. */
int tag; /*!< Iterator type. */
const void * keyp; /*!< Iterator key. */
size_t keylen; /*!< Iterator key length. */
rpmgiFlags flags; /*!< Iterator control bits. */
int active; /*!< Iterator is active? */
int i; /*!< Element index. */
const char * hdrPath; /*!< Path to current iterator header. */
Header h; /*!< Current iterator header. */
rpmtsi tsi;
rpmdbMatchIterator mi;
FD_t fd;
ARGV_t argv;
int argc;
int ftsOpts;
FTS * ftsp;
FTSENT * fts;
int nrefs; /*!< Reference count. */
};
#endif
/**
* Unreference a generalized iterator instance.
* @param gi generalized iterator

45
lib/rpmgi_internal.h Normal file
View File

@ -0,0 +1,45 @@
#ifndef _RPMGI_INTERNAL_H
#define _RPMGI_INTERNAL_H
#include "rpmgi.h"
#include "fts.h"
ifdef __cplusplus
extern "C" {
#endif
/** \ingroup rpmio
*/
struct rpmgi_s {
rpmts ts; /*!< Iterator transaction set. */
int tag; /*!< Iterator type. */
const void * keyp; /*!< Iterator key. */
size_t keylen; /*!< Iterator key length. */
rpmgiFlags flags; /*!< Iterator control bits. */
int active; /*!< Iterator is active? */
int i; /*!< Element index. */
const char * hdrPath; /*!< Path to current iterator header. */
Header h; /*!< Current iterator header. */
rpmtsi tsi;
rpmdbMatchIterator mi;
FD_t fd;
ARGV_t argv;
int argc;
int ftsOpts;
FTS * ftsp;
FTSENT * fts;
int nrefs; /*!< Reference count. */
};
#ifdef __cplusplus
}
#endif
#endif /* _RPMGI_INTERNAL_H */