diff options
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r-- | lib/libalpm/alpm.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index da879569..e4000911 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -565,6 +565,31 @@ int alpm_trans_release() } /* + * Dependencies + */ + +void *alpm_dep_getinfo(pmdepmissing_t *miss, unsigned char parm) +{ + void *data; + + /* Sanity checks */ + ASSERT(miss != NULL, return(NULL)); + + switch(parm) { + case PM_DEP_TARGET: data = (void *)(int)miss->target; break; + case PM_DEP_TYPE: data = (void *)(int)miss->type; break; + case PM_DEP_MOD: data = (void *)(int)miss->depend.mod; break; + case PM_DEP_NAME: data = miss->depend.name; break; + case PM_DEP_VERSION: data = miss->depend.version; break; + default: + data = NULL; + break; + } + + return(data); +} + +/* * Log facilities */ |