summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/callback/CallbackSenderI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/Ice/callback/CallbackSenderI.cpp')
-rw-r--r--cpp/demo/Ice/callback/CallbackSenderI.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/cpp/demo/Ice/callback/CallbackSenderI.cpp b/cpp/demo/Ice/callback/CallbackSenderI.cpp
new file mode 100644
index 00000000000..3d0a7b7b402
--- /dev/null
+++ b/cpp/demo/Ice/callback/CallbackSenderI.cpp
@@ -0,0 +1,43 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2005 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 <CallbackSenderI.h>
+
+using namespace std;
+using namespace Ice;
+using namespace Demo;
+
+void
+CallbackSenderI::initiateCallback(const CallbackReceiverPrx& proxy, const Current& current)
+{
+ cout << "initiating callback" << endl;
+ try
+ {
+ proxy->callback(current.ctx);
+ }
+ catch(const Exception& ex)
+ {
+ cout << ex << endl;
+ }
+}
+
+void
+CallbackSenderI::shutdown(const Current& c)
+{
+ cout << "shutting down..." << endl;
+ try
+ {
+ c.adapter->getCommunicator()->shutdown();
+ }
+ catch(const Exception& ex)
+ {
+ cout << ex << endl;
+ }
+}