rpm/lib/rpmps.h

111 lines
2.3 KiB
C
Raw Normal View History

#ifndef H_RPMPS
#define H_RPMPS
/** \ingroup rpmps
* \file lib/rpmps.h
* Structures and prototypes used for an "rpmps" problem set.
*/
#include <stdio.h>
#include <rpm/rpmtypes.h>
#include <rpm/rpmprob.h>
2007-10-08 17:03:57 +08:00
2007-10-08 16:05:06 +08:00
#ifdef __cplusplus
extern "C" {
#endif
2007-11-23 20:32:45 +08:00
/** \ingroup rpmps
* Problem set iterator
*/
typedef struct rpmpsi_s * rpmpsi;
2007-11-23 20:32:45 +08:00
/** \ingroup rpmps
* Reference a problem set instance.
* @param ps transaction set
* @return new transaction set reference
*/
rpmps rpmpsLink (rpmps ps);
2007-11-23 20:32:45 +08:00
/** \ingroup rpmps
* Return number of problems in set.
* @param ps problem set
* @return number of problems
*/
2007-09-12 01:07:39 +08:00
int rpmpsNumProblems(rpmps ps);
2007-11-23 20:32:45 +08:00
/** \ingroup rpmps
* Initialize problem set iterator.
* @param ps problem set
* @return problem set iterator
*/
rpmpsi rpmpsInitIterator(rpmps ps);
2007-11-23 20:32:45 +08:00
/** \ingroup rpmps
* Destroy problem set iterator.
* @param psi problem set iterator
* @return problem set iterator (NULL)
*/
rpmpsi rpmpsFreeIterator(rpmpsi psi);
/** \ingroup rpmps
* Return next problem from iterator
* @param psi problem set iterator
* @return next problem (weak ref), NULL on termination
*/
rpmProblem rpmpsiNext(rpmpsi psi);
2007-11-23 20:32:45 +08:00
/** \ingroup rpmps
* Return next problem set iterator index
* @param psi problem set iterator
* @return iterator index, -1 on termination
*/
int rpmpsNextIterator(rpmpsi psi);
2007-11-23 20:32:45 +08:00
/** \ingroup rpmps
* Return current problem from problem set
* @param psi problem set iterator
* @return current rpmProblem
*/
rpmProblem rpmpsGetProblem(rpmpsi psi);
2007-11-23 20:32:45 +08:00
/** \ingroup rpmps
* Create a problem set.
* @return new problem set
*/
2007-09-12 01:07:39 +08:00
rpmps rpmpsCreate(void);
2007-11-23 20:32:45 +08:00
/** \ingroup rpmps
* Destroy a problem set.
* @param ps problem set
* @return NULL always
*/
2007-09-12 01:07:39 +08:00
rpmps rpmpsFree(rpmps ps);
2007-11-23 20:32:45 +08:00
/** \ingroup rpmps
* Print problems to file handle.
* @param fp file handle (NULL uses stderr)
* @param ps problem set
*/
2007-09-12 01:07:39 +08:00
void rpmpsPrint(FILE *fp, rpmps ps);
2007-11-23 20:32:45 +08:00
/** \ingroup rpmps
* Append a problem to current set of problems.
* @param ps problem set
* @param prob rpmProblem
*/
void rpmpsAppendProblem(rpmps ps, rpmProblem prob);
/** \ingroup rpmps
* Merge problem set into another.
* @param dest destination problem set
* @param src source problem set
* @return number of problems merged
*/
int rpmpsMerge(rpmps dest, rpmps src);
#ifdef __cplusplus
}
#endif
#endif /* H_RPMPS */