Document alternatives in the API.
This commit is contained in:
parent
3ae197f94a
commit
35718e676c
@ -639,10 +639,6 @@ void xbps_dbg_printf_append(struct xbps_handle *, const char *, ...);
|
||||
void xbps_error_printf(const char *, ...);
|
||||
void xbps_warn_printf(const char *, ...);
|
||||
|
||||
int xbps_alternatives_set(struct xbps_handle *, const char *, const char *);
|
||||
int xbps_alternatives_register(struct xbps_handle *, xbps_dictionary_t);
|
||||
int xbps_alternatives_unregister(struct xbps_handle *, xbps_dictionary_t);
|
||||
|
||||
/**
|
||||
* Initialize the XBPS library with the following steps:
|
||||
*
|
||||
@ -933,6 +929,43 @@ int xbps_pkg_exec_script(struct xbps_handle *xhp,
|
||||
|
||||
/*@}*/
|
||||
|
||||
/** @addtogroup alternatives */
|
||||
/*@{*/
|
||||
|
||||
/**
|
||||
* Sets all alternatives provided by this \a pkg, or only those
|
||||
* set by a \a group.
|
||||
*
|
||||
* @param[in] xhp The pointer to the xbps_handle struct.
|
||||
* @param[in] pkg Package name to match.
|
||||
* @param[in] group Alternatives group to match.
|
||||
*
|
||||
* @return 0 on success, or an errno value otherwise.
|
||||
*/
|
||||
int xbps_alternatives_set(struct xbps_handle *xhp, const char *pkg, const char *group);
|
||||
|
||||
/**
|
||||
* Registers all alternative groups provided by a package.
|
||||
*
|
||||
* @param[in] xhp The pointer to the xbps_handle struct.
|
||||
* @param[in] pkgd Package dictionary as stored in the transaction dictionary.
|
||||
*
|
||||
* @return 0 on success, or an errno value otherwise.
|
||||
*/
|
||||
int xbps_alternatives_register(struct xbps_handle *xhp, xbps_dictionary_t pkgd);
|
||||
|
||||
/**
|
||||
* Unregisters all alternative groups provided by a package.
|
||||
*
|
||||
* @param[in] xhp The pointer to the xbps_handle struct.
|
||||
* @param[in] pkgd Package dictionary as stored in the transaction dictionary.
|
||||
*
|
||||
* @return 0 on success, or an errno value otherwise.
|
||||
*/
|
||||
int xbps_alternatives_unregister(struct xbps_handle *xhp, xbps_dictionary_t pkgd);
|
||||
|
||||
/*@}*/
|
||||
|
||||
/** @addtogroup plist */
|
||||
/*@{*/
|
||||
|
||||
|
@ -31,6 +31,14 @@
|
||||
|
||||
#include "xbps_api_impl.h"
|
||||
|
||||
/**
|
||||
* @file lib/package_alternatives.c
|
||||
* @brief Alternatives generic routines
|
||||
* @defgroup alternatives Alternatives generic functions
|
||||
*
|
||||
* These functions implement the alternatives framework.
|
||||
*/
|
||||
|
||||
/*
|
||||
* XXX TODO: relative symlinks.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user