summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/plugin/Server.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2009-04-22 11:19:30 -0230
committerDwayne Boone <dwayne@zeroc.com>2009-04-22 11:19:30 -0230
commit4db3e73ce821b142d0f139e30bf81a13db92ed95 (patch)
tree7742182c3816cd40b99f5b77d9d48a39c9b9953c /cpp/demo/Ice/plugin/Server.cpp
parentBug 3912 - fixed windows build for new plugin demo (diff)
downloadice-4db3e73ce821b142d0f139e30bf81a13db92ed95.tar.bz2
ice-4db3e73ce821b142d0f139e30bf81a13db92ed95.tar.xz
ice-4db3e73ce821b142d0f139e30bf81a13db92ed95.zip
Bug 3912 - added regular plugin to plugin demo
Diffstat (limited to 'cpp/demo/Ice/plugin/Server.cpp')
-rw-r--r--cpp/demo/Ice/plugin/Server.cpp35
1 files changed, 14 insertions, 21 deletions
diff --git a/cpp/demo/Ice/plugin/Server.cpp b/cpp/demo/Ice/plugin/Server.cpp
index 368183e76bb..32d1bd4e020 100644
--- a/cpp/demo/Ice/plugin/Server.cpp
+++ b/cpp/demo/Ice/plugin/Server.cpp
@@ -8,37 +8,30 @@
// **********************************************************************
#include <Ice/Ice.h>
-#include <HelloI.h>
using namespace std;
-class HelloServer : public Ice::Application
+class PluginServer : public Ice::Application
{
public:
- virtual int run(int, char*[]);
+ virtual int
+ run(int argc, char* argv[])
+ {
+ if(argc > 1)
+ {
+ cerr << appName() << ": too many arguments" << endl;
+ return EXIT_FAILURE;
+ }
+
+ communicator()->waitForShutdown();
+ return EXIT_SUCCESS;
+ }
};
int
main(int argc, char* argv[])
{
- HelloServer app;
+ PluginServer app;
return app.main(argc, argv, "config.server");
}
-
-int
-HelloServer::run(int argc, char* argv[])
-{
- if(argc > 1)
- {
- cerr << appName() << ": too many arguments" << endl;
- return EXIT_FAILURE;
- }
-
- Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Hello");
- Demo::HelloPtr hello = new HelloI;
- adapter->add(hello, communicator()->stringToIdentity("hello"));
- adapter->activate();
- communicator()->waitForShutdown();
- return EXIT_SUCCESS;
-}