diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-10-19 13:01:58 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-10-19 13:01:58 +0300 |
commit | 92919c2f73518a14e45c7586b5d2ef5f278255d4 (patch) | |
tree | 1b6a19902fd23b4f734fb5f38bd355af4f7d3252 /lib/rpmps.h | |
parent | 63f94fb4a8c3ac52941b60cdde1332fb3db67716 (diff) | |
download | rpm-92919c2f73518a14e45c7586b5d2ef5f278255d4.tar.gz rpm-92919c2f73518a14e45c7586b5d2ef5f278255d4.tar.bz2 rpm-92919c2f73518a14e45c7586b5d2ef5f278255d4.zip |
Make rpmProblem standalone "object"
- problem set contains array of pointers to problems, not problems themselves
- add functions for creating and destroying problems
- use iterators for freeing the problems in rpmpsFree()
- new rpmpsAppendProblem() API for appending existing problem item to
problem set
- implement rpmpsAppend using the new methods
Diffstat (limited to 'lib/rpmps.h')
-rw-r--r-- | lib/rpmps.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/rpmps.h b/lib/rpmps.h index 04464a861..bacb619a7 100644 --- a/lib/rpmps.h +++ b/lib/rpmps.h @@ -44,6 +44,31 @@ typedef enum rpmProblemType_e { } rpmProblemType; /** + * Create a problem item. + * @param type type of problem + * @param pkgNEVR package name + * @param key filename or python object address + * @param dn directory name + * @param bn file base name + * @param altNEVR related (e.g. through a dependency) package name + * @param ulong1 generic pointer/long attribute + * @return rpmProblem + */ +rpmProblem rpmProblemCreate(rpmProblemType type, + const char * pkgNEVR, + fnpyKey key, + const char * dn, const char * bn, + const char * altNEVR, + unsigned long ulong1); + +/** + * Destroy a problem item. + * @param prob rpm problem + * @return rpm problem (NULL) + */ +rpmProblem rpmProblemFree(rpmProblem prob); + +/** * Return package NEVR * @param prob rpm problem * @return package NEVR @@ -178,6 +203,13 @@ void rpmpsPrint(FILE *fp, rpmps ps); /** * Append a problem to current set of problems. * @param ps problem set + * @param prob rpmProblem + */ +void rpmpsAppendProblem(rpmps ps, rpmProblem prob); + +/** + * Append a problem to current set of problems. + * @param ps problem set * @param type type of problem * @param pkgNEVR package name * @param key filename or python object address |