diff options
Diffstat (limited to 'cpp/test/Glacier2/application/Server.cpp')
-rw-r--r-- | cpp/test/Glacier2/application/Server.cpp | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/cpp/test/Glacier2/application/Server.cpp b/cpp/test/Glacier2/application/Server.cpp deleted file mode 100644 index 0f3170e7933..00000000000 --- a/cpp/test/Glacier2/application/Server.cpp +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#include <IceUtil/IceUtil.h> -#include <Ice/Ice.h> -#include <TestHelper.h> -#include <Callback.h> - -using namespace std; -using namespace Test; - -namespace -{ - -class CallbackI : public Callback -{ - -public: - - virtual void - initiateCallback(ICE_IN(CallbackReceiverPrxPtr) proxy, const Ice::Current& current) - { - proxy->callback(current.ctx); - } - - virtual void - shutdown(const Ice::Current& current) - { - current.adapter->getCommunicator()->shutdown(); - } -}; - -} - -class Server : public Test::TestHelper -{ -public: - - void run(int, char**); -}; - -void -Server::run(int argc, char** argv) -{ - Ice::CommunicatorHolder communicator = initialize(argc, argv); - communicator->getProperties()->setProperty("DeactivatedAdapter.Endpoints", getTestEndpoint(1)); - communicator->createObjectAdapter("DeactivatedAdapter"); - - communicator->getProperties()->setProperty("CallbackAdapter.Endpoints", getTestEndpoint()); - Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("CallbackAdapter"); - adapter->add(ICE_MAKE_SHARED(CallbackI), Ice::stringToIdentity("callback")); - adapter->activate(); - communicator->waitForShutdown(); -} - -DEFINE_TEST(Server) |