diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-07-30 12:53:49 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-07-30 12:53:49 +0200 |
commit | 7abfcfbe8518d1b5cc79e967c3ac16c2f783d6ea (patch) | |
tree | d6134e25dad5550e75768f8c9fbaabe75d81e541 /apt-pkg/cacheset.h | |
parent | c39b587209f2c3993123e40d33c85de12180a70c (diff) | |
parent | e3326595301fc7bd1ee025a9dbb09ca51a08f5fa (diff) |
merged from http://bzr.debian.org/apt/apt/debian-experimental-ma
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 |