From ee69188a792f0d2b85838256496b51d685689fa1 Mon Sep 17 00:00:00 2001 From: Marc Laukien Date: Sun, 28 Apr 2002 13:53:42 +0000 Subject: partial retransmission for IcePatch --- cpp/src/IcePatch/Client.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'cpp/src/IcePatch/Client.cpp') diff --git a/cpp/src/IcePatch/Client.cpp b/cpp/src/IcePatch/Client.cpp index d238528e654..0afbea8c998 100644 --- a/cpp/src/IcePatch/Client.cpp +++ b/cpp/src/IcePatch/Client.cpp @@ -241,9 +241,10 @@ class MyProgressCB : public ProgressCB { public: - virtual void startDownload(Int) + virtual void startDownload(Int total, Int pos) { - cout << " download 0%" << flush; + Ice::Int percent = pos * 100 / total; + cout << " download " << setw(3) << percent << "%" << flush; } virtual void updateDownload(Int total, Int pos) @@ -252,19 +253,21 @@ public: cout << "\b\b\b\b" << setw(3) << percent << "%" << flush; } - virtual void finishedDownload(Int) + virtual void finishedDownload(Int total) { - cout << "\b\b\b\b" << setw(3) << 100 << "%" << flush; + updateDownload(total, total); } - virtual void startUncompress(Int) + virtual void startUncompress(Int total, Int pos) { - cout << " uncompress 0%" << flush; + Ice::Int percent = pos * 100 / total; + cout << " uncompress " << setw(3) << percent << "%" << flush; } - + virtual void updateUncompress(Int total, Int pos) { - updateDownload(total, pos); + Ice::Int percent = pos * 100 / total; + cout << "\b\b\b\b" << setw(3) << percent << "%" << flush; } virtual void finishedUncompress(Int total) -- cgit v1.2.3