diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-06-29 11:22:55 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-06-29 11:22:55 +0300 |
commit | 9858ffff69ce2e3df353b2c1e65a987c58f32fac (patch) | |
tree | b9ecaccfb8f9e3f67a4ccb2ce7cb3f699f7e7f5c /src/apk_database.h | |
parent | 233918e518f72e469ba39206abf70250bd6fc54a (diff) | |
download | apk-tools-9858ffff69ce2e3df353b2c1e65a987c58f32fac.tar.gz apk-tools-9858ffff69ce2e3df353b2c1e65a987c58f32fac.tar.bz2 apk-tools-9858ffff69ce2e3df353b2c1e65a987c58f32fac.tar.xz apk-tools-9858ffff69ce2e3df353b2c1e65a987c58f32fac.zip |
cache: new applet (ref #49)
Administrative tool to download or delete files to/from the cache.
Diffstat (limited to 'src/apk_database.h')
-rw-r--r-- | src/apk_database.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/apk_database.h b/src/apk_database.h index de7ce4b..4fb6ac8 100644 --- a/src/apk_database.h +++ b/src/apk_database.h @@ -19,6 +19,8 @@ #define APK_MAX_REPOS 32 +extern const char * const apk_index_gz; + struct apk_name; APK_ARRAY(apk_name_array, struct apk_name *); @@ -120,6 +122,7 @@ struct apk_db_file *apk_db_file_query(struct apk_database *db, int apk_db_open(struct apk_database *db, const char *root, unsigned int flags); int apk_db_write_config(struct apk_database *db); void apk_db_close(struct apk_database *db); +int apk_db_cache_active(struct apk_database *db); struct apk_package *apk_db_pkg_add_file(struct apk_database *db, const char *file); struct apk_package *apk_db_pkg_add(struct apk_database *db, struct apk_package *pkg); @@ -133,6 +136,10 @@ int apk_db_add_repository(apk_database_t db, apk_blob_t repository); int apk_repository_update(struct apk_database *db, struct apk_repository *repo); int apk_repository_update_all(struct apk_database *db); +int apk_cache_download(struct apk_database *db, csum_t csum, + const char *url, const char *item); +int apk_cache_exists(struct apk_database *db, csum_t csum, const char *item); + int apk_db_install_pkg(struct apk_database *db, struct apk_package *oldpkg, struct apk_package *newpkg, |