summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/progress.h
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2012-04-16 19:24:07 +0200
committerMichael Vogt <egon@debian-devbox>2012-04-16 19:24:07 +0200
commit443f5e8a3205162ec6933529c5ca0c95ad3f6941 (patch)
tree3e2da22dcecc8eeaabc1ac5ceac0407a8e3cc25f /apt-pkg/contrib/progress.h
parent96273866174c54bdb25813633891f29668d43848 (diff)
parentf352743312edeebf666e1c8304cdc4baf457469f (diff)
merge from the expermental2 branch
Diffstat (limited to 'apt-pkg/contrib/progress.h')
-rw-r--r--apt-pkg/contrib/progress.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/apt-pkg/contrib/progress.h b/apt-pkg/contrib/progress.h
index 7dd004f7e..3a6943aee 100644
--- a/apt-pkg/contrib/progress.h
+++ b/apt-pkg/contrib/progress.h
@@ -25,26 +25,28 @@
#include <string>
#include <sys/time.h>
+#ifndef APT_8_CLEANER_HEADERS
using std::string;
+#endif
class Configuration;
class OpProgress
{
- unsigned long Current;
- unsigned long Total;
- unsigned long Size;
- unsigned long SubTotal;
+ unsigned long long Current;
+ unsigned long long Total;
+ unsigned long long Size;
+ unsigned long long SubTotal;
float LastPercent;
// Change reduction code
struct timeval LastTime;
- string LastOp;
- string LastSubOp;
+ std::string LastOp;
+ std::string LastSubOp;
protected:
- string Op;
- string SubOp;
+ std::string Op;
+ std::string SubOp;
float Percent;
bool MajorChange;
@@ -54,11 +56,10 @@ class OpProgress
public:
- void Progress(unsigned long Current);
- void SubProgress(unsigned long SubTotal);
- void SubProgress(unsigned long SubTotal,const string &Op);
- void OverallProgress(unsigned long Current,unsigned long Total,
- unsigned long Size,const string &Op);
+ void Progress(unsigned long long Current);
+ void SubProgress(unsigned long long SubTotal, const std::string &Op = "", float const Percent = -1);
+ void OverallProgress(unsigned long long Current,unsigned long long Total,
+ unsigned long long Size,const std::string &Op);
virtual void Done() {};
OpProgress();
@@ -68,8 +69,8 @@ class OpProgress
class OpTextProgress : public OpProgress
{
protected:
-
- string OldOp;
+
+ std::string OldOp;
bool NoUpdate;
bool NoDisplay;
unsigned long LastLen;