diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2005-09-02 14:55:49 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2005-09-02 14:55:49 +0000 |
commit | 7ac049a48f2561364e47b247572cb971f78b42e5 (patch) | |
tree | b4ade3ca787aa9f4a1ab2f88c70460a8f5037d20 /cpp/demo/Ice/callback/CallbackSenderI.cpp | |
parent | Fix (diff) | |
download | ice-7ac049a48f2561364e47b247572cb971f78b42e5.tar.bz2 ice-7ac049a48f2561364e47b247572cb971f78b42e5.tar.xz ice-7ac049a48f2561364e47b247572cb971f78b42e5.zip |
Renamed Callback interface
Diffstat (limited to 'cpp/demo/Ice/callback/CallbackSenderI.cpp')
-rw-r--r-- | cpp/demo/Ice/callback/CallbackSenderI.cpp | 43 |
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; + } +} |