diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-10-01 11:37:45 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-10-01 14:16:30 +0300 |
commit | 66c469759c497b72f24ebb6a69ca9a6333d1d600 (patch) | |
tree | de96bebce4642d0f6afcc6a76529949aed16a653 /lib | |
parent | 16e35ece9c28cfd0257102b1e1ca69746e2b4b6e (diff) | |
download | librpm-tizen-66c469759c497b72f24ebb6a69ca9a6333d1d600.tar.gz librpm-tizen-66c469759c497b72f24ebb6a69ca9a6333d1d600.tar.bz2 librpm-tizen-66c469759c497b72f24ebb6a69ca9a6333d1d600.zip |
Add API for setting preferred transaction file color
- not strictly needed as it gets its default from a macro but .. shrug
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rpmts.c | 10 | ||||
-rw-r--r-- | lib/rpmts.h | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/rpmts.c b/lib/rpmts.c index e4004df27..312553539 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -1017,6 +1017,16 @@ rpm_color_t rpmtsPrefColor(rpmts ts) return (ts != NULL ? ts->prefcolor : 0); } +rpm_color_t rpmtsSetPrefColor(rpmts ts, rpm_color_t color) +{ + rpm_color_t ocolor = 0; + if (ts != NULL) { + ocolor = ts->prefcolor; + ts->prefcolor = color; + } + return ocolor; +} + rpmop rpmtsOp(rpmts ts, rpmtsOpX opx) { rpmop op = NULL; diff --git a/lib/rpmts.h b/lib/rpmts.h index 0b7c259e1..1bf9e62d0 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -571,6 +571,14 @@ rpm_color_t rpmtsPrefColor(rpmts ts); rpm_color_t rpmtsSetColor(rpmts ts, rpm_color_t color); /** \ingroup rpmts + * Set prefered file color + * @param ts transaction set + * @param color new color bits + * @return previous color bits + */ +rpm_color_t rpmtsSetPrefColor(rpmts ts, rpm_color_t color); + +/** \ingroup rpmts * Retrieve operation timestamp from a transaction set. * @param ts transaction set * @param opx operation timestamp index |