]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cacheset.h
add more dpointer placeholders
[apt.git] / apt-pkg / cacheset.h
index c8c3dd096dbe349c11c1c3517c15cd20c99b30ad..3f4f0066b42ddbf5a2cce352aa11331533e99794 100644 (file)
@@ -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