diff options
author | Michi Henning <michi@zeroc.com> | 2005-01-15 01:14:19 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-01-15 01:14:19 +0000 |
commit | 9e54a8065644aa3f1abb2019acf21da8f5040dd9 (patch) | |
tree | f22028c4112ea0ecc2ad1f599735ab02e78a55d9 /cpp/demo/Glacier/session/Server.cpp | |
parent | Oops, forgot to save all.dsw before I committed the change to remove (diff) | |
download | ice-9e54a8065644aa3f1abb2019acf21da8f5040dd9.tar.bz2 ice-9e54a8065644aa3f1abb2019acf21da8f5040dd9.tar.xz ice-9e54a8065644aa3f1abb2019acf21da8f5040dd9.zip |
Removed Glacier from source tree.
Diffstat (limited to 'cpp/demo/Glacier/session/Server.cpp')
-rw-r--r-- | cpp/demo/Glacier/session/Server.cpp | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/cpp/demo/Glacier/session/Server.cpp b/cpp/demo/Glacier/session/Server.cpp deleted file mode 100644 index 7d767890602..00000000000 --- a/cpp/demo/Glacier/session/Server.cpp +++ /dev/null @@ -1,82 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <Ice/Ice.h> -#include <Glacier/Glacier.h> -#include <HelloSessionI.h> - -using namespace std; - -class PermissionsVerifierI : public Glacier::PermissionsVerifier -{ -public: - - virtual bool - checkPermissions(const string& userId, const string& password, string&, const Ice::Current&) const - { - return userId == password; - } -}; - -int -run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) -{ - Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("HelloSessionManager"); - - // - // Create the SessionManager. - // - Ice::ObjectPtr object = new HelloSessionManagerI(adapter); - adapter->add(object, Ice::stringToIdentity("HelloSessionManager")); - - // - // Create the PermissionsVerifier. - // - Ice::ObjectPtr verifier = new PermissionsVerifierI; - adapter->add(verifier, Ice::stringToIdentity("PermissionsVerifier")); - - adapter->activate(); - communicator->waitForShutdown(); - return EXIT_SUCCESS; -} - -int -main(int argc, char* argv[]) -{ - int status; - Ice::CommunicatorPtr communicator; - - try - { - Ice::PropertiesPtr properties = Ice::createProperties(); - properties->load("config"); - communicator = Ice::initializeWithProperties(argc, argv, properties); - status = run(argc, argv, communicator); - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } - - if(communicator) - { - try - { - communicator->destroy(); - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } - } - - return status; -} |