blob: d501b04806acbe624d51a46bca347e64175c704c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// **********************************************************************
//
// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
//
// This copy of Ice-E is licensed to you under the terms described in the
// ICEE_LICENSE file included in this distribution.
//
// **********************************************************************
#include <CallbackSenderI.h>
#include <IceE/IceE.h>
using namespace std;
using namespace Demo;
void
CallbackSenderI::initiateCallback(const CallbackReceiverPrx& proxy, const Ice::Current& current)
{
printf("initiating callback\n");
try
{
proxy->callback(current.ctx);
}
catch(const Ice::Exception& ex)
{
fprintf(stderr, "%s\n", ex.toString().c_str());
}
}
void
CallbackSenderI::shutdown(const Ice::Current& c)
{
printf("shutting down...\n");
try
{
c.adapter->getCommunicator()->shutdown();
}
catch(const Ice::Exception& ex)
{
fprintf(stderr, "%s\n", ex.toString().c_str());
}
}
|