summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch/Client.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-04-28 13:53:42 +0000
committerMarc Laukien <marc@zeroc.com>2002-04-28 13:53:42 +0000
commitee69188a792f0d2b85838256496b51d685689fa1 (patch)
tree54c36305a192fadea82ee551b7b19ff35d97738f /cpp/src/IcePatch/Client.cpp
parentpython test scripts cleanup (diff)
downloadice-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.cpp19
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)