From aa1c0ba9f8787fc3b1a1190103e394b0c1c95922 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 20 Nov 2006 09:10:23 +0000 Subject: * 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 --- lib/libalpm/db.h | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'lib/libalpm/db.h') 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 -#include "package.h" #include "alpm.h" +#include /* 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); -- cgit v1.2.3-70-g09d2