[hydra-commits] beagles: branch ice/slice-translator-versioning r670 - /ice/branches/slice-tr...

SVN commits to the Hydra project hydra-commits at lists.digium.com
Thu Jun 10 14:56:48 CDT 2010


Author: beagles
Date: Thu Jun 10 14:56:47 2010
New Revision: 670

URL: https://origsvn.digium.com/svn-view/hydra?view=rev&rev=670
Log:
add missing file

Added:
    ice/branches/slice-translator-versioning/cpp/test/Ice/versioning/Server.cpp   (with props)

Added: ice/branches/slice-translator-versioning/cpp/test/Ice/versioning/Server.cpp
URL: https://origsvn.digium.com/svn-view/hydra/ice/branches/slice-translator-versioning/cpp/test/Ice/versioning/Server.cpp?view=auto&rev=670
==============================================================================
--- ice/branches/slice-translator-versioning/cpp/test/Ice/versioning/Server.cpp (added)
+++ ice/branches/slice-translator-versioning/cpp/test/Ice/versioning/Server.cpp Thu Jun 10 14:56:47 2010
@@ -1,0 +1,65 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2010 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 <TestI.h>
+
+using namespace std;
+using namespace Test;
+
+int
+run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
+{
+
+    communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010");
+    Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
+    InitialPtr initial = new InitialI(adapter);
+    adapter->add(initial, communicator->stringToIdentity("initial"));
+
+    Version1::IAPtr ver1 = new Version1I;
+    adapter->addFacet(ver1, communicator->stringToIdentity("initial"), Test::Version1::InterfaceVersion);
+    Version2::IAPtr ver2 = new Version2I;
+    adapter->addFacet(ver2, communicator->stringToIdentity("initial"), Test::Version2::InterfaceVersion);
+    adapter->activate();
+    communicator->waitForShutdown();
+    return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+    int status;
+    Ice::CommunicatorPtr communicator;
+
+    try
+    {
+        communicator = Ice::initialize(argc, argv);
+        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;
+}

Propchange: ice/branches/slice-translator-versioning/cpp/test/Ice/versioning/Server.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ice/branches/slice-translator-versioning/cpp/test/Ice/versioning/Server.cpp
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: ice/branches/slice-translator-versioning/cpp/test/Ice/versioning/Server.cpp
------------------------------------------------------------------------------
    svn:mime-type = text/plain





More information about the asterisk-scf-commits mailing list