summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheset.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-07-30 10:33:01 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-07-30 10:33:01 +0200
commita6afeca0f09252410b359e78ec305f4b4301ad5e (patch)
tree56be1a2c0cb734c36f046611bde152fa667d606b /apt-pkg/cacheset.h
parent4ed3806e625a4b5c148e27dba5384f133dd77c1a (diff)
parent5c6a9439ea115ab7b5adb934f4955be893961830 (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 * debian/control: - remove libcurl3-gnutls-dev alternative as the package is gone - increase needed version of libcurl4-gnutls-dev to >= 7.19.0 as we use CURLOPT_{ISSUERCERT,CRLFILE} (Closes: #589642)
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