X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/8ce4327bc0d3f2695b936391c856cc80de6c0d83..1979e742ad5e2a0b6e547fbe3f4c4066b5a9bd2e:/apt-pkg/contrib/progress.h diff --git a/apt-pkg/contrib/progress.h b/apt-pkg/contrib/progress.h index 554cb16ea..20caf4cdf 100644 --- a/apt-pkg/contrib/progress.h +++ b/apt-pkg/contrib/progress.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: progress.h,v 1.3 1998/08/26 04:52:29 jgg Exp $ +// $Id: progress.h,v 1.6 2001/05/07 05:06:52 jgg Exp $ /* ###################################################################### OpProgress - Operation Progress @@ -18,7 +18,6 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_PROGRESS_H #define PKGLIB_PROGRESS_H @@ -29,6 +28,9 @@ #include #include +using std::string; + +class Configuration; class OpProgress { unsigned long Current; @@ -57,9 +59,9 @@ class OpProgress void Progress(unsigned long Current); void SubProgress(unsigned long SubTotal); - void SubProgress(unsigned long SubTotal,string Op); + void SubProgress(unsigned long SubTotal,const string &Op); void OverallProgress(unsigned long Current,unsigned long Total, - unsigned long Size,string Op); + unsigned long Size,const string &Op); virtual void Done() {}; OpProgress(); @@ -72,6 +74,7 @@ class OpTextProgress : public OpProgress string OldOp; bool NoUpdate; + bool NoDisplay; unsigned long LastLen; virtual void Update(); void Write(const char *S); @@ -80,7 +83,9 @@ class OpTextProgress : public OpProgress virtual void Done(); - OpTextProgress(bool NoUpdate = false) : NoUpdate(NoUpdate), LastLen(0) {}; + OpTextProgress(bool NoUpdate = false) : NoUpdate(NoUpdate), + NoDisplay(false), LastLen(0) {}; + OpTextProgress(Configuration &Config); virtual ~OpTextProgress() {Done();}; };