summaryrefslogtreecommitdiff
path: root/cpp/demo/IceDiscovery/replication/HelloI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-04-22 17:44:12 +0200
committerBenoit Foucher <benoit@zeroc.com>2014-04-22 17:44:12 +0200
commit873b482a66e5914ba3dcf85d17fdc94a62457c6a (patch)
tree18211a7e8f13d3f4322df9479025ce5f5a74d72c /cpp/demo/IceDiscovery/replication/HelloI.cpp
parentRemove Qt and VC90 settings from Makefiles. (diff)
downloadice-873b482a66e5914ba3dcf85d17fdc94a62457c6a.tar.bz2
ice-873b482a66e5914ba3dcf85d17fdc94a62457c6a.tar.xz
ice-873b482a66e5914ba3dcf85d17fdc94a62457c6a.zip
Added IceDiscovery service plugin
Diffstat (limited to 'cpp/demo/IceDiscovery/replication/HelloI.cpp')
-rw-r--r--cpp/demo/IceDiscovery/replication/HelloI.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/cpp/demo/IceDiscovery/replication/HelloI.cpp b/cpp/demo/IceDiscovery/replication/HelloI.cpp
new file mode 100644
index 00000000000..b12d9db5d47
--- /dev/null
+++ b/cpp/demo/IceDiscovery/replication/HelloI.cpp
@@ -0,0 +1,30 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2013 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 <HelloI.h>
+
+using namespace std;
+
+HelloI::HelloI(const string& name) : _name(name)
+{
+}
+
+std::string
+HelloI::getGreeting(const Ice::Current&)
+{
+ return _name + " says Hello World!";
+}
+
+void
+HelloI::shutdown(const Ice::Current& c)
+{
+ cout << _name << " shutting down..." << endl;
+ c.adapter->getCommunicator()->shutdown();
+}