Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-21 10:31:30 -0500
committerDan McGee <dan@archlinux.org>2011-09-22 10:32:35 -0500
commitd36d70d2947b1c6a161f6bf55ddd19445f2c81cb (patch)
tree1f441576947995ed213141f5e62f8eae57c28108 /lib/libalpm/alpm.h
parent33f251853155fd1e04d03fbaffb3849ab8e953dc (diff)
Add alpm_capabilities() method and enumeration
This allows a frontend program to query, at runtime, what the library supports. This can be useful for sanity checking during config- requiring a downloader or disallowing signature settings, for example. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r--lib/libalpm/alpm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 9fe80341..c864fb9f 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -1186,7 +1186,15 @@ const char *alpm_strerror(enum _alpm_errno_t err);
alpm_handle_t *alpm_initialize(const char *root, const char *dbpath,
enum _alpm_errno_t *err);
int alpm_release(alpm_handle_t *handle);
+
+enum alpm_caps {
+ ALPM_CAPABILITY_NLS = (1 << 0),
+ ALPM_CAPABILITY_DOWNLOADER = (1 << 1),
+ ALPM_CAPABILITY_SIGNATURES = (1 << 2)
+};
+
const char *alpm_version(void);
+enum alpm_caps alpm_capabilities(void);
/* End of alpm_api */
/** @} */