summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-29 06:41:17 +0200
committerDan McGee <dan@archlinux.org>2011-08-29 06:41:17 +0200
commit040083b97fab61c8afc16a1c49a8384d097c272a (patch)
tree97fb452adccf6f9f9d09356fdaae6115c878310b /lib/libalpm/alpm.h
parent3a458783a2617b7b22a756f95b5f66f3da79146f (diff)
downloadpacman-040083b97fab61c8afc16a1c49a8384d097c272a.tar.gz
pacman-040083b97fab61c8afc16a1c49a8384d097c272a.tar.xz
Allow access to package origin data
Add new alpm_pkg_get_origin() method, use it in the front end now that the enum constants are publicly available. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r--lib/libalpm/alpm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 2f625658..42e60385 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -598,6 +598,11 @@ const char *alpm_pkg_get_name(alpm_pkg_t *pkg);
*/
const char *alpm_pkg_get_version(alpm_pkg_t *pkg);
+/** Returns the origin of the package.
+ * @return a #alpm_pkgfrom_t constant, -1 on error
+ */
+alpm_pkgfrom_t alpm_pkg_get_origin(alpm_pkg_t *pkg);
+
/** Returns the package description.
* @param pkg a pointer to package
* @return a reference to an internal string