X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/404ec98e5186c844003dee15e15bc96460cc27a5..f46e768107c0250eb0609a89a74b66ab3c9d8cec:/apt-pkg/contrib/progress.h diff --git a/apt-pkg/contrib/progress.h b/apt-pkg/contrib/progress.h index 39e770fa3..094c4b016 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.1 1998/07/21 05:33:21 jgg Exp $ +// $Id: progress.h,v 1.4 1998/10/02 04:39:54 jgg Exp $ /* ###################################################################### OpProgress - Operation Progress @@ -29,6 +29,7 @@ #include #include +class Configuration; class OpProgress { unsigned long Current; @@ -40,6 +41,7 @@ class OpProgress // Change reduction code struct timeval LastTime; string LastOp; + string LastSubOp; protected: @@ -55,10 +57,12 @@ class OpProgress public: void Progress(unsigned long Current); + void SubProgress(unsigned long SubTotal); void SubProgress(unsigned long SubTotal,string Op); void OverallProgress(unsigned long Current,unsigned long Total, unsigned long Size,string Op); - + virtual void Done() {}; + OpProgress(); virtual ~OpProgress() {}; }; @@ -69,15 +73,18 @@ class OpTextProgress : public OpProgress string OldOp; bool NoUpdate; + bool NoDisplay; unsigned long LastLen; virtual void Update(); void Write(const char *S); public: - void Done(); + 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();}; };