summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-16 18:42:10 +0200
committerDan McGee <dan@archlinux.org>2011-06-16 18:57:33 +0200
commit7f6c1a76c66fb718fad2ecce68f99ee13d18ff15 (patch)
tree4f4bac122e324a1b5cea081c2e1a492453373c46 /lib/libalpm/alpm.h
parent19fcc7401666cd892f7b8a5a49854a1b2eb9988b (diff)
downloadpacman-7f6c1a76c66fb718fad2ecce68f99ee13d18ff15.tar.gz
pacman-7f6c1a76c66fb718fad2ecce68f99ee13d18ff15.tar.xz
Make pmdepend_t and pmdepmissing_t public
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r--lib/libalpm/alpm.h75
1 files changed, 32 insertions, 43 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 0fd6f37e..08a7a1f3 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -60,6 +60,22 @@ typedef enum _pmpkgreason_t {
PM_PKG_REASON_DEPEND = 1
} pmpkgreason_t;
+/** Types of version constraints in dependency specs. */
+typedef enum _pmdepmod_t {
+ /** No version constraint */
+ PM_DEP_MOD_ANY = 1,
+ /** Test version equality (package=x.y.z) */
+ PM_DEP_MOD_EQ,
+ /** Test for at least a version (package>=x.y.z) */
+ PM_DEP_MOD_GE,
+ /** Test for at most a version (package<=x.y.z) */
+ PM_DEP_MOD_LE,
+ /** Test for greater than some version (package>x.y.z) */
+ PM_DEP_MOD_GT,
+ /** Test for less than some version (package<x.y.z) */
+ PM_DEP_MOD_LT
+} pmdepmod_t;
+
/**
* File conflict type.
* Whether the conflict results from a file existing on the filesystem, or with
@@ -90,8 +106,22 @@ typedef struct __pmpkg_t pmpkg_t;
typedef struct __pmdelta_t pmdelta_t;
typedef struct __pmgrp_t pmgrp_t;
typedef struct __pmtrans_t pmtrans_t;
-typedef struct __pmdepend_t pmdepend_t;
-typedef struct __pmdepmissing_t pmdepmissing_t;
+
+/** Dependency */
+typedef struct _pmdepend_t {
+ char *name;
+ char *version;
+ unsigned long name_hash;
+ pmdepmod_t mod;
+} pmdepend_t;
+
+/** Missing dependency */
+typedef struct _pmdepmissing_t {
+ char *target;
+ pmdepend_t *depend;
+ /* this is used in case of remove dependency error only */
+ char *causingpkg;
+} pmdepmissing_t;
/** Conflict */
typedef struct _pmconflict_t {
@@ -906,55 +936,14 @@ int alpm_remove_pkg(pmhandle_t *handle, pmpkg_t *pkg);
* @{
*/
-/** Types of version constraints in dependency specs. */
-typedef enum _pmdepmod_t {
- /** No version constraint */
- PM_DEP_MOD_ANY = 1,
- /** Test version equality (package=x.y.z) */
- PM_DEP_MOD_EQ,
- /** Test for at least a version (package>=x.y.z) */
- PM_DEP_MOD_GE,
- /** Test for at most a version (package<=x.y.z) */
- PM_DEP_MOD_LE,
- /** Test for greater than some version (package>x.y.z) */
- PM_DEP_MOD_GT,
- /** Test for less than some version (package<x.y.z) */
- PM_DEP_MOD_LT
-} pmdepmod_t;
-
alpm_list_t *alpm_checkdeps(pmhandle_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,
alpm_list_t *dbs, const char *depstring);
-const char *alpm_miss_get_target(const pmdepmissing_t *miss);
-pmdepend_t *alpm_miss_get_dep(pmdepmissing_t *miss);
-const char *alpm_miss_get_causingpkg(const pmdepmissing_t *miss);
-
alpm_list_t *alpm_checkconflicts(pmhandle_t *handle, alpm_list_t *pkglist);
-/** Returns the type of version constraint.
- * @param dep a dependency info structure
- * @return the type of version constraint (PM_DEP_MOD_ANY if no version
- * is specified).
- */
-pmdepmod_t alpm_dep_get_mod(const pmdepend_t *dep);
-
-/** Returns the package name of a dependency constraint.
- * @param dep a dependency info structure
- * @return a pointer to an internal string.
- */
-const char *alpm_dep_get_name(const pmdepend_t *dep);
-
-/** Returns the version specified by a dependency constraint.
- * The version information is returned as a string in the same format
- * as given by alpm_pkg_get_version().
- * @param dep a dependency info structure
- * @return a pointer to an internal string.
- */
-const char *alpm_dep_get_version(const pmdepend_t *dep);
-
/** Returns a newly allocated string representing the dependency information.
* @param dep a dependency info structure
* @return a formatted string, e.g. "glibc>=2.12"