summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r--lib/libalpm/alpm.h42
1 files changed, 26 insertions, 16 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index a7fcb5c2..4a44cc76 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -31,6 +31,8 @@ extern "C" {
#include <time.h> /* for time_t */
#include <stdarg.h> /* for va_list */
+#define DEPRECATED __attribute__((deprecated))
+
/*
* Arch Linux Package Management library
*/
@@ -93,17 +95,17 @@ alpm_cb_download alpm_option_get_dlcb();
void alpm_option_set_dlcb(alpm_cb_download cb);
const char *alpm_option_get_root();
-void alpm_option_set_root(const char *root);
+int alpm_option_set_root(const char *root);
const char *alpm_option_get_dbpath();
-void alpm_option_set_dbpath(const char *dbpath);
+int alpm_option_set_dbpath(const char *dbpath);
alpm_list_t *alpm_option_get_cachedirs();
-void alpm_option_add_cachedir(const char *cachedir);
+int alpm_option_add_cachedir(const char *cachedir);
void alpm_option_set_cachedirs(alpm_list_t *cachedirs);
const char *alpm_option_get_logfile();
-void alpm_option_set_logfile(const char *logfile);
+int alpm_option_set_logfile(const char *logfile);
const char *alpm_option_get_lockfile();
/* no set_lockfile, path is determined from dbpath */
@@ -143,8 +145,11 @@ alpm_list_t *alpm_option_get_syncdbs();
* Databases
*/
-pmdb_t *alpm_db_register(const char *treename);
+/* Preferred interfaces db_register_local and db_register_sync */
+pmdb_t *alpm_db_register_local(void);
+pmdb_t *alpm_db_register_sync(const char *treename);
int alpm_db_unregister(pmdb_t *db);
+int alpm_db_unregister_all(void);
const char *alpm_db_get_name(const pmdb_t *db);
const char *alpm_db_get_url(const pmdb_t *db);
@@ -159,10 +164,9 @@ alpm_list_t *alpm_db_whatprovides(pmdb_t *db, const char *name);
pmgrp_t *alpm_db_readgrp(pmdb_t *db, const char *name);
alpm_list_t *alpm_db_getgrpcache(pmdb_t *db);
-alpm_list_t *alpm_db_test(pmdb_t *db);
alpm_list_t *alpm_db_search(pmdb_t *db, const alpm_list_t* needles);
-alpm_list_t *alpm_db_get_upgrades();
+alpm_list_t *alpm_db_get_upgrades(void);
/*
* Packages
@@ -187,10 +191,10 @@ typedef enum _pmpkghasarch_t {
int alpm_pkg_load(const char *filename, pmpkg_t **pkg);
int alpm_pkg_free(pmpkg_t *pkg);
int alpm_pkg_checkmd5sum(pmpkg_t *pkg);
-int alpm_pkg_checksha1sum(pmpkg_t *pkg);
char *alpm_fetch_pkgurl(const char *url);
int alpm_pkg_vercmp(const char *ver1, const char *ver2);
char *alpm_pkg_name_hasarch(const char *pkgname);
+alpm_list_t *alpm_pkg_compute_requiredby(pmpkg_t *pkg);
const char *alpm_pkg_get_filename(pmpkg_t *pkg);
const char *alpm_pkg_get_name(pmpkg_t *pkg);
@@ -202,7 +206,6 @@ const char *alpm_pkg_get_buildtype(pmpkg_t *pkg);
const char *alpm_pkg_get_installdate(pmpkg_t *pkg);
const char *alpm_pkg_get_packager(pmpkg_t *pkg);
const char *alpm_pkg_get_md5sum(pmpkg_t *pkg);
-const char *alpm_pkg_get_sha1sum(pmpkg_t *pkg);
const char *alpm_pkg_get_arch(pmpkg_t *pkg);
unsigned long alpm_pkg_get_size(pmpkg_t *pkg);
unsigned long alpm_pkg_get_isize(pmpkg_t *pkg);
@@ -247,6 +250,7 @@ void *alpm_sync_get_data(const pmsyncpkg_t *sync);
typedef enum _pmtranstype_t {
PM_TRANS_TYPE_ADD = 1,
PM_TRANS_TYPE_REMOVE,
+ PM_TRANS_TYPE_REMOVEUPGRADE,
PM_TRANS_TYPE_UPGRADE,
PM_TRANS_TYPE_SYNC
} pmtranstype_t;
@@ -331,6 +335,7 @@ int alpm_trans_sysupgrade(void);
int alpm_trans_addtarget(char *target);
int alpm_trans_prepare(alpm_list_t **data);
int alpm_trans_commit(alpm_list_t **data);
+int alpm_trans_interrupt(void);
int alpm_trans_release(void);
/*
@@ -351,12 +356,16 @@ typedef enum _pmdeptype_t {
pmdepend_t *alpm_splitdep(const char *depstring);
int alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep);
+alpm_list_t *alpm_checkdeps(pmdb_t *db, pmtranstype_t op,
+ alpm_list_t *packages);
+
+const char *alpm_miss_get_target(pmdepmissing_t *miss);
+pmdeptype_t alpm_miss_get_type(pmdepmissing_t *miss);
+pmdepend_t *alpm_miss_get_dep(pmdepmissing_t *miss);
-const char *alpm_dep_get_target(pmdepmissing_t *miss);
-pmdeptype_t alpm_dep_get_type(pmdepmissing_t *miss);
-pmdepmod_t alpm_dep_get_mod(pmdepmissing_t *miss);
-const char *alpm_dep_get_name(pmdepmissing_t *miss);
-const char *alpm_dep_get_version(pmdepmissing_t *miss);
+pmdepmod_t alpm_dep_get_mod(pmdepend_t *dep);
+const char *alpm_dep_get_name(pmdepend_t *dep);
+const char *alpm_dep_get_version(pmdepend_t *dep);
/*
* File conflicts
@@ -377,8 +386,7 @@ const char *alpm_conflict_get_ctarget(pmconflict_t *conflict);
*/
/* checksums */
-char *alpm_get_md5sum(char *name);
-char *alpm_get_sha1sum(char *name);
+char *alpm_get_md5sum(const char *name);
/*
* Errors
@@ -388,6 +396,7 @@ enum _pmerrno_t {
PM_ERR_SYSTEM,
PM_ERR_BADPERMS,
PM_ERR_NOT_A_FILE,
+ PM_ERR_NOT_A_DIR,
PM_ERR_WRONG_ARGS,
/* Interface */
PM_ERR_HANDLE_NULL,
@@ -452,6 +461,7 @@ enum _pmerrno_t {
extern enum _pmerrno_t pm_errno;
const char *alpm_strerror(int err);
+const char *alpm_strerrorlast(void);
#ifdef __cplusplus
}