summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/db.h
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-11-20 10:10:23 +0100
committerAaron Griffin <aaron@archlinux.org>2006-11-20 10:10:23 +0100
commitaa1c0ba9f8787fc3b1a1190103e394b0c1c95922 (patch)
treeed0c9675f7fc5da043a69b36e0b8c6c8e05cb583 /lib/libalpm/db.h
parentb8b9596b13de957566211b0e1db3e473ed66e147 (diff)
downloadpacman-aa1c0ba9f8787fc3b1a1190103e394b0c1c95922.tar.gz
pacman-aa1c0ba9f8787fc3b1a1190103e394b0c1c95922.tar.xz
* repo-add script - to add entries to a db file directly from package data (no PKGBUILD)
* libalpm api changes - move from a _getinfo(p, WHAT_WE_WANT) scheme to a typesafe _get_what_we_want(p) scheme [not 100% complete yet] * some const correctness changes * removal of PM_* types in alpm.h in favor of the pm*_t types used throughout libalpm
Diffstat (limited to 'lib/libalpm/db.h')
-rw-r--r--lib/libalpm/db.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index bffae081..d894c213 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -23,36 +23,31 @@
#ifndef _ALPM_DB_H
#define _ALPM_DB_H
-#include <limits.h>
-#include "package.h"
#include "alpm.h"
+#include <limits.h>
/* Database entries */
-#define INFRQ_NONE 0x00
-#define INFRQ_DESC 0x01
-#define INFRQ_DEPENDS 0x02
-#define INFRQ_FILES 0x04
-#define INFRQ_SCRIPLET 0x08
-#define INFRQ_ALL 0xFF
-
-#define DB_O_CREATE 0x01
+#define INFRQ_NONE 0x00
+#define INFRQ_DESC 0x01
+#define INFRQ_DEPENDS 0x02
+#define INFRQ_FILES 0x04
+#define INFRQ_SCRIPTLET 0x08
+#define INFRQ_ALL 0xFF
/* Database */
-typedef struct __pmdb_t {
+struct __pmdb_t {
char *path;
char treename[PATH_MAX];
void *handle;
pmlist_t *pkgcache;
pmlist_t *grpcache;
pmlist_t *servers;
-} pmdb_t;
+};
pmdb_t *_alpm_db_new(char *root, char *dbpath, char *treename);
void _alpm_db_free(void *data);
int _alpm_db_cmp(const void *db1, const void *db2);
pmlist_t *_alpm_db_search(pmdb_t *db, pmlist_t *needles);
-
-/* Prototypes for backends functions */
int _alpm_db_install(pmdb_t *db, const char *dbfile);
int _alpm_db_open(pmdb_t *db);
void _alpm_db_close(pmdb_t *db);