summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/db.h')
-rw-r--r--lib/libalpm/db.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index 950ace22..a540d02d 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -28,30 +28,32 @@
/* Database entries */
typedef enum _pmdbinfrq_t {
- INFRQ_BASE = 0x01,
- INFRQ_DESC = 0x02,
- INFRQ_DEPENDS = 0x04,
- INFRQ_FILES = 0x08,
- INFRQ_SCRIPTLET = 0x10,
- INFRQ_DELTAS = 0x20,
+ INFRQ_BASE = 1,
+ INFRQ_DESC = (1 << 1),
+ INFRQ_DEPENDS = (1 << 2),
+ INFRQ_FILES = (1 << 3),
+ INFRQ_SCRIPTLET = (1 << 4),
+ INFRQ_DELTAS = (1 << 5),
/* ALL should be sum of all above */
INFRQ_ALL = 0x3F
} pmdbinfrq_t;
/* Database */
struct __pmdb_t {
- char *path;
char *treename;
- unsigned short pkgcache_loaded;
+ /* do not access directly, use _alpm_db_path(db) for lazy access */
+ char *_path;
+ int pkgcache_loaded;
+ int grpcache_loaded;
+ int is_local;
alpm_list_t *pkgcache;
- unsigned short grpcache_loaded;
alpm_list_t *grpcache;
alpm_list_t *servers;
};
/* db.c, database general calls */
-pmdb_t *_alpm_db_new(const char *dbpath, const char *treename);
void _alpm_db_free(pmdb_t *db);
+const char *_alpm_db_path(pmdb_t *db);
int _alpm_db_cmp(const void *d1, const void *d2);
alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles);
pmdb_t *_alpm_db_register_local(void);