summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-02-18 07:31:37 +0100
committerDan McGee <dan@archlinux.org>2012-03-09 00:58:04 +0100
commit5c404268d965d9ca012e4819ac0c2f289a4c768c (patch)
treeec83d7e1d7c88886fc4cf8438ba42ccb9627c8e2 /lib/libalpm/alpm.h
parentbc311a24ce536fbf30cc2356a62b08a6c0938ea9 (diff)
downloadpacman-5c404268d965d9ca012e4819ac0c2f289a4c768c.tar.gz
pacman-5c404268d965d9ca012e4819ac0c2f289a4c768c.tar.xz
Add information on how an installed package was validated
When installing a package, store information on which validation method was used and output this on "pacman -Qi" operations. e.g. Validated By : SHA256 Sum Possible values are Unknown, None, MD5 Sum, SHA256 Sum, Signature. Dan: just a few very minor tweaks. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r--lib/libalpm/alpm.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index a6b7c789..2e666294 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -64,6 +64,15 @@ typedef enum _alpm_pkgfrom_t {
PKG_FROM_SYNCDB
} alpm_pkgfrom_t;
+/** Location a package object was loaded from. */
+typedef enum _alpm_pkgvalidation_t {
+ ALPM_PKG_VALIDATION_UNKNOWN = 0,
+ ALPM_PKG_VALIDATION_NONE = (1 << 0),
+ ALPM_PKG_VALIDATION_MD5SUM = (1 << 1),
+ ALPM_PKG_VALIDATION_SHA256SUM = (1 << 2),
+ ALPM_PKG_VALIDATION_SIGNATURE = (1 << 3)
+} alpm_pkgvalidation_t;
+
/** Types of version constraints in dependency specs. */
typedef enum _alpm_depmod_t {
/** No version constraint */
@@ -880,6 +889,12 @@ alpm_db_t *alpm_pkg_get_db(alpm_pkg_t *pkg);
*/
const char *alpm_pkg_get_base64_sig(alpm_pkg_t *pkg);
+/** Returns the method used to validate a package during install.
+ * @param pkg a pointer to package
+ * @return an enum member giving the validation method
+ */
+alpm_pkgvalidation_t alpm_pkg_get_validation(alpm_pkg_t *pkg);
+
/* End of alpm_pkg_t accessors */
/* @} */