diff options
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/alpm.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index da3eaae0..33faab82 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -272,7 +272,7 @@ int alpm_db_unregister(pmdb_t *db) /** Get informations about a database. * @param db database pointer * @param parm name of the info to get - * @return a char* on success (the value), NULL on error + * @return a void* on success (the value), NULL on error */ void *alpm_db_getinfo(PM_DB *db, unsigned char parm) { @@ -773,6 +773,11 @@ int alpm_trans_release() * @{ */ +/** Get informations about a dependency. + * @param db dependency pointer + * @param parm name of the info to get + * @return a void* on success (the value), NULL on error + */ void *alpm_dep_getinfo(pmdepmissing_t *miss, unsigned char parm) { void *data; @@ -799,6 +804,10 @@ void *alpm_dep_getinfo(pmdepmissing_t *miss, unsigned char parm) * @{ */ +/** A printf-like function for logging. + * @param fmt output format + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ int alpm_logaction(char *fmt, ...) { char str[LOG_STR_LEN]; @@ -832,11 +841,19 @@ int alpm_logaction(char *fmt, ...) * @{ */ +/** Get the first element of a list. + * @param list the list + * @return the first element + */ PMList *alpm_list_first(PMList *list) { return(list); } +/** Get the next element of a list. + * @param entry the list entry + * @return the next element on success, NULL on error + */ PMList *alpm_list_next(PMList *entry) { ASSERT(entry != NULL, return(NULL)); @@ -844,6 +861,10 @@ PMList *alpm_list_next(PMList *entry) return(entry->next); } +/** Get the data of a list entry. + * @param entry the list entry + * @return the data on success, NULL on error + */ void *alpm_list_getdata(PMList *entry) { ASSERT(entry != NULL, return(NULL)); @@ -851,6 +872,10 @@ void *alpm_list_getdata(PMList *entry) return(entry->data); } +/** Free a list. + * @param entry list to free + * @return 0 on success, -1 on error + */ int alpm_list_free(PMList *entry) { ASSERT(entry != NULL, return(-1)); @@ -860,6 +885,10 @@ int alpm_list_free(PMList *entry) return(0); } +/** Count the entries in a list. + * @param list the list to count + * @return number of entries on success, NULL on error + */ int alpm_list_count(PMList *list) { return(_alpm_list_count(list)); @@ -870,6 +899,10 @@ int alpm_list_count(PMList *list) * @{ */ +/** Get the md5 sum of file. + * @param name name of the file + * @return the checksum on success, NULL on error + */ char *alpm_get_md5sum(char *name) { ASSERT(name != NULL, return(NULL)); |