00001
00002
00003 #include "tao/GIOP_Message_Generator_Parser.h"
00004 #include "tao/Pluggable_Messaging_Utils.h"
00005 #include "tao/GIOP_Utils.h"
00006 #include "tao/debug.h"
00007 #include "tao/CDR.h"
00008 #include "ace/Log_Msg.h"
00009
00010
00011 ACE_RCSID (tao,
00012 GIOP_Message_Gen_Parser,
00013 "$Id: GIOP_Message_Generator_Parser.cpp 79705 2007-09-24 07:45:37Z johnnyw $")
00014
00015
00016 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00017
00018 TAO_GIOP_Message_Generator_Parser::~TAO_GIOP_Message_Generator_Parser (void)
00019 {
00020 }
00021
00022 int
00023 TAO_GIOP_Message_Generator_Parser::parse_reply (
00024 TAO_InputCDR &stream,
00025 TAO_Pluggable_Reply_Params ¶ms)
00026 {
00027
00028 if (!stream.read_ulong (params.request_id_))
00029 {
00030 if (TAO_debug_level)
00031 {
00032 ACE_ERROR ((LM_ERROR,
00033 ACE_TEXT ("TAO (%P|%t) : TAO_GIOP_Message_Generator_Parser::parse_reply :")
00034 ACE_TEXT ("extracting request id\n")));
00035 }
00036 return -1;
00037 }
00038
00039
00040
00041
00042 CORBA::ULong rep_stat = 0;
00043 if (!stream.read_ulong (rep_stat))
00044 {
00045 if (TAO_debug_level > 0)
00046 {
00047 ACE_ERROR ((LM_ERROR,
00048 ACE_TEXT ("TAO (%P|%t) : TAO_GIOP_Message_Generator_Parser::parse_reply, ")
00049 ACE_TEXT ("extracting reply status\n")));
00050 }
00051 return -1;
00052 }
00053
00054 params.reply_status (static_cast <GIOP::ReplyStatusType> (rep_stat));
00055
00056 return 0;
00057 }
00058
00059
00060 int
00061 TAO_GIOP_Message_Generator_Parser::parse_locate_reply (
00062 TAO_InputCDR &cdr,
00063 TAO_Pluggable_Reply_Params ¶ms)
00064 {
00065
00066 if (!cdr.read_ulong (params.request_id_))
00067 {
00068 if (TAO_debug_level > 0)
00069 ACE_ERROR ((LM_ERROR,
00070 ACE_TEXT ("TAO (%P|%t|%N|%l):parse_locate_reply, ")
00071 ACE_TEXT ("extracting request id\n")));
00072
00073 return -1;
00074 }
00075
00076
00077
00078
00079
00080
00081
00082
00083 CORBA::ULong locate_reply_status;
00084 if (!cdr.read_ulong (locate_reply_status))
00085 {
00086 if (TAO_debug_level > 0)
00087 ACE_ERROR ((LM_ERROR,
00088 ACE_TEXT ("TAO N|(%P|%t|l) parse_locate_reply, ")
00089 ACE_TEXT ("extracting locate reply status\n")));
00090
00091 return -1;
00092 }
00093 params.locate_reply_status (static_cast <GIOP::LocateStatusType> (locate_reply_status));
00094
00095 return 0;
00096
00097 }
00098
00099 bool
00100 TAO_GIOP_Message_Generator_Parser::is_ready_for_bidirectional (void) const
00101 {
00102 return false;
00103 }
00104
00105 TAO_END_VERSIONED_NAMESPACE_DECL