summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-06-28 06:04:00 +0200
committerAllan McRae <allan@archlinux.org>2011-06-28 06:04:00 +0200
commit64c1cf792184661a1d3dd73329f129172e688f17 (patch)
treee888776aa3cfadb6854fc1b4b3703f46a9ef27d8 /lib/libalpm
parent1c5c7c907c8cfb26c129d60d919c837ff42ca1c5 (diff)
downloadpacman-64c1cf792184661a1d3dd73329f129172e688f17.tar.gz
pacman-64c1cf792184661a1d3dd73329f129172e688f17.tar.xz
Rename pmhandle_t to alpm_handle_t
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/add.c10
-rw-r--r--lib/libalpm/add.h2
-rw-r--r--lib/libalpm/alpm.c6
-rw-r--r--lib/libalpm/alpm.h140
-rw-r--r--lib/libalpm/be_local.c2
-rw-r--r--lib/libalpm/be_package.c6
-rw-r--r--lib/libalpm/be_sync.c6
-rw-r--r--lib/libalpm/conflict.c12
-rw-r--r--lib/libalpm/conflict.h4
-rw-r--r--lib/libalpm/db.c6
-rw-r--r--lib/libalpm/db.h6
-rw-r--r--lib/libalpm/delta.c4
-rw-r--r--lib/libalpm/delta.h2
-rw-r--r--lib/libalpm/deps.c12
-rw-r--r--lib/libalpm/deps.h4
-rw-r--r--lib/libalpm/diskspace.c8
-rw-r--r--lib/libalpm/diskspace.h2
-rw-r--r--lib/libalpm/dload.c6
-rw-r--r--lib/libalpm/dload.h4
-rw-r--r--lib/libalpm/error.c2
-rw-r--r--lib/libalpm/handle.c106
-rw-r--r--lib/libalpm/handle.h10
-rw-r--r--lib/libalpm/log.c4
-rw-r--r--lib/libalpm/log.h2
-rw-r--r--lib/libalpm/package.c2
-rw-r--r--lib/libalpm/package.h6
-rw-r--r--lib/libalpm/remove.c16
-rw-r--r--lib/libalpm/remove.h6
-rw-r--r--lib/libalpm/signing.c6
-rw-r--r--lib/libalpm/signing.h2
-rw-r--r--lib/libalpm/sync.c14
-rw-r--r--lib/libalpm/sync.h4
-rw-r--r--lib/libalpm/trans.c20
-rw-r--r--lib/libalpm/trans.h2
-rw-r--r--lib/libalpm/util.c14
-rw-r--r--lib/libalpm/util.h16
36 files changed, 237 insertions, 237 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index fd8799b1..c8d21161 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -50,7 +50,7 @@
#include "handle.h"
/** Add a package to the transaction. */
-int SYMEXPORT alpm_add_pkg(pmhandle_t *handle, pmpkg_t *pkg)
+int SYMEXPORT alpm_add_pkg(alpm_handle_t *handle, pmpkg_t *pkg)
{
const char *pkgname, *pkgver;
pmtrans_t *trans;
@@ -106,7 +106,7 @@ int SYMEXPORT alpm_add_pkg(pmhandle_t *handle, pmpkg_t *pkg)
return 0;
}
-static int perform_extraction(pmhandle_t *handle, struct archive *archive,
+static int perform_extraction(alpm_handle_t *handle, struct archive *archive,
struct archive_entry *entry, const char *filename, const char *origname)
{
int ret;
@@ -131,7 +131,7 @@ static int perform_extraction(pmhandle_t *handle, struct archive *archive,
return 0;
}
-static int extract_single_file(pmhandle_t *handle, struct archive *archive,
+static int extract_single_file(alpm_handle_t *handle, struct archive *archive,
struct archive_entry *entry, pmpkg_t *newpkg, pmpkg_t *oldpkg)
{
const char *entryname;
@@ -450,7 +450,7 @@ static int extract_single_file(pmhandle_t *handle, struct archive *archive,
return errors;
}
-static int commit_single_pkg(pmhandle_t *handle, pmpkg_t *newpkg,
+static int commit_single_pkg(alpm_handle_t *handle, pmpkg_t *newpkg,
size_t pkg_current, size_t pkg_count)
{
int i, ret = 0, errors = 0;
@@ -684,7 +684,7 @@ cleanup:
return ret;
}
-int _alpm_upgrade_packages(pmhandle_t *handle)
+int _alpm_upgrade_packages(alpm_handle_t *handle)
{
size_t pkg_count, pkg_current;
int skip_ldconfig = 0, ret = 0;
diff --git a/lib/libalpm/add.h b/lib/libalpm/add.h
index 1baab8d4..77a3d22a 100644
--- a/lib/libalpm/add.h
+++ b/lib/libalpm/add.h
@@ -24,7 +24,7 @@
#include "alpm_list.h"
#include "trans.h"
-int _alpm_upgrade_packages(pmhandle_t *handle);
+int _alpm_upgrade_packages(alpm_handle_t *handle);
#endif /* _ALPM_ADD_H */
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index b0bbbe8c..93585298 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -46,13 +46,13 @@
* @param err an optional variable to hold any error return codes
* @return a context handle on success, NULL on error, err will be set if provided
*/
-pmhandle_t SYMEXPORT *alpm_initialize(const char *root, const char *dbpath,
+alpm_handle_t SYMEXPORT *alpm_initialize(const char *root, const char *dbpath,
enum _pmerrno_t *err)
{
enum _pmerrno_t myerr;
const char *lf = "db.lck";
size_t lockfilelen;
- pmhandle_t *myhandle = _alpm_handle_new();
+ alpm_handle_t *myhandle = _alpm_handle_new();
if(myhandle == NULL) {
myerr = PM_ERR_MEMORY;
@@ -99,7 +99,7 @@ cleanup:
* @param handle the context handle
* @return 0 on success, -1 on error
*/
-int SYMEXPORT alpm_release(pmhandle_t *myhandle)
+int SYMEXPORT alpm_release(alpm_handle_t *myhandle)
{
int ret = 0;
pmdb_t *db;
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 8a7979f2..d0d9e2f9 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -100,7 +100,7 @@ typedef enum _pgp_verify_t {
* Structures
*/
-typedef struct __pmhandle_t pmhandle_t;
+typedef struct __alpm_handle_t alpm_handle_t;
typedef struct __pmdb_t pmdb_t;
typedef struct __pmpkg_t pmpkg_t;
typedef struct __pmtrans_t pmtrans_t;
@@ -181,7 +181,7 @@ typedef enum _pmloglevel_t {
} pmloglevel_t;
typedef void (*alpm_cb_log)(pmloglevel_t, const char *, va_list);
-int alpm_logaction(pmhandle_t *handle, const char *fmt, ...);
+int alpm_logaction(alpm_handle_t *handle, const char *fmt, ...);
/*
* Downloading
@@ -212,7 +212,7 @@ typedef int (*alpm_cb_fetch)(const char *url, const char *localpath,
* @param url URL of the package to download
* @return the downloaded filepath on success, NULL on error
*/
-char *alpm_fetch_pkgurl(pmhandle_t *handle, const char *url);
+char *alpm_fetch_pkgurl(alpm_handle_t *handle, const char *url);
/** @addtogroup alpm_api_options Options
* Libalpm option getters and setters
@@ -220,67 +220,67 @@ char *alpm_fetch_pkgurl(pmhandle_t *handle, const char *url);
*/
/** Returns the callback used for logging. */
-alpm_cb_log alpm_option_get_logcb(pmhandle_t *handle);
+alpm_cb_log alpm_option_get_logcb(alpm_handle_t *handle);
/** Sets the callback used for logging. */
-int alpm_option_set_logcb(pmhandle_t *handle, alpm_cb_log cb);
+int alpm_option_set_logcb(alpm_handle_t *handle, alpm_cb_log cb);
/** Returns the callback used to report download progress. */
-alpm_cb_download alpm_option_get_dlcb(pmhandle_t *handle);
+alpm_cb_download alpm_option_get_dlcb(alpm_handle_t *handle);
/** Sets the callback used to report download progress. */
-int alpm_option_set_dlcb(pmhandle_t *handle, alpm_cb_download cb);
+int alpm_option_set_dlcb(alpm_handle_t *handle, alpm_cb_download cb);
/** Returns the downloading callback. */
-alpm_cb_fetch alpm_option_get_fetchcb(pmhandle_t *handle);
+alpm_cb_fetch alpm_option_get_fetchcb(alpm_handle_t *handle);
/** Sets the downloading callback. */
-int alpm_option_set_fetchcb(pmhandle_t *handle, alpm_cb_fetch cb);
+int alpm_option_set_fetchcb(alpm_handle_t *handle, alpm_cb_fetch cb);
/** Returns the callback used to report total download size. */
-alpm_cb_totaldl alpm_option_get_totaldlcb(pmhandle_t *handle);
+alpm_cb_totaldl alpm_option_get_totaldlcb(alpm_handle_t *handle);
/** Sets the callback used to report total download size. */
-int alpm_option_set_totaldlcb(pmhandle_t *handle, alpm_cb_totaldl cb);
+int alpm_option_set_totaldlcb(alpm_handle_t *handle, alpm_cb_totaldl cb);
/** Returns the root of the destination filesystem. Read-only. */
-const char *alpm_option_get_root(pmhandle_t *handle);
+const char *alpm_option_get_root(alpm_handle_t *handle);
/** Returns the path to the database directory. Read-only. */
-const char *alpm_option_get_dbpath(pmhandle_t *handle);
+const char *alpm_option_get_dbpath(alpm_handle_t *handle);
/** Get the name of the database lock file. Read-only. */
-const char *alpm_option_get_lockfile(pmhandle_t *handle);
+const char *alpm_option_get_lockfile(alpm_handle_t *handle);
/** @name Accessors to the list of package cache directories.
* @{
*/
-alpm_list_t *alpm_option_get_cachedirs(pmhandle_t *handle);
-int alpm_option_set_cachedirs(pmhandle_t *handle, alpm_list_t *cachedirs);
-int alpm_option_add_cachedir(pmhandle_t *handle, const char *cachedir);
-int alpm_option_remove_cachedir(pmhandle_t *handle, const char *cachedir);
+alpm_list_t *alpm_option_get_cachedirs(alpm_handle_t *handle);
+int alpm_option_set_cachedirs(alpm_handle_t *handle, alpm_list_t *cachedirs);
+int alpm_option_add_cachedir(alpm_handle_t *handle, const char *cachedir);
+int alpm_option_remove_cachedir(alpm_handle_t *handle, const char *cachedir);
/** @} */
/** Returns the logfile name. */
-const char *alpm_option_get_logfile(pmhandle_t *handle);
+const char *alpm_option_get_logfile(alpm_handle_t *handle);
/** Sets the logfile name. */
-int alpm_option_set_logfile(pmhandle_t *handle, const char *logfile);
+int alpm_option_set_logfile(alpm_handle_t *handle, const char *logfile);
/** Returns the path to libalpm's GnuPG home directory. */
-const char *alpm_option_get_gpgdir(pmhandle_t *handle);
+const char *alpm_option_get_gpgdir(alpm_handle_t *handle);
/** Sets the path to libalpm's GnuPG home directory. */
-int alpm_option_set_gpgdir(pmhandle_t *handle, const char *gpgdir);
+int alpm_option_set_gpgdir(alpm_handle_t *handle, const char *gpgdir);
/** Returns whether to use syslog (0 is FALSE, TRUE otherwise). */
-int alpm_option_get_usesyslog(pmhandle_t *handle);
+int alpm_option_get_usesyslog(alpm_handle_t *handle);
/** Sets whether to use syslog (0 is FALSE, TRUE otherwise). */
-int alpm_option_set_usesyslog(pmhandle_t *handle, int usesyslog);
+int alpm_option_set_usesyslog(alpm_handle_t *handle, int usesyslog);
/** @name Accessors to the list of no-upgrade files.
* These functions modify the list of files which should
* not be updated by package installation.
* @{
*/
-alpm_list_t *alpm_option_get_noupgrades(pmhandle_t *handle);
-int alpm_option_add_noupgrade(pmhandle_t *handle, const char *pkg);
-int alpm_option_set_noupgrades(pmhandle_t *handle, alpm_list_t *noupgrade);
-int alpm_option_remove_noupgrade(pmhandle_t *handle, const char *pkg);
+alpm_list_t *alpm_option_get_noupgrades(alpm_handle_t *handle);
+int alpm_option_add_noupgrade(alpm_handle_t *handle, const char *pkg);
+int alpm_option_set_noupgrades(alpm_handle_t *handle, alpm_list_t *noupgrade);
+int alpm_option_remove_noupgrade(alpm_handle_t *handle, const char *pkg);
/** @} */
/** @name Accessors to the list of no-extract files.
@@ -289,10 +289,10 @@ int alpm_option_remove_noupgrade(pmhandle_t *handle, const char *pkg);
* not be upgraded by a sysupgrade operation.
* @{
*/
-alpm_list_t *alpm_option_get_noextracts(pmhandle_t *handle);
-int alpm_option_add_noextract(pmhandle_t *handle, const char *pkg);
-int alpm_option_set_noextracts(pmhandle_t *handle, alpm_list_t *noextract);
-int alpm_option_remove_noextract(pmhandle_t *handle, const char *pkg);
+alpm_list_t *alpm_option_get_noextracts(alpm_handle_t *handle);
+int alpm_option_add_noextract(alpm_handle_t *handle, const char *pkg);
+int alpm_option_set_noextracts(alpm_handle_t *handle, alpm_list_t *noextract);
+int alpm_option_remove_noextract(alpm_handle_t *handle, const char *pkg);
/** @} */
/** @name Accessors to the list of ignored packages.
@@ -300,10 +300,10 @@ int alpm_option_remove_noextract(pmhandle_t *handle, const char *pkg);
* should be ignored by a sysupgrade.
* @{
*/
-alpm_list_t *alpm_option_get_ignorepkgs(pmhandle_t *handle);
-int alpm_option_add_ignorepkg(pmhandle_t *handle, const char *pkg);
-int alpm_option_set_ignorepkgs(pmhandle_t *handle, alpm_list_t *ignorepkgs);
-int alpm_option_remove_ignorepkg(pmhandle_t *handle, const char *pkg);
+alpm_list_t *alpm_option_get_ignorepkgs(alpm_handle_t *handle);
+int alpm_option_add_ignorepkg(alpm_handle_t *handle, const char *pkg);
+int alpm_option_set_ignorepkgs(alpm_handle_t *handle, alpm_list_t *ignorepkgs);
+int alpm_option_remove_ignorepkg(alpm_handle_t *handle, const char *pkg);
/** @} */
/** @name Accessors to the list of ignored groups.
@@ -311,25 +311,25 @@ int alpm_option_remove_ignorepkg(pmhandle_t *handle, const char *pkg);
* should be ignored by a sysupgrade.
* @{
*/
-alpm_list_t *alpm_option_get_ignoregrps(pmhandle_t *handle);
-int alpm_option_add_ignoregrp(pmhandle_t *handle, const char *grp);
-int alpm_option_set_ignoregrps(pmhandle_t *handle, alpm_list_t *ignoregrps);
-int alpm_option_remove_ignoregrp(pmhandle_t *handle, const char *grp);
+alpm_list_t *alpm_option_get_ignoregrps(alpm_handle_t *handle);
+int alpm_option_add_ignoregrp(alpm_handle_t *handle, const char *grp);
+int alpm_option_set_ignoregrps(alpm_handle_t *handle, alpm_list_t *ignoregrps);
+int alpm_option_remove_ignoregrp(alpm_handle_t *handle, const char *grp);
/** @} */
/** Returns the targeted architecture. */
-const char *alpm_option_get_arch(pmhandle_t *handle);
+const char *alpm_option_get_arch(alpm_handle_t *handle);
/** Sets the targeted architecture. */
-int alpm_option_set_arch(pmhandle_t *handle, const char *arch);
+int alpm_option_set_arch(alpm_handle_t *handle, const char *arch);
-int alpm_option_get_usedelta(pmhandle_t *handle);
-int alpm_option_set_usedelta(pmhandle_t *handle, int usedelta);
+int alpm_option_get_usedelta(alpm_handle_t *handle);
+int alpm_option_set_usedelta(alpm_handle_t *handle, int usedelta);
-int alpm_option_get_checkspace(pmhandle_t *handle);
-int alpm_option_set_checkspace(pmhandle_t *handle, int checkspace);
+int alpm_option_get_checkspace(alpm_handle_t *handle);
+int alpm_option_set_checkspace(alpm_handle_t *handle, int checkspace);
-pgp_verify_t alpm_option_get_default_sigverify(pmhandle_t *handle);
-int alpm_option_set_default_sigverify(pmhandle_t *handle, pgp_verify_t level);
+pgp_verify_t alpm_option_get_default_sigverify(alpm_handle_t *handle);
+int alpm_option_set_default_sigverify(alpm_handle_t *handle, pgp_verify_t level);
/** @} */
@@ -344,7 +344,7 @@ int alpm_option_set_default_sigverify(pmhandle_t *handle, pgp_verify_t level);
* libalpm functions.
* @return a reference to the local database
*/
-pmdb_t *alpm_option_get_localdb(pmhandle_t *handle);
+pmdb_t *alpm_option_get_localdb(alpm_handle_t *handle);
/** Get the list of sync databases.
* Returns a list of pmdb_t structures, one for each registered
@@ -352,7 +352,7 @@ pmdb_t *alpm_option_get_localdb(pmhandle_t *handle);
* @param handle the context handle
* @return a reference to an internal list of pmdb_t structures
*/
-alpm_list_t *alpm_option_get_syncdbs(pmhandle_t *handle);
+alpm_list_t *alpm_option_get_syncdbs(alpm_handle_t *handle);
/** Register a sync database of packages.
* @param handle the context handle
@@ -361,7 +361,7 @@ alpm_list_t *alpm_option_get_syncdbs(pmhandle_t *handle);
* database; note that this must be a '.sig' file type verification
* @return a pmdb_t* on success (the value), NULL on error
*/
-pmdb_t *alpm_db_register_sync(pmhandle_t *handle, const char *treename,
+pmdb_t *alpm_db_register_sync(alpm_handle_t *handle, const char *treename,
pgp_verify_t check_sig);
/** Unregister a package database.
@@ -374,7 +374,7 @@ int alpm_db_unregister(pmdb_t *db);
* @param handle the context handle
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_db_unregister_all(pmhandle_t *handle);
+int alpm_db_unregister_all(alpm_handle_t *handle);
/** Get the name of a package database.
* @param db pointer to the package database
@@ -455,7 +455,7 @@ int alpm_db_set_pkgreason(pmdb_t *db, const char *name, alpm_pkgreason_t reason)
* @param pkg address of the package pointer
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_pkg_load(pmhandle_t *handle, const char *filename, int full,
+int alpm_pkg_load(alpm_handle_t *handle, const char *filename, int full,
pgp_verify_t check_sig, pmpkg_t **pkg);
/** Free a package.
@@ -866,19 +866,19 @@ typedef void (*alpm_trans_cb_progress)(pmtransprog_t, const char *, int, size_t,
* @param handle the context handle
* @return the bitfield of transaction flags
*/
-pmtransflag_t alpm_trans_get_flags(pmhandle_t *handle);
+pmtransflag_t alpm_trans_get_flags(alpm_handle_t *handle);
/** Returns a list of packages added by the transaction.
* @param handle the context handle
* @return a list of pmpkg_t structures
*/
-alpm_list_t * alpm_trans_get_add(pmhandle_t *handle);
+alpm_list_t * alpm_trans_get_add(alpm_handle_t *handle);
/** Returns the list of packages removed by the transaction.
* @param handle the context handle
* @return a list of pmpkg_t structures
*/
-alpm_list_t * alpm_trans_get_remove(pmhandle_t *handle);
+alpm_list_t * alpm_trans_get_remove(alpm_handle_t *handle);
/** Initialize the transaction.
* @param handle the context handle
@@ -888,7 +888,7 @@ alpm_list_t * alpm_trans_get_remove(pmhandle_t *handle);
* @param progress progress callback function pointer
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_trans_init(pmhandle_t *handle, pmtransflag_t flags,
+int alpm_trans_init(alpm_handle_t *handle, pmtransflag_t flags,
alpm_trans_cb_event cb_event, alpm_trans_cb_conv conv,
alpm_trans_cb_progress cb_progress);
@@ -898,7 +898,7 @@ int alpm_trans_init(pmhandle_t *handle, pmtransflag_t flags,
* of pmdepmissing_t objects is dumped (conflicting packages)
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_trans_prepare(pmhandle_t *handle, alpm_list_t **data);
+int alpm_trans_prepare(alpm_handle_t *handle, alpm_list_t **data);
/** Commit a transaction.
* @param handle the context handle
@@ -906,19 +906,19 @@ int alpm_trans_prepare(pmhandle_t *handle, alpm_list_t **data);
* of an error can be dumped (ie. list of conflicting files)
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_trans_commit(pmhandle_t *handle, alpm_list_t **data);
+int alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data);
/** Interrupt a transaction.
* @param handle the context handle
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_trans_interrupt(pmhandle_t *handle);
+int alpm_trans_interrupt(alpm_handle_t *handle);
/** Release a transaction.
* @param handle the context handle
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_trans_release(pmhandle_t *handle);
+int alpm_trans_release(alpm_handle_t *handle);
/** @} */
/** @name Common Transactions */
@@ -929,7 +929,7 @@ int alpm_trans_release(pmhandle_t *handle);
* @param enable_downgrade allow downgrading of packages if the remote version is lower
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_sync_sysupgrade(pmhandle_t *handle, int enable_downgrade);
+int alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade);
/** Add a package to the transaction.
* If the package was loaded by alpm_pkg_load(), it will be freed upon
@@ -938,14 +938,14 @@ int alpm_sync_sysupgrade(pmhandle_t *handle, int enable_downgrade);
* @param pkg the package to add
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_add_pkg(pmhandle_t *handle, pmpkg_t *pkg);
+int alpm_add_pkg(alpm_handle_t *handle, pmpkg_t *pkg);
/** Add a package removal action to the transaction.
* @param handle the context handle
* @param pkg the package to uninstall
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_remove_pkg(pmhandle_t *handle, pmpkg_t *pkg);
+int alpm_remove_pkg(alpm_handle_t *handle, pmpkg_t *pkg);
/** @} */
@@ -955,13 +955,13 @@ int alpm_remove_pkg(pmhandle_t *handle, pmpkg_t *pkg);
* @{
*/
-alpm_list_t *alpm_checkdeps(pmhandle_t *handle, alpm_list_t *pkglist,
+alpm_list_t *alpm_checkdeps(alpm_handle_t *handle, alpm_list_t *pkglist,
alpm_list_t *remove, alpm_list_t *upgrade, int reversedeps);
pmpkg_t *alpm_find_satisfier(alpm_list_t *pkgs, const char *depstring);
-pmpkg_t *alpm_find_dbs_satisfier(pmhandle_t *handle,
+pmpkg_t *alpm_find_dbs_satisfier(alpm_handle_t *handle,
alpm_list_t *dbs, const char *depstring);
-alpm_list_t *alpm_checkconflicts(pmhandle_t *handle, alpm_list_t *pkglist);
+alpm_list_t *alpm_checkconflicts(alpm_handle_t *handle, alpm_list_t *pkglist);
/** Returns a newly allocated string representing the dependency information.
* @param dep a dependency info structure
@@ -1048,7 +1048,7 @@ enum _pmerrno_t {
};
/** Returns the current error code from the handle. */
-enum _pmerrno_t alpm_errno(pmhandle_t *handle);
+enum _pmerrno_t alpm_errno(alpm_handle_t *handle);
/** Returns the string corresponding to an error number. */
const char *alpm_strerror(enum _pmerrno_t err);
@@ -1056,9 +1056,9 @@ const char *alpm_strerror(enum _pmerrno_t err);
/* End of alpm_api_errors */
/** @} */
-pmhandle_t *alpm_initialize(const char *root, const char *dbpath,
+alpm_handle_t *alpm_initialize(const char *root, const char *dbpath,
enum _pmerrno_t *err);
-int alpm_release(pmhandle_t *handle);
+int alpm_release(alpm_handle_t *handle);
const char *alpm_version(void);
/* End of alpm_api */
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index a1e2a003..12b2d920 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -930,7 +930,7 @@ struct db_operations local_db_ops = {
.unregister = _alpm_db_unregister,
};
-pmdb_t *_alpm_db_register_local(pmhandle_t *handle)
+pmdb_t *_alpm_db_register_local(alpm_handle_t *handle)
{
pmdb_t *db;
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 748f27a0..b4f729b5 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -136,7 +136,7 @@ static struct pkg_operations *get_file_pkg_ops(void)
*
* @return 0 on success, -1 on error
*/
-static int parse_descfile(pmhandle_t *handle, struct archive *a, pmpkg_t *newpkg)
+static int parse_descfile(alpm_handle_t *handle, struct archive *a, pmpkg_t *newpkg)
{
char *ptr = NULL;
char *key = NULL;
@@ -231,7 +231,7 @@ static int parse_descfile(pmhandle_t *handle, struct archive *a, pmpkg_t *newpkg
* through the full archive
* @return An information filled pmpkg_t struct
*/
-pmpkg_t *_alpm_pkg_load_internal(pmhandle_t *handle, const char *pkgfile,
+pmpkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, const char *pkgfile,
int full, const char *md5sum, const char *base64_sig,
pgp_verify_t check_sig)
{
@@ -387,7 +387,7 @@ error:
return NULL;
}
-int SYMEXPORT alpm_pkg_load(pmhandle_t *handle, const char *filename, int full,
+int SYMEXPORT alpm_pkg_load(alpm_handle_t *handle, const char *filename, int full,
pgp_verify_t check_sig, pmpkg_t **pkg)
{
CHECK_HANDLE(handle, return -1);
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 2bf37dab..4f0cc2b6 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -39,7 +39,7 @@
#include "deps.h"
#include "dload.h"
-static char *get_sync_dir(pmhandle_t *handle)
+static char *get_sync_dir(alpm_handle_t *handle)
{
const char *dbpath = alpm_option_get_dbpath(handle);
size_t len = strlen(dbpath) + 6;
@@ -148,7 +148,7 @@ int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
alpm_list_t *i;
int ret = -1;
mode_t oldmask;
- pmhandle_t *handle;
+ alpm_handle_t *handle;
pgp_verify_t check_sig;
/* Sanity checks */
@@ -584,7 +584,7 @@ struct db_operations sync_db_ops = {
.unregister = _alpm_db_unregister,
};
-pmdb_t *_alpm_db_register_sync(pmhandle_t *handle, const char *treename,
+pmdb_t *_alpm_db_register_sync(alpm_handle_t *handle, const char *treename,
pgp_verify_t level)
{
pmdb_t *db;
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index dd3fdf76..7dd79fd7 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -100,7 +100,7 @@ static int conflict_isin(pmconflict_t *needle, alpm_list_t *haystack)
* @param pkg2 package causing conflict
* @param reason reason for this conflict
*/
-static int add_conflict(pmhandle_t *handle, alpm_list_t **baddeps,
+static int add_conflict(alpm_handle_t *handle, alpm_list_t **baddeps,
const char *pkg1, const char *pkg2, const char *reason)
{
pmconflict_t *conflict = conflict_new(pkg1, pkg2, reason);
@@ -129,7 +129,7 @@ static int add_conflict(pmhandle_t *handle, alpm_list_t **baddeps,
* @param baddeps list to store conflicts
* @param order if >= 0 the conflict order is preserved, if < 0 it's reversed
*/
-static void check_conflict(pmhandle_t *handle,
+static void check_conflict(alpm_handle_t *handle,
alpm_list_t *list1, alpm_list_t *list2,
alpm_list_t **baddeps, int order) {
alpm_list_t *i;
@@ -170,7 +170,7 @@ static void check_conflict(pmhandle_t *handle,
}
/* Check for inter-conflicts */
-alpm_list_t *_alpm_innerconflicts(pmhandle_t *handle, alpm_list_t *packages)
+alpm_list_t *_alpm_innerconflicts(alpm_handle_t *handle, alpm_list_t *packages)
{
alpm_list_t *baddeps = NULL;
@@ -211,7 +211,7 @@ alpm_list_t *_alpm_outerconflicts(pmdb_t *db, alpm_list_t *packages)
* @param pkglist the list of packages to check
* @return an alpm_list_t of pmconflict_t
*/
-alpm_list_t SYMEXPORT *alpm_checkconflicts(pmhandle_t *handle,
+alpm_list_t SYMEXPORT *alpm_checkconflicts(alpm_handle_t *handle,
alpm_list_t *pkglist)
{
CHECK_HANDLE(handle, return NULL);
@@ -280,7 +280,7 @@ static alpm_list_t *filelist_operation(alpm_list_t *filesA, alpm_list_t *filesB,
* string, and either two package names or one package name and NULL. This is
* a wrapper for former functionality that was done inline.
*/
-static alpm_list_t *add_fileconflict(pmhandle_t *handle,
+static alpm_list_t *add_fileconflict(alpm_handle_t *handle,
alpm_list_t *conflicts, alpm_fileconflicttype_t type, const char *filestr,
const char *name1, const char *name2)
{
@@ -362,7 +362,7 @@ static int dir_belongsto_pkg(const char *root, const char *dirpath,
/* Find file conflicts that may occur during the transaction with two checks:
* 1: check every target against every target
* 2: check every target against the filesystem */
-alpm_list_t *_alpm_db_find_fileconflicts(pmhandle_t *handle,
+alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
alpm_list_t *upgrade, alpm_list_t *remove)
{
alpm_list_t *i, *j, *conflicts = NULL;
diff --git a/lib/libalpm/conflict.h b/lib/libalpm/conflict.h
index 546a2820..d226ba23 100644
--- a/lib/libalpm/conflict.h
+++ b/lib/libalpm/conflict.h
@@ -26,9 +26,9 @@
pmconflict_t *_alpm_conflict_dup(const pmconflict_t *conflict);
void _alpm_conflict_free(pmconflict_t *conflict);
-alpm_list_t *_alpm_innerconflicts(pmhandle_t *handle, alpm_list_t *packages);
+alpm_list_t *_alpm_innerconflicts(alpm_handle_t *handle, alpm_list_t *packages);
alpm_list_t *_alpm_outerconflicts(pmdb_t *db, alpm_list_t *packages);
-alpm_list_t *_alpm_db_find_fileconflicts(pmhandle_t *handle,
+alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
alpm_list_t *upgrade, alpm_list_t *remove);
void _alpm_fileconflict_free(pmfileconflict_t *conflict);
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index c1518101..465bdd37 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -45,7 +45,7 @@
*/
/** Register a sync database of packages. */
-pmdb_t SYMEXPORT *alpm_db_register_sync(pmhandle_t *handle, const char *treename,
+pmdb_t SYMEXPORT *alpm_db_register_sync(alpm_handle_t *handle, const char *treename,
pgp_verify_t check_sig)
{
/* Sanity checks */
@@ -70,7 +70,7 @@ void _alpm_db_unregister(pmdb_t *db)
}
/** Unregister all package databases. */
-int SYMEXPORT alpm_db_unregister_all(pmhandle_t *handle)
+int SYMEXPORT alpm_db_unregister_all(alpm_handle_t *handle)
{
alpm_list_t *i;
pmdb_t *db;
@@ -94,7 +94,7 @@ int SYMEXPORT alpm_db_unregister_all(pmhandle_t *handle)
int SYMEXPORT alpm_db_unregister(pmdb_t *db)
{
int found = 0;
- pmhandle_t *handle;
+ alpm_handle_t *handle;
/* Sanity checks */
ASSERT(db != NULL, return -1);
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index 03187342..a0c4d6a1 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -57,7 +57,7 @@ struct db_operations {
/* Database */
struct __pmdb_t {
- pmhandle_t *handle;
+ alpm_handle_t *handle;
char *treename;
/* do not access directly, use _alpm_db_path(db) for lazy access */
char *_path;
@@ -81,8 +81,8 @@ const char *_alpm_db_path(pmdb_t *db);
char *_alpm_db_sig_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(pmhandle_t *handle);
-pmdb_t *_alpm_db_register_sync(pmhandle_t *handle, const char *treename,
+pmdb_t *_alpm_db_register_local(alpm_handle_t *handle);
+pmdb_t *_alpm_db_register_sync(alpm_handle_t *handle, const char *treename,
pgp_verify_t level);
void _alpm_db_unregister(pmdb_t *db);
diff --git a/lib/libalpm/delta.c b/lib/libalpm/delta.c
index fc7a0f75..26866aa7 100644
--- a/lib/libalpm/delta.c
+++ b/lib/libalpm/delta.c
@@ -78,7 +78,7 @@ static alpm_list_t *graph_init(alpm_list_t *deltas, int reverse)
return vertices;
}
-static void graph_init_size(pmhandle_t *handle, alpm_list_t *vertices)
+static void graph_init_size(alpm_handle_t *handle, alpm_list_t *vertices)
{
alpm_list_t *i;
@@ -186,7 +186,7 @@ static off_t shortest_path(alpm_list_t *vertices, const char *to, alpm_list_t **
* possible with the files available.
* @return the size of the path stored, or LONG_MAX if path is unfindable
*/
-off_t _alpm_shortest_delta_path(pmhandle_t *handle, alpm_list_t *deltas,
+off_t _alpm_shortest_delta_path(alpm_handle_t *handle, alpm_list_t *deltas,
const char *to, alpm_list_t **path)
{
alpm_list_t *bestpath = NULL;
diff --git a/lib/libalpm/delta.h b/lib/libalpm/delta.h
index 6ac54139..1f38a572 100644
--- a/lib/libalpm/delta.h
+++ b/lib/libalpm/delta.h
@@ -29,7 +29,7 @@
pmdelta_t *_alpm_delta_parse(char *line);
void _alpm_delta_free(pmdelta_t *delta);
pmdelta_t *_alpm_delta_dup(const pmdelta_t *delta);
-off_t _alpm_shortest_delta_path(pmhandle_t *handle, alpm_list_t *deltas,
+off_t _alpm_shortest_delta_path(alpm_handle_t *handle, alpm_list_t *deltas,
const char *to, alpm_list_t **path);
/* max percent of package size to download deltas */
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index fd118a0b..1fae6636 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -126,7 +126,7 @@ static alpm_list_t *dep_graph_init(alpm_list_t *targets)
* This function returns the new alpm_list_t* target list.
*
*/
-alpm_list_t *_alpm_sortbydeps(pmhandle_t *handle,
+alpm_list_t *_alpm_sortbydeps(alpm_handle_t *handle,
alpm_list_t *targets, int reverse)
{
alpm_list_t *newtargs = NULL;
@@ -202,7 +202,7 @@ alpm_list_t *_alpm_sortbydeps(pmhandle_t *handle,
return newtargs;
}
-static int no_dep_version(pmhandle_t *handle)
+static int no_dep_version(alpm_handle_t *handle)
{
int flags = alpm_trans_get_flags(handle);
return flags != -1 && (flags & PM_TRANS_FLAG_NODEPVERSION);
@@ -265,7 +265,7 @@ pmpkg_t SYMEXPORT *alpm_find_satisfier(alpm_list_t *pkgs, const char *depstring)
* @param reversedeps handles the backward dependencies
* @return an alpm_list_t* of pmdepmissing_t pointers.
*/
-alpm_list_t SYMEXPORT *alpm_checkdeps(pmhandle_t *handle, alpm_list_t *pkglist,
+alpm_list_t SYMEXPORT *alpm_checkdeps(alpm_handle_t *handle, alpm_list_t *pkglist,
alpm_list_t *remove, alpm_list_t *upgrade, int reversedeps)
{
alpm_list_t *i, *j;
@@ -554,7 +554,7 @@ void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit)
* an error code without prompting
* @return the resolved package
**/
-static pmpkg_t *resolvedep(pmhandle_t *handle, pmdepend_t *dep,
+static pmpkg_t *resolvedep(alpm_handle_t *handle, pmdepend_t *dep,
alpm_list_t *dbs, alpm_list_t *excluding, int prompt)
{
alpm_list_t *i, *j;
@@ -653,7 +653,7 @@ static pmpkg_t *resolvedep(pmhandle_t *handle, pmdepend_t *dep,
* @param depstring package or provision name, versioned or not
* @return a pmpkg_t* satisfying depstring
*/
-pmpkg_t SYMEXPORT *alpm_find_dbs_satisfier(pmhandle_t *handle,
+pmpkg_t SYMEXPORT *alpm_find_dbs_satisfier(alpm_handle_t *handle,
alpm_list_t *dbs, const char *depstring)
{
pmdepend_t *dep;
@@ -689,7 +689,7 @@ pmpkg_t SYMEXPORT *alpm_find_dbs_satisfier(pmhandle_t *handle,
* unresolvable dependency, in which case the [*packages] list will be
* unmodified by this function
*/
-int _alpm_resolvedeps(pmhandle_t *handle, alpm_list_t *localpkgs, pmpkg_t *pkg,
+int _alpm_resolvedeps(alpm_handle_t *handle, alpm_list_t *localpkgs, pmpkg_t *pkg,
alpm_list_t *preferred, alpm_list_t **packages,
alpm_list_t *remove, alpm_list_t **data)
{
diff --git a/lib/libalpm/deps.h b/lib/libalpm/deps.h
index ecc3b92c..01ea4cbd 100644
--- a/lib/libalpm/deps.h
+++ b/lib/libalpm/deps.h
@@ -30,9 +30,9 @@
void _alpm_dep_free(pmdepend_t *dep);
pmdepend_t *_alpm_dep_dup(const pmdepend_t *dep);
void _alpm_depmiss_free(pmdepmissing_t *miss);
-alpm_list_t *_alpm_sortbydeps(pmhandle_t *handle, alpm_list_t *targets, int reverse);
+alpm_list_t *_alpm_sortbydeps(alpm_handle_t *handle, alpm_list_t *targets, int reverse);
void _alpm_recursedeps(pmdb_t *db, alpm_list_t *targs, int include_explicit);
-int _alpm_resolvedeps(pmhandle_t *handle, alpm_list_t *localpkgs, pmpkg_t *pkg,
+int _alpm_resolvedeps(alpm_handle_t *handle, alpm_list_t *localpkgs, pmpkg_t *pkg,
alpm_list_t *preferred, alpm_list_t **packages, alpm_list_t *remove,
alpm_list_t **data);
pmdepend_t *_alpm_splitdep(const char *depstring);
diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c
index 51aa47f2..6fc2e38a 100644
--- a/lib/libalpm/diskspace.c
+++ b/lib/libalpm/diskspace.c
@@ -59,7 +59,7 @@ static int mount_point_cmp(const void *p1, const void *p2)
return -strcmp(mp1->mount_dir, mp2->mount_dir);
}
-static alpm_list_t *mount_point_list(pmhandle_t *handle)
+static alpm_list_t *mount_point_list(alpm_handle_t *handle)
{
alpm_list_t *mount_points = NULL, *ptr;
alpm_mountpoint_t *mp;
@@ -148,7 +148,7 @@ static alpm_mountpoint_t *match_mount_point(const alpm_list_t *mount_points,
return NULL;
}
-static int calculate_removed_size(pmhandle_t *handle,
+static int calculate_removed_size(alpm_handle_t *handle,
const alpm_list_t *mount_points, pmpkg_t *pkg)
{
alpm_list_t *file;
@@ -185,7 +185,7 @@ static int calculate_removed_size(pmhandle_t *handle,
return 0;
}
-static int calculate_installed_size(pmhandle_t *handle,
+static int calculate_installed_size(alpm_handle_t *handle,
const alpm_list_t *mount_points, pmpkg_t *pkg)
{
int ret=0;
@@ -257,7 +257,7 @@ cleanup:
return ret;
}
-int _alpm_check_diskspace(pmhandle_t *handle)
+int _alpm_check_diskspace(alpm_handle_t *handle)
{
alpm_list_t *mount_points, *i;
alpm_mountpoint_t *root_mp;
diff --git a/lib/libalpm/diskspace.h b/lib/libalpm/diskspace.h
index 28aca7e9..79e16772 100644
--- a/lib/libalpm/diskspace.h
+++ b/lib/libalpm/diskspace.h
@@ -46,7 +46,7 @@ typedef struct __alpm_mountpoint_t {
FSSTATSTYPE fsp;
} alpm_mountpoint_t;
-int _alpm_check_diskspace(pmhandle_t *handle);
+int _alpm_check_diskspace(alpm_handle_t *handle);
#endif /* _ALPM_DISKSPACE_H */
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index c7903ff0..73f75144 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -149,7 +149,7 @@ static int utimes_long(const char *path, long seconds)
}
-static int curl_download_internal(pmhandle_t *handle,
+static int curl_download_internal(alpm_handle_t *handle,
const char *url, const char *localpath,
int force, int allow_resume, int errors_ok)
{
@@ -321,7 +321,7 @@ cleanup:
* @param errors_ok do not log errors (but still return them)
* @return 0 on success, -1 on error (pm_errno is set accordingly if errors_ok == 0)
*/
-int _alpm_download(pmhandle_t *handle, const char *url, const char *localpath,
+int _alpm_download(alpm_handle_t *handle, const char *url, const char *localpath,
int force, int allow_resume, int errors_ok)
{
if(handle->fetchcb == NULL) {
@@ -341,7 +341,7 @@ int _alpm_download(pmhandle_t *handle, const char *url, const char *localpath,
}
/** Fetch a remote pkg. */
-char SYMEXPORT *alpm_fetch_pkgurl(pmhandle_t *handle, const char *url)
+char SYMEXPORT *alpm_fetch_pkgurl(alpm_handle_t *handle, const char *url)
{
char *filepath;
const char *filename, *cachedir;
diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h
index e409c32b..0cdd9001 100644
--- a/lib/libalpm/dload.h
+++ b/lib/libalpm/dload.h
@@ -27,12 +27,12 @@
/* internal structure for communicating with curl progress callback */
struct fileinfo {
- pmhandle_t *handle;
+ alpm_handle_t *handle;
const char *filename;
double initial_size;
};
-int _alpm_download(pmhandle_t *handle, const char *url, const char *localpath,
+int _alpm_download(alpm_handle_t *handle, const char *url, const char *localpath,
int force, int allow_resume, int errors_ok);
#endif /* _ALPM_DLOAD_H */
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index 1e4e705b..fb0493ff 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -29,7 +29,7 @@
#include "alpm.h"
#include "handle.h"
-enum _pmerrno_t SYMEXPORT alpm_errno(pmhandle_t *handle)
+enum _pmerrno_t SYMEXPORT alpm_errno(alpm_handle_t *handle)
{
return handle->pm_errno;
}
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index acd35409..842353d8 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -39,18 +39,18 @@
#include "trans.h"
#include "alpm.h"
-pmhandle_t *_alpm_handle_new()
+alpm_handle_t *_alpm_handle_new()
{
- pmhandle_t *handle;
+ alpm_handle_t *handle;
- CALLOC(handle, 1, sizeof(pmhandle_t), return NULL);
+ CALLOC(handle, 1, sizeof(alpm_handle_t), return NULL);
handle->sigverify = PM_PGP_VERIFY_OPTIONAL;
return handle;
}
-void _alpm_handle_free(pmhandle_t *handle)
+void _alpm_handle_free(alpm_handle_t *handle)
{
if(handle == NULL) {
return;
@@ -89,7 +89,7 @@ void _alpm_handle_free(pmhandle_t *handle)
}
/** Lock the database */
-int _alpm_handle_lock(pmhandle_t *handle)
+int _alpm_handle_lock(alpm_handle_t *handle)
{
int fd;
char *dir, *ptr;
@@ -124,7 +124,7 @@ int _alpm_handle_lock(pmhandle_t *handle)
}
/** Remove a lock file */
-int _alpm_handle_unlock(pmhandle_t *handle)
+int _alpm_handle_unlock(alpm_handle_t *handle)
{
ASSERT(handle->lockfile != NULL, return -1);
ASSERT(handle->lckstream != NULL, return 0);
@@ -140,148 +140,148 @@ int _alpm_handle_unlock(pmhandle_t *handle)
}
-alpm_cb_log SYMEXPORT alpm_option_get_logcb(pmhandle_t *handle)
+alpm_cb_log SYMEXPORT alpm_option_get_logcb(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->logcb;
}
-alpm_cb_download SYMEXPORT alpm_option_get_dlcb(pmhandle_t *handle)
+alpm_cb_download SYMEXPORT alpm_option_get_dlcb(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->dlcb;
}
-alpm_cb_fetch SYMEXPORT alpm_option_get_fetchcb(pmhandle_t *handle)
+alpm_cb_fetch SYMEXPORT alpm_option_get_fetchcb(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->fetchcb;
}
-alpm_cb_totaldl SYMEXPORT alpm_option_get_totaldlcb(pmhandle_t *handle)
+alpm_cb_totaldl SYMEXPORT alpm_option_get_totaldlcb(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->totaldlcb;
}
-const char SYMEXPORT *alpm_option_get_root(pmhandle_t *handle)
+const char SYMEXPORT *alpm_option_get_root(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->root;
}
-const char SYMEXPORT *alpm_option_get_dbpath(pmhandle_t *handle)
+const char SYMEXPORT *alpm_option_get_dbpath(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->dbpath;
}
-alpm_list_t SYMEXPORT *alpm_option_get_cachedirs(pmhandle_t *handle)
+alpm_list_t SYMEXPORT *alpm_option_get_cachedirs(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->cachedirs;
}
-const char SYMEXPORT *alpm_option_get_logfile(pmhandle_t *handle)
+const char SYMEXPORT *alpm_option_get_logfile(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->logfile;
}
-const char SYMEXPORT *alpm_option_get_lockfile(pmhandle_t *handle)
+const char SYMEXPORT *alpm_option_get_lockfile(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->lockfile;
}
-const char SYMEXPORT *alpm_option_get_gpgdir(pmhandle_t *handle)
+const char SYMEXPORT *alpm_option_get_gpgdir(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->gpgdir;
}
-int SYMEXPORT alpm_option_get_usesyslog(pmhandle_t *handle)
+int SYMEXPORT alpm_option_get_usesyslog(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return -1);
return handle->usesyslog;
}
-alpm_list_t SYMEXPORT *alpm_option_get_noupgrades(pmhandle_t *handle)
+alpm_list_t SYMEXPORT *alpm_option_get_noupgrades(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->noupgrade;
}
-alpm_list_t SYMEXPORT *alpm_option_get_noextracts(pmhandle_t *handle)
+alpm_list_t SYMEXPORT *alpm_option_get_noextracts(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->noextract;
}
-alpm_list_t SYMEXPORT *alpm_option_get_ignorepkgs(pmhandle_t *handle)
+alpm_list_t SYMEXPORT *alpm_option_get_ignorepkgs(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->ignorepkg;
}
-alpm_list_t SYMEXPORT *alpm_option_get_ignoregrps(pmhandle_t *handle)
+alpm_list_t SYMEXPORT *alpm_option_get_ignoregrps(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->ignoregrp;
}
-const char SYMEXPORT *alpm_option_get_arch(pmhandle_t *handle)
+const char SYMEXPORT *alpm_option_get_arch(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->arch;
}
-int SYMEXPORT alpm_option_get_usedelta(pmhandle_t *handle)
+int SYMEXPORT alpm_option_get_usedelta(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return -1);
return handle->usedelta;
}
-int SYMEXPORT alpm_option_get_checkspace(pmhandle_t *handle)
+int SYMEXPORT alpm_option_get_checkspace(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return -1);
return handle->checkspace;
}
-pmdb_t SYMEXPORT *alpm_option_get_localdb(pmhandle_t *handle)
+pmdb_t SYMEXPORT *alpm_option_get_localdb(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->db_local;
}
-alpm_list_t SYMEXPORT *alpm_option_get_syncdbs(pmhandle_t *handle)
+alpm_list_t SYMEXPORT *alpm_option_get_syncdbs(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->dbs_sync;
}
-int SYMEXPORT alpm_option_set_logcb(pmhandle_t *handle, alpm_cb_log cb)
+int SYMEXPORT alpm_option_set_logcb(alpm_handle_t *handle, alpm_cb_log cb)
{
CHECK_HANDLE(handle, return -1);
handle->logcb = cb;
return 0;
}
-int SYMEXPORT alpm_option_set_dlcb(pmhandle_t *handle, alpm_cb_download cb)
+int SYMEXPORT alpm_option_set_dlcb(alpm_handle_t *handle, alpm_cb_download cb)
{
CHECK_HANDLE(handle, return -1);
handle->dlcb = cb;
return 0;
}
-int SYMEXPORT alpm_option_set_fetchcb(pmhandle_t *handle, alpm_cb_fetch cb)
+int SYMEXPORT alpm_option_set_fetchcb(alpm_handle_t *handle, alpm_cb_fetch cb)
{
CHECK_HANDLE(handle, return -1);
handle->fetchcb = cb;
return 0;
}
-int SYMEXPORT alpm_option_set_totaldlcb(pmhandle_t *handle, alpm_cb_totaldl cb)
+int SYMEXPORT alpm_option_set_totaldlcb(alpm_handle_t *handle, alpm_cb_totaldl cb)
{
CHECK_HANDLE(handle, return -1);
handle->totaldlcb = cb;
@@ -337,7 +337,7 @@ enum _pmerrno_t _alpm_set_directory_option(const char *value,
return 0;
}
-int SYMEXPORT alpm_option_add_cachedir(pmhandle_t *handle, const char *cachedir)
+int SYMEXPORT alpm_option_add_cachedir(alpm_handle_t *handle, const char *cachedir)
{
char *newcachedir;
@@ -355,7 +355,7 @@ int SYMEXPORT alpm_option_add_cachedir(pmhandle_t *handle, const char *cachedir)
return 0;
}
-int SYMEXPORT alpm_option_set_cachedirs(pmhandle_t *handle, alpm_list_t *cachedirs)
+int SYMEXPORT alpm_option_set_cachedirs(alpm_handle_t *handle, alpm_list_t *cachedirs)
{
alpm_list_t *i;
CHECK_HANDLE(handle, return -1);
@@ -371,7 +371,7 @@ int SYMEXPORT alpm_option_set_cachedirs(pmhandle_t *handle, alpm_list_t *cachedi
return 0;
}
-int SYMEXPORT alpm_option_remove_cachedir(pmhandle_t *handle, const char *cachedir)
+int SYMEXPORT alpm_option_remove_cachedir(alpm_handle_t *handle, const char *cachedir)
{
char *vdata = NULL;
char *newcachedir;
@@ -391,7 +391,7 @@ int SYMEXPORT alpm_option_remove_cachedir(pmhandle_t *handle, const char *cached
return 0;
}
-int SYMEXPORT alpm_option_set_logfile(pmhandle_t *handle, const char *logfile)
+int SYMEXPORT alpm_option_set_logfile(alpm_handle_t *handle, const char *logfile)
{
char *oldlogfile = handle->logfile;
@@ -416,7 +416,7 @@ int SYMEXPORT alpm_option_set_logfile(pmhandle_t *handle, const char *logfile)
return 0;
}
-int SYMEXPORT alpm_option_set_gpgdir(pmhandle_t *handle, const char *gpgdir)
+int SYMEXPORT alpm_option_set_gpgdir(alpm_handle_t *handle, const char *gpgdir)
{
CHECK_HANDLE(handle, return -1);
if(!gpgdir) {
@@ -433,21 +433,21 @@ int SYMEXPORT alpm_option_set_gpgdir(pmhandle_t *handle, const char *gpgdir)
return 0;
}
-int SYMEXPORT alpm_option_set_usesyslog(pmhandle_t *handle, int usesyslog)
+int SYMEXPORT alpm_option_set_usesyslog(alpm_handle_t *handle, int usesyslog)
{
CHECK_HANDLE(handle, return -1);
handle->usesyslog = usesyslog;
return 0;
}
-int SYMEXPORT alpm_option_add_noupgrade(pmhandle_t *handle, const char *pkg)
+int SYMEXPORT alpm_option_add_noupgrade(alpm_handle_t *handle, const char *pkg)
{
CHECK_HANDLE(handle, return -1);
handle->noupgrade = alpm_list_add(handle->noupgrade, strdup(pkg));
return 0;
}
-int SYMEXPORT alpm_option_set_noupgrades(pmhandle_t *handle, alpm_list_t *noupgrade)
+int SYMEXPORT alpm_option_set_noupgrades(alpm_handle_t *handle, alpm_list_t *noupgrade)
{
CHECK_HANDLE(handle, return -1);
if(handle->noupgrade) FREELIST(handle->noupgrade);
@@ -455,7 +455,7 @@ int SYMEXPORT alpm_option_set_noupgrades(pmhandle_t *handle, alpm_list_t *noupgr
return 0;
}
-int SYMEXPORT alpm_option_remove_noupgrade(pmhandle_t *handle, const char *pkg)
+int SYMEXPORT alpm_option_remove_noupgrade(alpm_handle_t *handle, const char *pkg)
{
char *vdata = NULL;
CHECK_HANDLE(handle, return -1);
@@ -467,14 +467,14 @@ int SYMEXPORT alpm_option_remove_noupgrade(pmhandle_t *handle, const char *pkg)
return 0;
}
-int SYMEXPORT alpm_option_add_noextract(pmhandle_t *handle, const char *pkg)
+int SYMEXPORT alpm_option_add_noextract(alpm_handle_t *handle, const char *pkg)
{
CHECK_HANDLE(handle, return -1);
handle->noextract = alpm_list_add(handle->noextract, strdup(pkg));
return 0;
}
-int SYMEXPORT alpm_option_set_noextracts(pmhandle_t *handle, alpm_list_t *noextract)
+int SYMEXPORT alpm_option_set_noextracts(alpm_handle_t *handle, alpm_list_t *noextract)
{
CHECK_HANDLE(handle, return -1);
if(handle->noextract) FREELIST(handle->noextract);
@@ -482,7 +482,7 @@ int SYMEXPORT alpm_option_set_noextracts(pmhandle_t *handle, alpm_list_t *noextr
return 0;
}
-int SYMEXPORT alpm_option_remove_noextract(pmhandle_t *handle, const char *pkg)
+int SYMEXPORT alpm_option_remove_noextract(alpm_handle_t *handle, const char *pkg)
{
char *vdata = NULL;
CHECK_HANDLE(handle, return -1);
@@ -494,14 +494,14 @@ int SYMEXPORT alpm_option_remove_noextract(pmhandle_t *handle, const char *pkg)
return 0;
}
-int SYMEXPORT alpm_option_add_ignorepkg(pmhandle_t *handle, const char *pkg)
+int SYMEXPORT alpm_option_add_ignorepkg(alpm_handle_t *handle, const char *pkg)
{
CHECK_HANDLE(handle, return -1);
handle->ignorepkg = alpm_list_add(handle->ignorepkg, strdup(pkg));
return 0;
}
-int SYMEXPORT alpm_option_set_ignorepkgs(pmhandle_t *handle, alpm_list_t *ignorepkgs)
+int SYMEXPORT alpm_option_set_ignorepkgs(alpm_handle_t *handle, alpm_list_t *ignorepkgs)
{
CHECK_HANDLE(handle, return -1);
if(handle->ignorepkg) FREELIST(handle->ignorepkg);
@@ -509,7 +509,7 @@ int SYMEXPORT alpm_option_set_ignorepkgs(pmhandle_t *handle, alpm_list_t *ignore
return 0;
}
-int SYMEXPORT alpm_option_remove_ignorepkg(pmhandle_t *handle, const char *pkg)
+int SYMEXPORT alpm_option_remove_ignorepkg(alpm_handle_t *handle, const char *pkg)
{
char *vdata = NULL;
CHECK_HANDLE(handle, return -1);
@@ -521,14 +521,14 @@ int SYMEXPORT alpm_option_remove_ignorepkg(pmhandle_t *handle, const char *pkg)
return 0;
}
-int SYMEXPORT alpm_option_add_ignoregrp(pmhandle_t *handle, const char *grp)
+int SYMEXPORT alpm_option_add_ignoregrp(alpm_handle_t *handle, const char *grp)
{
CHECK_HANDLE(handle, return -1);
handle->ignoregrp = alpm_list_add(handle->ignoregrp, strdup(grp));
return 0;
}
-int SYMEXPORT alpm_option_set_ignoregrps(pmhandle_t *handle, alpm_list_t *ignoregrps)
+int SYMEXPORT alpm_option_set_ignoregrps(alpm_handle_t *handle, alpm_list_t *ignoregrps)
{
CHECK_HANDLE(handle, return -1);
if(handle->ignoregrp) FREELIST(handle->ignoregrp);
@@ -536,7 +536,7 @@ int SYMEXPORT alpm_option_set_ignoregrps(pmhandle_t *handle, alpm_list_t *ignore
return 0;
}
-int SYMEXPORT alpm_option_remove_ignoregrp(pmhandle_t *handle, const char *grp)
+int SYMEXPORT alpm_option_remove_ignoregrp(alpm_handle_t *handle, const char *grp)
{
char *vdata = NULL;
CHECK_HANDLE(handle, return -1);
@@ -548,7 +548,7 @@ int SYMEXPORT alpm_option_remove_ignoregrp(pmhandle_t *handle, const char *grp)
return 0;
}
-int SYMEXPORT alpm_option_set_arch(pmhandle_t *handle, const char *arch)
+int SYMEXPORT alpm_option_set_arch(alpm_handle_t *handle, const char *arch)
{
CHECK_HANDLE(handle, return -1);
if(handle->arch) FREE(handle->arch);
@@ -560,21 +560,21 @@ int SYMEXPORT alpm_option_set_arch(pmhandle_t *handle, const char *arch)
return 0;
}
-int SYMEXPORT alpm_option_set_usedelta(pmhandle_t *handle, int usedelta)
+int SYMEXPORT alpm_option_set_usedelta(alpm_handle_t *handle, int usedelta)
{
CHECK_HANDLE(handle, return -1);
handle->usedelta = usedelta;
return 0;
}
-int SYMEXPORT alpm_option_set_checkspace(pmhandle_t *handle, int checkspace)
+int SYMEXPORT alpm_option_set_checkspace(alpm_handle_t *handle, int checkspace)
{
CHECK_HANDLE(handle, return -1);
handle->checkspace = checkspace;
return 0;
}
-int SYMEXPORT alpm_option_set_default_sigverify(pmhandle_t *handle, pgp_verify_t level)
+int SYMEXPORT alpm_option_set_default_sigverify(alpm_handle_t *handle, pgp_verify_t level)
{
CHECK_HANDLE(handle, return -1);
ASSERT(level != PM_PGP_VERIFY_UNKNOWN, RET_ERR(handle, PM_ERR_WRONG_ARGS, -1));
@@ -582,7 +582,7 @@ int SYMEXPORT alpm_option_set_default_sigverify(pmhandle_t *handle, pgp_verify_t
return 0;
}
-pgp_verify_t SYMEXPORT alpm_option_get_default_sigverify(pmhandle_t *handle)
+pgp_verify_t SYMEXPORT alpm_option_get_default_sigverify(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return PM_PGP_VERIFY_UNKNOWN);
return handle->sigverify;
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index 4ffd00c4..6f5ee58a 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -30,7 +30,7 @@
#include <curl/curl.h>
#endif
-struct __pmhandle_t {
+struct __alpm_handle_t {
/* internal usage */
pmdb_t *db_local; /* local db pointer */
alpm_list_t *dbs_sync; /* List of (pmdb_t *) */
@@ -75,11 +75,11 @@ struct __pmhandle_t {
enum _pmerrno_t pm_errno;
};
-pmhandle_t *_alpm_handle_new(void);
-void _alpm_handle_free(pmhandle_t *handle);
+alpm_handle_t *_alpm_handle_new(void);
+void _alpm_handle_free(alpm_handle_t *handle);
-int _alpm_handle_lock(pmhandle_t *handle);
-int _alpm_handle_unlock(pmhandle_t *handle);
+int _alpm_handle_lock(alpm_handle_t *handle);
+int _alpm_handle_unlock(alpm_handle_t *handle);
enum _pmerrno_t _alpm_set_directory_option(const char *value,
char **storage, int must_exist);
diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c
index 8bb88117..e8a6e429 100644
--- a/lib/libalpm/log.c
+++ b/lib/libalpm/log.c
@@ -40,7 +40,7 @@
* @param fmt output format
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int SYMEXPORT alpm_logaction(pmhandle_t *handle, const char *fmt, ...)
+int SYMEXPORT alpm_logaction(alpm_handle_t *handle, const char *fmt, ...)
{
int ret;
va_list args;
@@ -83,7 +83,7 @@ int SYMEXPORT alpm_logaction(pmhandle_t *handle, const char *fmt, ...)
/** @} */
-void _alpm_log(pmhandle_t *handle, pmloglevel_t flag, const char *fmt, ...)
+void _alpm_log(alpm_handle_t *handle, pmloglevel_t flag, const char *fmt, ...)
{
va_list args;
diff --git a/lib/libalpm/log.h b/lib/libalpm/log.h
index 105430c4..c0813689 100644
--- a/lib/libalpm/log.h
+++ b/lib/libalpm/log.h
@@ -22,7 +22,7 @@
#include "alpm.h"
-void _alpm_log(pmhandle_t *handle, pmloglevel_t flag,
+void _alpm_log(alpm_handle_t *handle, pmloglevel_t flag,
const char *fmt, ...) __attribute__((format(printf,3,4)));
#endif /* _ALPM_LOG_H */
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index dc890581..9296825c 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -605,7 +605,7 @@ pmpkg_t *_alpm_pkg_find(alpm_list_t *haystack, const char *needle)
*
* @return 1 if the package should be ignored, 0 otherwise
*/
-int _alpm_pkg_should_ignore(pmhandle_t *handle, pmpkg_t *pkg)
+int _alpm_pkg_should_ignore(alpm_handle_t *handle, pmpkg_t *pkg)
{
alpm_list_t *groups = NULL;
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index fc1a7c3a..08a53b6b 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -119,7 +119,7 @@ struct __pmpkg_t {
pmdb_t *db;
char *file;
} origin_data;
- pmhandle_t *handle;
+ alpm_handle_t *handle;
alpm_list_t *licenses;
alpm_list_t *replaces;
@@ -143,14 +143,14 @@ void _alpm_pkg_free(pmpkg_t *pkg);
void _alpm_pkg_free_trans(pmpkg_t *pkg);
-pmpkg_t *_alpm_pkg_load_internal(pmhandle_t *handle, const char *pkgfile,
+pmpkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, const char *pkgfile,
int full, const char *md5sum, const char *base64_sig,
pgp_verify_t check_sig);
int _alpm_pkg_cmp(const void *p1, const void *p2);
int _alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg);
pmpkg_t *_alpm_pkg_find(alpm_list_t *haystack, const char *needle);
-int _alpm_pkg_should_ignore(pmhandle_t *handle, pmpkg_t *pkg);
+int _alpm_pkg_should_ignore(alpm_handle_t *handle, pmpkg_t *pkg);
#endif /* _ALPM_PACKAGE_H */
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 134c6662..078e3e25 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -44,7 +44,7 @@
#include "deps.h"
#include "handle.h"
-int SYMEXPORT alpm_remove_pkg(pmhandle_t *handle, pmpkg_t *pkg)
+int SYMEXPORT alpm_remove_pkg(alpm_handle_t *handle, pmpkg_t *pkg)
{
const char *pkgname;
pmtrans_t *trans;
@@ -70,7 +70,7 @@ int SYMEXPORT alpm_remove_pkg(pmhandle_t *handle, pmpkg_t *pkg)
return 0;
}
-static void remove_prepare_cascade(pmhandle_t *handle, alpm_list_t *lp)
+static void remove_prepare_cascade(alpm_handle_t *handle, alpm_list_t *lp)
{
pmtrans_t *trans = handle->trans;
@@ -97,7 +97,7 @@ static void remove_prepare_cascade(pmhandle_t *handle, alpm_list_t *lp)
}
}
-static void remove_prepare_keep_needed(pmhandle_t *handle, alpm_list_t *lp)
+static void remove_prepare_keep_needed(alpm_handle_t *handle, alpm_list_t *lp)
{
pmtrans_t *trans = handle->trans;
@@ -134,7 +134,7 @@ static void remove_prepare_keep_needed(pmhandle_t *handle, alpm_list_t *lp)
* @param handle the context handle
* @param data a pointer to an alpm_list_t* to fill
*/
-int _alpm_remove_prepare(pmhandle_t *handle, alpm_list_t **data)
+int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data)
{
alpm_list_t *lp;
pmtrans_t *trans = handle->trans;
@@ -191,7 +191,7 @@ int _alpm_remove_prepare(pmhandle_t *handle, alpm_list_t **data)
return 0;
}
-static int can_remove_file(pmhandle_t *handle, const char *path,
+static int can_remove_file(alpm_handle_t *handle, const char *path,
alpm_list_t *skip_remove)
{
char file[PATH_MAX];
@@ -219,7 +219,7 @@ static int can_remove_file(pmhandle_t *handle, const char *path,
/* Helper function for iterating through a package's file and deleting them
* Used by _alpm_remove_commit. */
-static void unlink_file(pmhandle_t *handle, pmpkg_t *info, const char *filename,
+static void unlink_file(alpm_handle_t *handle, pmpkg_t *info, const char *filename,
alpm_list_t *skip_remove, int nosave)
{
struct stat buf;
@@ -282,7 +282,7 @@ static void unlink_file(pmhandle_t *handle, pmpkg_t *info, const char *filename,
}
}
-int _alpm_upgraderemove_package(pmhandle_t *handle,
+int _alpm_upgraderemove_package(alpm_handle_t *handle,
pmpkg_t *oldpkg, pmpkg_t *newpkg)
{
alpm_list_t *skip_remove, *b;
@@ -353,7 +353,7 @@ db:
return 0;
}
-int _alpm_remove_packages(pmhandle_t *handle)
+int _alpm_remove_packages(alpm_handle_t *handle)
{
pmpkg_t *info;
alpm_list_t *targ, *lp;
diff --git a/lib/libalpm/remove.h b/lib/libalpm/remove.h
index 5cab526a..d4565580 100644
--- a/lib/libalpm/remove.h
+++ b/lib/libalpm/remove.h
@@ -24,10 +24,10 @@
#include "alpm_list.h"
#include "trans.h"
-int _alpm_remove_prepare(pmhandle_t *handle, alpm_list_t **data);
-int _alpm_remove_packages(pmhandle_t *handle);
+int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data);
+int _alpm_remove_packages(alpm_handle_t *handle);
-int _alpm_upgraderemove_package(pmhandle_t *handle,
+int _alpm_upgraderemove_package(alpm_handle_t *handle,
pmpkg_t *oldpkg, pmpkg_t *newpkg);
#endif /* _ALPM_REMOVE_H */
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index 9826e425..c26819e7 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -104,7 +104,7 @@ static alpm_list_t *list_sigsum(gpgme_sigsum_t sigsum)
return summary;
}
-static int init_gpgme(pmhandle_t *handle)
+static int init_gpgme(alpm_handle_t *handle)
{
static int init = 0;
const char *version, *sigdir;
@@ -205,7 +205,7 @@ error:
* @param base64_sig optional PGP signature data in base64 encoding
* @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)
*/
-int _alpm_gpgme_checksig(pmhandle_t *handle, const char *path,
+int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path,
const char *base64_sig)
{
int ret = 0;
@@ -354,7 +354,7 @@ error:
return ret;
}
#else
-int _alpm_gpgme_checksig(pmhandle_t *handle, const char *path,
+int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path,
const char *base64_sig)
{
return -1;
diff --git a/lib/libalpm/signing.h b/lib/libalpm/signing.h
index fdf81fcf..60e71afb 100644
--- a/lib/libalpm/signing.h
+++ b/lib/libalpm/signing.h
@@ -21,7 +21,7 @@
#include "alpm.h"
-int _alpm_gpgme_checksig(pmhandle_t *handle, const char *path,
+int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path,
const char *base64_sig);
pgp_verify_t _alpm_db_get_sigverify_level(pmdb_t *db);
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 15f135ba..0dc594f3 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -83,7 +83,7 @@ pmpkg_t SYMEXPORT *alpm_sync_newversion(pmpkg_t *pkg, alpm_list_t *dbs_sync)
}
/** Search for packages to upgrade and add them to the transaction. */
-int SYMEXPORT alpm_sync_sysupgrade(pmhandle_t *handle, int enable_downgrade)
+int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
{
alpm_list_t *i, *j, *k;
pmtrans_t *trans;
@@ -257,7 +257,7 @@ static int compute_download_size(pmpkg_t *newpkg)
const char *fname;
char *fpath;
off_t size = 0;
- pmhandle_t *handle = newpkg->handle;
+ alpm_handle_t *handle = newpkg->handle;
if(newpkg->origin != PKG_FROM_SYNCDB) {
newpkg->infolevel |= INFRQ_DSIZE;
@@ -302,7 +302,7 @@ static int compute_download_size(pmpkg_t *newpkg)
return 0;
}
-int _alpm_sync_prepare(pmhandle_t *handle, alpm_list_t **data)
+int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
{
alpm_list_t *i, *j;
alpm_list_t *deps = NULL;
@@ -583,7 +583,7 @@ static int endswith(const char *filename, const char *extension)
*
* @return 0 if all delta files were able to be applied, 1 otherwise.
*/
-static int apply_deltas(pmhandle_t *handle)
+static int apply_deltas(alpm_handle_t *handle)
{
alpm_list_t *i;
int ret = 0;
@@ -689,7 +689,7 @@ static int test_md5sum(pmtrans_t *trans, const char *filepath,
return ret;
}
-static int validate_deltas(pmhandle_t *handle, alpm_list_t *deltas,
+static int validate_deltas(alpm_handle_t *handle, alpm_list_t *deltas,
alpm_list_t **data)
{
int errors = 0, ret = 0;
@@ -726,7 +726,7 @@ static int validate_deltas(pmhandle_t *handle, alpm_list_t *deltas,
return ret;
}
-static int download_files(pmhandle_t *handle, alpm_list_t **deltas)
+static int download_files(alpm_handle_t *handle, alpm_list_t **deltas)
{
const char *cachedir;
alpm_list_t *i, *j;
@@ -833,7 +833,7 @@ static int download_files(pmhandle_t *handle, alpm_list_t **deltas)
return 0;
}
-int _alpm_sync_commit(pmhandle_t *handle, alpm_list_t **data)
+int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
{
alpm_list_t *i;
alpm_list_t *deltas = NULL;
diff --git a/lib/libalpm/sync.h b/lib/libalpm/sync.h
index 3049dd21..472d1dfc 100644
--- a/lib/libalpm/sync.h
+++ b/lib/libalpm/sync.h
@@ -24,8 +24,8 @@
#include "alpm.h"
-int _alpm_sync_prepare(pmhandle_t *handle, alpm_list_t **data);
-int _alpm_sync_commit(pmhandle_t *handle, alpm_list_t **data);
+int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data);
+int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data);
#endif /* _ALPM_SYNC_H */
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 507ea027..09afc255 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -48,7 +48,7 @@
*/
/** Initialize the transaction. */
-int SYMEXPORT alpm_trans_init(pmhandle_t *handle, pmtransflag_t flags,
+int SYMEXPORT alpm_trans_init(alpm_handle_t *handle, pmtransflag_t flags,
alpm_trans_cb_event event, alpm_trans_cb_conv conv,
alpm_trans_cb_progress progress)
{
@@ -85,7 +85,7 @@ int SYMEXPORT alpm_trans_init(pmhandle_t *handle, pmtransflag_t flags,
return 0;
}
-static alpm_list_t *check_arch(pmhandle_t *handle, alpm_list_t *pkgs)
+static alpm_list_t *check_arch(alpm_handle_t *handle, alpm_list_t *pkgs)
{
alpm_list_t *i;
alpm_list_t *invalid = NULL;
@@ -111,7 +111,7 @@ static alpm_list_t *check_arch(pmhandle_t *handle, alpm_list_t *pkgs)
}
/** Prepare a transaction. */
-int SYMEXPORT alpm_trans_prepare(pmhandle_t *handle, alpm_list_t **data)
+int SYMEXPORT alpm_trans_prepare(alpm_handle_t *handle, alpm_list_t **data)
{
pmtrans_t *trans;
@@ -155,7 +155,7 @@ int SYMEXPORT alpm_trans_prepare(pmhandle_t *handle, alpm_list_t **data)
}
/** Commit a transaction. */
-int SYMEXPORT alpm_trans_commit(pmhandle_t *handle, alpm_list_t **data)
+int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
{
pmtrans_t *trans;
@@ -194,7 +194,7 @@ int SYMEXPORT alpm_trans_commit(pmhandle_t *handle, alpm_list_t **data)
}
/** Interrupt a transaction. */
-int SYMEXPORT alpm_trans_interrupt(pmhandle_t *handle)
+int SYMEXPORT alpm_trans_interrupt(alpm_handle_t *handle)
{
pmtrans_t *trans;
@@ -212,7 +212,7 @@ int SYMEXPORT alpm_trans_interrupt(pmhandle_t *handle)
}
/** Release a transaction. */
-int SYMEXPORT alpm_trans_release(pmhandle_t *handle)
+int SYMEXPORT alpm_trans_release(alpm_handle_t *handle)
{
pmtrans_t *trans;
@@ -285,7 +285,7 @@ static int grep(const char *fn, const char *needle)
return 0;
}
-int _alpm_runscriptlet(pmhandle_t *handle, const char *installfn,
+int _alpm_runscriptlet(alpm_handle_t *handle, const char *installfn,
const char *script, const char *ver, const char *oldver)
{
char scriptfn[PATH_MAX];
@@ -359,7 +359,7 @@ cleanup:
return retval;
}
-pmtransflag_t SYMEXPORT alpm_trans_get_flags(pmhandle_t *handle)
+pmtransflag_t SYMEXPORT alpm_trans_get_flags(alpm_handle_t *handle)
{
/* Sanity checks */
CHECK_HANDLE(handle, return -1);
@@ -368,7 +368,7 @@ pmtransflag_t SYMEXPORT alpm_trans_get_flags(pmhandle_t *handle)
return handle->trans->flags;
}
-alpm_list_t SYMEXPORT *alpm_trans_get_add(pmhandle_t *handle)
+alpm_list_t SYMEXPORT *alpm_trans_get_add(alpm_handle_t *handle)
{
/* Sanity checks */
CHECK_HANDLE(handle, return NULL);
@@ -377,7 +377,7 @@ alpm_list_t SYMEXPORT *alpm_trans_get_add(pmhandle_t *handle)
return handle->trans->add;
}
-alpm_list_t SYMEXPORT *alpm_trans_get_remove(pmhandle_t *handle)
+alpm_list_t SYMEXPORT *alpm_trans_get_remove(alpm_handle_t *handle)
{
/* Sanity checks */
CHECK_HANDLE(handle, return NULL);
diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h
index e8587156..d9b8e90a 100644
--- a/lib/libalpm/trans.h
+++ b/lib/libalpm/trans.h
@@ -70,7 +70,7 @@ void _alpm_trans_free(pmtrans_t *trans);
int _alpm_trans_init(pmtrans_t *trans, pmtransflag_t flags,
alpm_trans_cb_event event, alpm_trans_cb_conv conv,
alpm_trans_cb_progress progress);
-int _alpm_runscriptlet(pmhandle_t *handle, const char *installfn,
+int _alpm_runscriptlet(alpm_handle_t *handle, const char *installfn,
const char *script, const char *ver, const char *oldver);
#endif /* _ALPM_TRANS_H */
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 6fbe08ae..991898e1 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -218,7 +218,7 @@ char *_alpm_strtrim(char *str)
* @param filename a file within the archive to unpack
* @return 0 on success, 1 on failure
*/
-int _alpm_unpack_single(pmhandle_t *handle, const char *archive,
+int _alpm_unpack_single(alpm_handle_t *handle, const char *archive,
const char *prefix, const char *filename)
{
alpm_list_t *list = NULL;
@@ -243,7 +243,7 @@ int _alpm_unpack_single(pmhandle_t *handle, const char *archive,
*
* @return 0 on success, 1 on failure
*/
-int _alpm_unpack(pmhandle_t *handle, const char *archive, const char *prefix,
+int _alpm_unpack(alpm_handle_t *handle, const char *archive, const char *prefix,
alpm_list_t *list, int breakfirst)
{
int ret = 0;
@@ -388,7 +388,7 @@ int _alpm_rmrf(const char *path)
return 0;
}
-int _alpm_logaction(pmhandle_t *handle, const char *fmt, va_list args)
+int _alpm_logaction(alpm_handle_t *handle, const char *fmt, va_list args)
{
int ret = 0;
@@ -419,7 +419,7 @@ int _alpm_logaction(pmhandle_t *handle, const char *fmt, va_list args)
return ret;
}
-int _alpm_run_chroot(pmhandle_t *handle, const char *path, char *const argv[])
+int _alpm_run_chroot(alpm_handle_t *handle, const char *path, char *const argv[])
{
char cwd[PATH_MAX];
pid_t pid;
@@ -536,7 +536,7 @@ cleanup:
return retval;
}
-int _alpm_ldconfig(pmhandle_t *handle)
+int _alpm_ldconfig(alpm_handle_t *handle)
{
char line[PATH_MAX];
@@ -566,7 +566,7 @@ int _alpm_str_cmp(const void *s1, const void *s2)
* @param filename name of file to find
* @return malloced path of file, NULL if not found
*/
-char *_alpm_filecache_find(pmhandle_t *handle, const char *filename)
+char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename)
{
char path[PATH_MAX];
char *retpath;
@@ -592,7 +592,7 @@ char *_alpm_filecache_find(pmhandle_t *handle, const char *filename)
* @param handle the context handle
* @return pointer to a writable cache directory.
*/
-const char *_alpm_filecache_setup(pmhandle_t *handle)
+const char *_alpm_filecache_setup(alpm_handle_t *handle)
{
struct stat buf;
alpm_list_t *i, *tmp;
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h
index c68b07ba..8006c74a 100644
--- a/lib/libalpm/util.h
+++ b/lib/libalpm/util.h
@@ -29,7 +29,7 @@
#include "alpm_list.h"
#include "alpm.h"
#include "package.h" /* pmpkg_t */
-#include "handle.h" /* pmhandle_t */
+#include "handle.h" /* alpm_handle_t */
#include <stdio.h>
#include <string.h>
@@ -95,17 +95,17 @@ int _alpm_makepath(const char *path);
int _alpm_makepath_mode(const char *path, mode_t mode);
int _alpm_copyfile(const char *src, const char *dest);
char *_alpm_strtrim(char *str);
-int _alpm_unpack_single(pmhandle_t *handle, const char *archive,
+int _alpm_unpack_single(alpm_handle_t *handle, const char *archive,
const char *prefix, const char *filename);
-int _alpm_unpack(pmhandle_t *handle, const char *archive, const char *prefix,
+int _alpm_unpack(alpm_handle_t *handle, const char *archive, const char *prefix,
alpm_list_t *list, int breakfirst);
int _alpm_rmrf(const char *path);
-int _alpm_logaction(pmhandle_t *handle, const char *fmt, va_list args);
-int _alpm_run_chroot(pmhandle_t *handle, const char *path, char *const argv[]);
-int _alpm_ldconfig(pmhandle_t *handle);
+int _alpm_logaction(alpm_handle_t *handle, const char *fmt, va_list args);
+int _alpm_run_chroot(alpm_handle_t *handle, const char *path, char *const argv[]);
+int _alpm_ldconfig(alpm_handle_t *handle);
int _alpm_str_cmp(const void *s1, const void *s2);
-char *_alpm_filecache_find(pmhandle_t *handle, const char *filename);
-const char *_alpm_filecache_setup(pmhandle_t *handle);
+char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename);
+const char *_alpm_filecache_setup(alpm_handle_t *handle);
int _alpm_lstat(const char *path, struct stat *buf);
int _alpm_test_md5sum(const char *filepath, const char *md5sum);
int _alpm_archive_fgets(struct archive *a, struct archive_read_buffer *b);