#include <sfp.h>
Inheritance diagram for TAO_SFP_Consumer_Object:
Public Member Functions | |
TAO_SFP_Consumer_Object (TAO_AV_Callback *callback, TAO_AV_Transport *transport, ACE_CString &flow_options) | |
virtual int | handle_input (void) |
Definition at line 273 of file sfp.h.
TAO_SFP_Consumer_Object::TAO_SFP_Consumer_Object | ( | TAO_AV_Callback * | callback, | |
TAO_AV_Transport * | transport, | |||
ACE_CString & | flow_options | |||
) |
Definition at line 1110 of file sfp.cpp.
References TAO_AV_Callback::get_policies(), TAO_SFP_Object::set_policies(), and ACE_OS::sprintf().
01113 :TAO_SFP_Object (callback,transport) 01114 { 01115 TAO_AV_PolicyList policies = callback->get_policies (); 01116 if (policies.length () == 0) 01117 return; 01118 this->set_policies (policies); 01119 if (this->max_credit_ > 0) 01120 { 01121 sfp_options = "sfp:1.0:credit="; 01122 char buf[10]; 01123 ACE_OS::sprintf(buf, "%d", this->max_credit_); 01124 sfp_options += buf; 01125 } 01126 }
int TAO_SFP_Consumer_Object::handle_input | ( | void | ) | [virtual] |
Implements TAO_SFP_Object.
Definition at line 1129 of file sfp.cpp.
References ACE_DEBUG, ACE_ERROR_RETURN, TAO_AV_Protocol_Object::callback_, ACE_Message_Block::cont(), flowProtocol::EndofStream_Msg, TAO_AV_Callback::handle_destroy(), TAO_SFP_Base::handle_input(), LM_DEBUG, LM_ERROR, ACE_Message_Block::release(), TAO_SFP_Frame_State::reset(), TAO_SFP_Object::state_, and TAO_debug_level.
01130 { 01131 if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_SFP_Consumer_Object::handle_input\n")); 01132 // This is the entry point for receiving data. 01133 TAO_AV_frame_info *frame_info = 0; 01134 int result = TAO_SFP_Base::handle_input (this->transport_, 01135 this->state_, 01136 frame_info); 01137 if (result < 0) 01138 ACE_ERROR_RETURN ((LM_ERROR,"ERROR in TAO_SFP_Consumer_Object::handle_input"),result); 01139 if (this->state_.frame_header_.message_type == flowProtocol::EndofStream_Msg) 01140 this->callback_->handle_destroy (); 01141 if (this->state_.is_complete ()) 01142 { 01143 this->callback_->receive_frame (this->state_.frame_block_, 01144 frame_info); 01145 // Now release the memory for the frame. 01146 if (this->state_.frame_block_ != &this->state_.static_frame_) 01147 { 01148 ACE_Message_Block *temp = 0; 01149 for (temp = this->state_.frame_block_; 01150 temp != 0; 01151 temp = temp->cont ()) 01152 { 01153 temp->release (); 01154 delete temp; 01155 } 01156 } 01157 this->state_.reset (); 01158 } 01159 return 0; 01160 }