diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-07-30 09:51:42 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-07-30 09:51:42 +0200 |
commit | cd7bbc479f8e2f277092a9557bb486ab664deba6 (patch) | |
tree | 4c3a5ed40727d193920203d57f1b9fea09d0afd8 /apt-pkg/cacheset.h | |
parent | 4ed3806e625a4b5c148e27dba5384f133dd77c1a (diff) |
- [ABI BREAK] add an ErrorType option to CacheSetHelper
* cmdline/apt-cache.cc:
- use Notice instead of Error in the CacheSetHelper messages
for compat reasons. Otherwise tools like sbuild blow up
Diffstat (limited to 'apt-pkg/cacheset.h')
-rw-r--r-- | apt-pkg/cacheset.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h index c8c3dd096..3f4f0066b 100644 --- a/apt-pkg/cacheset.h +++ b/apt-pkg/cacheset.h @@ -32,7 +32,9 @@ class CacheSetHelper { /*{{{*/ printed out. */ public: /*{{{*/ - CacheSetHelper(bool const &ShowError = true) : ShowError(ShowError) {}; + CacheSetHelper(bool const &ShowError = true, + GlobalError::MsgType ErrorType = GlobalError::ERROR) : + ShowError(ShowError), ErrorType(ErrorType) {}; virtual ~CacheSetHelper() {}; virtual void showTaskSelection(PackageSet const &pkgset, string const &pattern) {}; @@ -58,9 +60,21 @@ public: /*{{{*/ bool showErrors() const { return ShowError; }; bool showErrors(bool const &newValue) { if (ShowError == newValue) return ShowError; else return ((ShowError = newValue) == false); }; + GlobalError::MsgType errorType() const { return ErrorType; }; + GlobalError::MsgType errorType(GlobalError::MsgType const &newValue) + { + if (ErrorType == newValue) return ErrorType; + else { + GlobalError::MsgType const &oldValue = ErrorType; + ErrorType = newValue; + return oldValue; + } + }; + /*}}}*/ protected: bool ShowError; + GlobalError::MsgType ErrorType; }; /*}}}*/ class PackageSet : public std::set<pkgCache::PkgIterator> { /*{{{*/ /** \class APT::PackageSet |