summaryrefslogtreecommitdiff
path: root/TAO/tao/GIOP_Message_Acceptors.i
blob: 0650167129716b17c3d5b2a41341de3a6fbb843e (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
64
65
66
67
68
69
70
71
72
73
// -*- C++ -*-

//$Id$

ACE_INLINE
TAO_GIOP_Message_Acceptors::
  TAO_GIOP_Message_Acceptors (TAO_ORB_Core *orb_core)
    : output_ (this->repbuf_,
               sizeof this->repbuf_,
               TAO_ENCAP_BYTE_ORDER,
               orb_core->output_cdr_buffer_allocator (),
               orb_core->output_cdr_dblock_allocator (),
               orb_core->orb_params ()->cdr_memcpy_tradeoff (),
               orb_core->to_iso8859 (),
               orb_core->to_unicode ())
      
{
#if defined(ACE_HAS_PURIFY)
  (void) ACE_OS::memset (this->repbuf_,
                         '\0',
                         sizeof this->repbuf_);
#endif /* ACE_HAS_PURIFY */
}


ACE_INLINE CORBA::Boolean
TAO_GIOP_Message_Acceptors::
  make_reply (CORBA::ULong request_id,
              TAO_OutputCDR &output)
{
  // Write the GIOP header first
  this->write_protocol_header (TAO_PLUGGABLE_MESSAGE_REPLY,
                               output);

  // Write the reply header
  this->accept_state_->write_reply_header (output,
                                           request_id);
  
  return 0;
                               
}




ACE_INLINE void
TAO_GIOP_Message_Acceptors::
set_state (CORBA::Octet def_major,
           CORBA::Octet def_minor)
{
  // @@Bala Need to find a better way
  switch (def_major)
    {
    case 1:
      switch (def_minor)
        {
        case 0:
          this->accept_state_ = &this->implementations_.version_10;
          break;
        case 1:
          this->accept_state_ = &this->implementations_.version_11;
          break;
        default:
          break;
        }
      break;
    default:
      break;
    }
}