index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2010-07-10 21:06:21 -0500 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2010-10-13 23:53:18 +1000 |
commit | efbae3cfcbd8e401084cb26853bbe46120daea4d (patch) | |
tree | 9d7ff7e81cc425b0b8fcb9479042c860a559836f /lib/libalpm/db.h | |
parent | 522ef5e981580a52ee0ffa37178d7ddf116ebd51 (diff) |
-rw-r--r-- | lib/libalpm/db.h | 11 |
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h index 839ae258..b9f89ffd 100644 --- a/lib/libalpm/db.h +++ b/lib/libalpm/db.h @@ -39,6 +39,11 @@ typedef enum _pmdbinfrq_t { INFRQ_ALL = 0x3F } pmdbinfrq_t; +struct db_operations { + int (*populate) (pmdb_t *); + void (*unregister) (pmdb_t *); +}; + /* Database */ struct __pmdb_t { char *treename; @@ -46,12 +51,17 @@ struct __pmdb_t { char *_path; int pkgcache_loaded; int grpcache_loaded; + /* also indicates whether we are RO or RW */ int is_local; alpm_list_t *pkgcache; alpm_list_t *grpcache; alpm_list_t *servers; + + struct db_operations *ops; }; +extern struct db_operations default_db_ops; + /* db.c, database general calls */ void _alpm_db_free(pmdb_t *db); const char *_alpm_db_path(pmdb_t *db); @@ -59,6 +69,7 @@ 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); pmdb_t *_alpm_db_register_sync(const char *treename); +void _alpm_db_unregister(pmdb_t *db); /* be.c, backend specific calls */ int _alpm_db_populate(pmdb_t *db); |