diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-07-23 11:19:08 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-07-23 11:19:08 +0000 |
commit | 915932d9128567204c20be8c4bc99cde63d8482f (patch) | |
tree | 605a6ed668c823322d999f25fdebb3becae47de7 /TAO/tao | |
parent | c3c8dfcada5b9728a1bc26bd05c466cf2eae9724 (diff) | |
download | ATCD-915932d9128567204c20be8c4bc99cde63d8482f.tar.gz |
Mon Jul 23 11:18:14 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/GIOP_Message_Base.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_State.cpp | 20 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_State.h | 23 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_State.inl | 30 |
4 files changed, 49 insertions, 34 deletions
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index 04e76dc5920..88cca36bdef 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -301,7 +301,7 @@ TAO_GIOP_Message_Base::message_type ( { // Convert to the right type of Pluggable Messaging message type. - switch (msg_state.message_type_) + switch (msg_state.message_type ()) { case TAO_GIOP_REQUEST: return TAO_PLUGGABLE_MESSAGE_REQUEST; @@ -1658,10 +1658,10 @@ TAO_GIOP_Message_Base::init_queued_data ( TAO_Queued_Data* qd, const TAO_GIOP_Message_State& state) const { - qd->byte_order_ = state.byte_order_; - qd->major_version_ = state.giop_version_.major; - qd->minor_version_ = state.giop_version_.minor; - qd->more_fragments_ = state.more_fragments_; + qd->byte_order_ = state.byte_order (); + qd->major_version_ = state.giop_version ().major; + qd->minor_version_ = state.giop_version ().minor; + qd->more_fragments_ = state.more_fragments (); qd->msg_type_ = this->message_type (state); } diff --git a/TAO/tao/GIOP_Message_State.cpp b/TAO/tao/GIOP_Message_State.cpp index 1d19bfbb7ce..c2f3c9203bb 100644 --- a/TAO/tao/GIOP_Message_State.cpp +++ b/TAO/tao/GIOP_Message_State.cpp @@ -16,17 +16,6 @@ ACE_RCSID (tao, TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_GIOP_Message_State::TAO_GIOP_Message_State (void) - : giop_version_ (TAO_DEF_GIOP_MAJOR, - TAO_DEF_GIOP_MINOR), - byte_order_ (0), - message_type_ (0), - message_size_ (0), - more_fragments_ (0), - missing_data_ (0) -{ -} - int TAO_GIOP_Message_State::parse_message_header (ACE_Message_Block &incoming) { @@ -47,7 +36,7 @@ TAO_GIOP_Message_State::parse_message_header_i (ACE_Message_Block &incoming) if (TAO_debug_level > 8) { ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - GIOP_Message_State::parse_message_header_i\n" + ACE_TEXT ("TAO (%P|%t) - GIOP_Message_State::parse_message_header_i\n") )); } @@ -87,14 +76,15 @@ TAO_GIOP_Message_State::parse_message_header_i (ACE_Message_Block &incoming) (t == TAO_GIOP_CLOSECONNECTION) ? "CloseConnection" : (t == TAO_GIOP_MESSAGERROR) ? "MessageError" : "unknown"; ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - GIOP %s received \n", which)); + ACE_TEXT ("TAO (%P|%t) - GIOP %s received \n"), which)); } return 0; default: if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - " - "Message of size zero recd. \n")); + ACE_TEXT ("TAO (%P|%t) - ") + ACE_TEXT ("TAO_GIOP_Message_State::parse_magic_bytes, ") + ACE_TEXT ("Message of size zero recd. \n"))); return -1; } } diff --git a/TAO/tao/GIOP_Message_State.h b/TAO/tao/GIOP_Message_State.h index 9de7eee5b7e..370a3fc2041 100644 --- a/TAO/tao/GIOP_Message_State.h +++ b/TAO/tao/GIOP_Message_State.h @@ -8,10 +8,10 @@ * * GIOP utility definitions * - * * @author Chris Cleeland <cleeland@cs.wustl.edu> * @author Carlos O' Ryan <coryan@uci.edu> * @author Balachandran Natarajan <bala@cs.wustl.edu> + * @author Johnny Willemsen <jwillemsen@remedy.nl> */ //============================================================================= #ifndef TAO_GIOP_MESSAGE_STATE_H @@ -25,13 +25,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ - TAO_BEGIN_VERSIONED_NAMESPACE_DECL -class TAO_ORB_Core; -class TAO_GIOP_Message_Base; - - /** * @class TAO_GIOP_Message_State * @@ -64,13 +59,18 @@ public: /// Return the byte order information CORBA::Octet byte_order (void) const; + /// Return the message type + CORBA::Octet message_type (void) const; + + /// Return the more fragments + CORBA::Octet more_fragments (void) const; + + TAO_GIOP_Message_Version const & giop_version (void) const; + /// Reset the state.. void reset (void); private: - - friend class TAO_GIOP_Message_Base; - /// Parse the message header. int parse_message_header_i (ACE_Message_Block &incoming); @@ -91,7 +91,7 @@ private: /// Gets the size of the payload and set the size in the <state> void get_payload_size (char *buf); - /// Read the unsigned long from the buffer. The <buf> should just + /// Read the unsigned long from the buffer. The @a buf should just /// point to the next 4 bytes data that represent the ULong CORBA::ULong read_ulong (const char *buf) const; @@ -113,9 +113,6 @@ private: /// fragments. A value of non-zero indicates that it does have /// fragments. CORBA::Octet more_fragments_; - - /// Missing data - CORBA::ULong missing_data_; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/GIOP_Message_State.inl b/TAO/tao/GIOP_Message_State.inl index a91d573d232..d6ffb97a4d4 100644 --- a/TAO/tao/GIOP_Message_State.inl +++ b/TAO/tao/GIOP_Message_State.inl @@ -4,6 +4,17 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL +ACE_INLINE +TAO_GIOP_Message_State::TAO_GIOP_Message_State (void) + : giop_version_ (TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR), + byte_order_ (0), + message_type_ (0), + message_size_ (0), + more_fragments_ (0) +{ +} + ACE_INLINE CORBA::ULong TAO_GIOP_Message_State::message_size (void) const { @@ -25,13 +36,30 @@ TAO_GIOP_Message_State::byte_order (void) const return this->byte_order_; } +ACE_INLINE CORBA::Octet +TAO_GIOP_Message_State::message_type (void) const +{ + return this->message_type_; +} + +ACE_INLINE CORBA::Octet +TAO_GIOP_Message_State::more_fragments (void) const +{ + return this->more_fragments_; +} + +ACE_INLINE TAO_GIOP_Message_Version const & +TAO_GIOP_Message_State::giop_version (void) const +{ + return this->giop_version_; +} + ACE_INLINE void TAO_GIOP_Message_State::reset (void) { this->message_type_ = 0; this->message_size_ = 0; this->more_fragments_ = 0; - this->missing_data_ = 0; } TAO_END_VERSIONED_NAMESPACE_DECL |