summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheset.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-07-30 12:53:49 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-07-30 12:53:49 +0200
commit7abfcfbe8518d1b5cc79e967c3ac16c2f783d6ea (patch)
treed6134e25dad5550e75768f8c9fbaabe75d81e541 /apt-pkg/cacheset.h
parentc39b587209f2c3993123e40d33c85de12180a70c (diff)
parente3326595301fc7bd1ee025a9dbb09ca51a08f5fa (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.h16
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