summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/FileServerI.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2004-11-24 00:11:44 +0000
committerMarc Laukien <marc@zeroc.com>2004-11-24 00:11:44 +0000
commitf7d4889cca46e17167e3f46b1ef40b90ea1f0d99 (patch)
tree114bc1b8e385bf4b16555c0a11475f76f18f27e5 /cpp/src/IcePatch2/FileServerI.cpp
parentCleaned up compression code. (diff)
downloadice-f7d4889cca46e17167e3f46b1ef40b90ea1f0d99.tar.bz2
ice-f7d4889cca46e17167e3f46b1ef40b90ea1f0d99.tar.xz
ice-f7d4889cca46e17167e3f46b1ef40b90ea1f0d99.zip
more IcePatch2
Diffstat (limited to 'cpp/src/IcePatch2/FileServerI.cpp')
-rw-r--r--cpp/src/IcePatch2/FileServerI.cpp46
1 files changed, 4 insertions, 42 deletions
diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp
index 85fdc5bb6ce..313b14e3247 100644
--- a/cpp/src/IcePatch2/FileServerI.cpp
+++ b/cpp/src/IcePatch2/FileServerI.cpp
@@ -26,59 +26,21 @@ IcePatch2::FileServerI::FileServerI(const FileInfoSeq& infoSeq)
{
FileTree0& tree0 = const_cast<FileTree0&>(_tree0);
getFileTree0(infoSeq, tree0);
-
-/*
- assert(tree0.nodes.size() == 256);
- for(int i = 0; i < 256; ++i)
- {
- FileTree1& tree1 = tree0.nodes[i];
- assert(tree1.nodes.size() == 256);
- for(int j = 0; j < 256; ++j)
- {
- FileTree2& tree2 = tree1.nodes[j];
- }
- }
-
- cout << "Summary ===> " << bytesToString(tree0.checksum) << endl;
-*/
}
FileInfoSeq
-IcePatch2::FileServerI::getFileInfoSeq(Int node0, Int node1, const Current&) const
+IcePatch2::FileServerI::getFileInfo1Seq(Int node0, const Current&) const
{
if(node0 < 0 || node0 > 255)
{
throw NodeOutOfRangeException();
}
- if(node1 < 0 || node1 > 255)
- {
- throw NodeOutOfRangeException();
- }
-
- return _tree0.nodes[node0].nodes[node1].files;
-}
-
-ByteSeqSeq
-IcePatch2::FileServerI::getChecksum2Seq(Int node0, const Current&) const
-{
- if(node0 < 0 || node0 > 255)
- {
- throw NodeOutOfRangeException();
- }
-
- ByteSeqSeq checksums(256);
-
- for(int node1 = 0; node1 < 256; ++node1)
- {
- checksums[node1] = _tree0.nodes[node0].nodes[node1].checksum;
- }
-
- return checksums;
+ return _tree0.nodes[node0].files;
}
ByteSeqSeq
-IcePatch2::FileServerI::getChecksum1Seq(const Current&) const
+IcePatch2::FileServerI::getChecksum0Seq(const Current&) const
{
ByteSeqSeq checksums(256);
@@ -91,7 +53,7 @@ IcePatch2::FileServerI::getChecksum1Seq(const Current&) const
}
ByteSeq
-IcePatch2::FileServerI::getChecksum0(const Current&) const
+IcePatch2::FileServerI::getChecksum(const Current&) const
{
return _tree0.checksum;
}