FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 03-01-2011, 07:17 PM
Rémy Oudompheng
 
Default alpm.h: add Doxygen-style doc for pmdepend_t, pmdepmod_t.

---
lib/libalpm/alpm.h | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 7fa27d8..14a2782 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -593,12 +593,19 @@ int alpm_remove_pkg(pmpkg_t *pkg);
* Dependencies and conflicts
*/

+/** @brief 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;

@@ -617,9 +624,36 @@ const char *alpm_conflict_get_package1(pmconflict_t *conflict);
const char *alpm_conflict_get_package2(pmconflict_t *conflict);
const char *alpm_conflict_get_reason(pmconflict_t *conflict);

+/**
+ * @brief Returns the type of version constraint.
+ * @param dep a dependency info structure
+ * @return the type of version constraint.
+ */
pmdepmod_t alpm_dep_get_mod(const pmdepend_t *dep);
+
+/**
+ * @brief 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);
+
+/**
+ * @brief Returns the version specified by a dependency constraint.
+ *
+ * The version information is stored as a string of the form
+ * "1.2.3-4".
+ * @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"
+ */
char *alpm_dep_compute_string(const pmdepend_t *dep);

/*
--
1.7.4.1
 

Thread Tools




All times are GMT. The time now is 07:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org