summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.inl
blob: 587c2721944250df9eed6484fc49da663a353981 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// -*- C++ -*-
//
// $Id$

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

ACE_INLINE
TAO_ECG_Mcast_EH::
Observer_Disconnect_Command::Observer_Disconnect_Command (void)
  : handle_ ()
  , ec_ ()
{
}

ACE_INLINE
TAO_ECG_Mcast_EH::
Observer_Disconnect_Command::Observer_Disconnect_Command (
                                 RtecEventChannelAdmin::Observer_Handle handle,
                                 RtecEventChannelAdmin::EventChannel_ptr ec)
  : handle_ (handle)
  , ec_ (RtecEventChannelAdmin::EventChannel::_duplicate (ec))
{
}

ACE_INLINE
TAO_ECG_Mcast_EH::
Observer_Disconnect_Command::Observer_Disconnect_Command (
                          const Observer_Disconnect_Command & rhs)
  : handle_ (rhs.handle_)
  , ec_ (RtecEventChannelAdmin::EventChannel::_duplicate (rhs.ec_.in()))
{
}

ACE_INLINE
TAO_ECG_Mcast_EH::Observer_Disconnect_Command &
TAO_ECG_Mcast_EH::
Observer_Disconnect_Command::operator= (
                         const Observer_Disconnect_Command & rhs)
{
  this->handle_ = rhs.handle_;
  this->ec_ = RtecEventChannelAdmin::EventChannel::_duplicate (rhs.ec_.in());

  return *this;
}

ACE_INLINE void
TAO_ECG_Mcast_EH::
Observer_Disconnect_Command::execute (ACE_ENV_SINGLE_ARG_DECL)
{
  if (CORBA::is_nil (this->ec_.in ()))
    // We are not connected.
    return;

  RtecEventChannelAdmin::EventChannel_var release_ec =
    this->ec_._retn ();

  release_ec->remove_observer (this->handle_ ACE_ENV_ARG_PARAMETER);
  ACE_CHECK;
}

//***************************************************************************

TAO_END_VERSIONED_NAMESPACE_DECL