Add a getter for dbi name
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 20 Oct 2010 09:23:14 +0000 (12:23 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 20 Oct 2010 09:23:14 +0000 (12:23 +0300)
lib/backend/db3.c
lib/backend/dbi.h

index 6cad9e8..120bc37 100644 (file)
@@ -381,6 +381,11 @@ int dbiFlags(dbiIndex dbi)
     return flags;
 }
 
+const char * dbiName(dbiIndex dbi)
+{
+    return dbi->dbi_file;
+}
+
 int dbiVerify(dbiIndex dbi, unsigned int flags)
 {
     int rc = 0;
index 407b0cd..946e636 100644 (file)
@@ -243,6 +243,15 @@ dbiIndexType dbiType(dbiIndex dbi);
  */
 RPM_GNUC_INTERNAL
 int dbiFlags(dbiIndex dbi);
+
+/** \ingroup dbi
+ * Retrieve index name (same as the backing file name)
+ * @param dbi          index database handle
+ * @return             dbi name
+ */
+RPM_GNUC_INTERNAL
+const char * dbiName(dbiIndex dbi);
+
 #ifdef __cplusplus
 }
 #endif