diff options
author | Marc Laukien <marc@zeroc.com> | 2002-04-14 22:53:32 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-04-14 22:53:32 +0000 |
commit | 91300e7dbe6528b6b887fbf8734ed1c49e437b55 (patch) | |
tree | 306ec331004b79146ff0ef217dde0aae1129b382 /cpp/src/IcePatch/NodeI.cpp | |
parent | udp fixes (diff) | |
download | ice-91300e7dbe6528b6b887fbf8734ed1c49e437b55.tar.bz2 ice-91300e7dbe6528b6b887fbf8734ed1c49e437b55.tar.xz ice-91300e7dbe6528b6b887fbf8734ed1c49e437b55.zip |
fixes to IcePatch
Diffstat (limited to 'cpp/src/IcePatch/NodeI.cpp')
-rw-r--r-- | cpp/src/IcePatch/NodeI.cpp | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/cpp/src/IcePatch/NodeI.cpp b/cpp/src/IcePatch/NodeI.cpp deleted file mode 100644 index 02cea3d9e93..00000000000 --- a/cpp/src/IcePatch/NodeI.cpp +++ /dev/null @@ -1,99 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2002 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#include <IcePatch/NodeI.h> -#include <IcePatch/Util.h> - -using namespace std; -using namespace Ice; -using namespace IcePatch; - -IcePatch::NodeI::NodeI(const ObjectAdapterPtr& adapter) : - _adapter(adapter) -{ -} - -IcePatch::DirectoryI::DirectoryI(const ObjectAdapterPtr& adapter) : - NodeI(adapter) -{ -} - -NodeDescPtr -IcePatch::DirectoryI::describe(const Ice::Current& current) -{ - DirectoryDescPtr desc = new DirectoryDesc; - desc->directory = DirectoryPrx::uncheckedCast(_adapter->createProxy(current.identity)); - return desc; -} - -NodeDescSeq -IcePatch::DirectoryI::getContents(const Ice::Current& current) -{ - StringSeq paths = readDirectory(identityToPath(current.identity)); - - NodeDescSeq result; - result.reserve(paths.size()); - - StringSeq::const_iterator p; - for (p = paths.begin(); p != paths.end(); ++p) - { - if (pathToName(*p) == tmpName) - { - continue; - } - - string suffix = getSuffix(*p); - if (suffix == "md5" || suffix == "bz2") - { - continue; - } - - NodePrx node = NodePrx::uncheckedCast(_adapter->createProxy(pathToIdentity(*p))); - try - { - result.push_back(node->describe()); - } - catch (const ObjectNotExistException&) - { - // - // Ignore. This can for example happen if the node - // locator cannot call stat() on the file. - // - } - } - - return result; -} - -IcePatch::FileI::FileI(const ObjectAdapterPtr& adapter) : - NodeI(adapter) -{ -} - -NodeDescPtr -IcePatch::FileI::describe(const Ice::Current& current) -{ - FileDescPtr desc = new FileDesc; - desc->file = FilePrx::uncheckedCast(_adapter->createProxy(current.identity)); - desc->md5 = getMD5(identityToPath(current.identity)); - return desc; -} - -Int -IcePatch::FileI::getSizeBZ2(const Ice::Current& current) -{ - return IcePatch::getSizeBZ2(identityToPath(current.identity)); -} - -ByteSeq -IcePatch::FileI::getBytesBZ2(Ice::Int pos, Ice::Int num, const Ice::Current& current) -{ - return IcePatch::getBytesBZ2(identityToPath(current.identity), pos, num); -} |