Stash rpmdb struct definition out of sight into dbi.h
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 7 Apr 2010 09:38:20 +0000 (12:38 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 7 Apr 2010 09:38:20 +0000 (12:38 +0300)
- not perhaps the ideal place for it but the backend level needs
  access to the main db in several places anyway, and this leaves
  rpmdb_internal.h clear for internal-only APIs

lib/backend/dbi.h
lib/rpmdb_internal.h

index 3bae2a4..fd9c170 100644 (file)
@@ -1,9 +1,37 @@
 #ifndef _DBI_H
 #define _DBI_H
 
-
 typedef struct _dbiIndex * dbiIndex;
 
+/** \ingroup rpmdb
+ * Describes the collection of index databases used by rpm.
+ */
+struct rpmdb_s {
+    char       * db_root;/*!< path prefix */
+    char       * db_home;/*!< directory path */
+    char       * db_fullpath;  /*!< full db path including prefix */
+    int                db_flags;
+    int                db_mode;        /*!< open mode */
+    int                db_perms;       /*!< open permissions */
+    int                db_api;         /*!< Berkeley API type */
+    int                db_remove_env;
+    int                db_chrootDone;  /*!< If chroot(2) done, ignore db_root. */
+    int                db_mkdirDone;   /*!< Has db_home been created? */
+    unsigned char * db_bits;   /*!< package instance bit mask. */
+    int                db_nbits;       /*!< no. of bits in mask. */
+    rpmdb      db_next;
+    int                db_opens;
+    void *     db_dbenv;       /*!< Berkeley DB_ENV handle. */
+    int                db_ndbi;        /*!< No. of tag indices. */
+    dbiIndex * _dbi;           /*!< Tag indices. */
+
+    struct rpmop_s db_getops;
+    struct rpmop_s db_putops;
+    struct rpmop_s db_delops;
+
+    int nrefs;                 /*!< Reference count. */
+};
+
 /* Type of the dbi, also serves as the join key size */
 typedef enum dbiIndexType_e {
     DBI_PRIMARY        = (1 * sizeof(int32_t)),
index fa78690..6c9ec7b 100644 (file)
@@ -9,35 +9,6 @@
 #include <rpm/rpmutil.h>
 #include "lib/backend/dbi.h"
 
-/** \ingroup rpmdb
- * Describes the collection of index databases used by rpm.
- */
-struct rpmdb_s {
-    char       * db_root;/*!< path prefix */
-    char       * db_home;/*!< directory path */
-    char       * db_fullpath;  /*!< full db path including prefix */
-    int                db_flags;
-    int                db_mode;        /*!< open mode */
-    int                db_perms;       /*!< open permissions */
-    int                db_api;         /*!< Berkeley API type */
-    int                db_remove_env;
-    int                db_chrootDone;  /*!< If chroot(2) done, ignore db_root. */
-    int                db_mkdirDone;   /*!< Has db_home been created? */
-    unsigned char * db_bits;   /*!< package instance bit mask. */
-    int                db_nbits;       /*!< no. of bits in mask. */
-    rpmdb      db_next;
-    int                db_opens;
-    void *     db_dbenv;       /*!< Berkeley DB_ENV handle. */
-    int                db_ndbi;        /*!< No. of tag indices. */
-    dbiIndex * _dbi;           /*!< Tag indices. */
-
-    struct rpmop_s db_getops;
-    struct rpmop_s db_putops;
-    struct rpmop_s db_delops;
-
-    int nrefs;                 /*!< Reference count. */
-};
-
 #ifdef __cplusplus
 extern "C" {
 #endif