diff options
author | Marc Laukien <marc@zeroc.com> | 2002-04-28 13:53:42 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-04-28 13:53:42 +0000 |
commit | ee69188a792f0d2b85838256496b51d685689fa1 (patch) | |
tree | 54c36305a192fadea82ee551b7b19ff35d97738f /cpp/src/IcePatch/Client.cpp | |
parent | python test scripts cleanup (diff) | |
download | ice-ee69188a792f0d2b85838256496b51d685689fa1.tar.bz2 ice-ee69188a792f0d2b85838256496b51d685689fa1.tar.xz ice-ee69188a792f0d2b85838256496b51d685689fa1.zip |
partial retransmission for IcePatch
Diffstat (limited to 'cpp/src/IcePatch/Client.cpp')
-rw-r--r-- | cpp/src/IcePatch/Client.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
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) |