summaryrefslogtreecommitdiff
path: root/TAO/tests/NestedUpcall/eh_i.cpp
blob: 958212431369cba5ec26471f6d02b40cd7f530df (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
43
44
45
46
47
48
// $Id$

#include "tao/corba.h"
#include "eh_i.h"

// CTOR
EventHandler_i::EventHandler_i (void)
{
}

// DTOR
EventHandler_i::~EventHandler_i (void)
{
}

// Return a long
CORBA::Long
EventHandler_i::peer (CORBA::Environment &env)
{
  // Doesn't matter what value we return!
  CORBA::Long val = 6;
  
  ACE_DEBUG ((LM_DEBUG,
              "EventHandler_i::peer() returning %d\n",
              val));
  
  return val;
}

CORBA::UShort
EventHandler_i::decrement (Reactor_ptr eh,
                      CORBA::UShort num,
                      CORBA::Environment &env)
{
  ACE_DEBUG ((LM_DEBUG, "%{%I(%P|%t) EventHandler::decrement (%d)%$", num));
  
  CORBA::UShort ret;
  if (--num <= 0)
    ret = 0;
  else
    {
      ACE_DEBUG ((LM_DEBUG, "(%P|%t) EventHandler::decrement() invoking Reactor::decrement(%d)%$", num));
      ret = eh->decrement (_this (env), num, env);
    }
  ACE_DEBUG ((LM_DEBUG, "%}(%P|%t) EventHandler::decrement() returning %d%$", ret));
  return ret;
}