Public Member Functions

TAO_SFP_Consumer_Object Class Reference

#include <sfp.h>

Inheritance diagram for TAO_SFP_Consumer_Object:
Inheritance graph
[legend]
Collaboration diagram for TAO_SFP_Consumer_Object:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TAO_SFP_Consumer_Object (TAO_AV_Callback *callback, TAO_AV_Transport *transport, ACE_CString &flow_options)
virtual int handle_input (void)

Detailed Description

Definition at line 273 of file sfp.h.


Constructor & Destructor Documentation

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.

  :TAO_SFP_Object (callback,transport)
{
  TAO_AV_PolicyList policies = callback->get_policies ();
  if (policies.length () == 0)
    return;
  this->set_policies (policies);
  if (this->max_credit_ > 0)
    {
      sfp_options = "sfp:1.0:credit=";
      char buf[10];
      ACE_OS::sprintf(buf, "%d", this->max_credit_);
      sfp_options += buf;
    }
}


Member Function Documentation

int TAO_SFP_Consumer_Object::handle_input ( void   )  [virtual]

Implements TAO_SFP_Object.

Definition at line 1129 of file sfp.cpp.

{
  if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_SFP_Consumer_Object::handle_input\n"));
  // This is the entry point for receiving data.
  TAO_AV_frame_info *frame_info = 0;
  int result = TAO_SFP_Base::handle_input (this->transport_,
                                           this->state_,
                                           frame_info);
  if (result < 0)
    ACE_ERROR_RETURN ((LM_ERROR,"ERROR in TAO_SFP_Consumer_Object::handle_input"),result);
  if (this->state_.frame_header_.message_type == flowProtocol::EndofStream_Msg)
    this->callback_->handle_destroy ();
  if (this->state_.is_complete ())
    {
      this->callback_->receive_frame (this->state_.frame_block_,
                                      frame_info);
      // Now release the memory for the frame.
      if (this->state_.frame_block_ != &this->state_.static_frame_)
        {
          ACE_Message_Block *temp = 0;
          for (temp = this->state_.frame_block_;
               temp != 0;
               temp = temp->cont ())
            {
              temp->release ();
              delete temp;
            }
        }
      this->state_.reset ();
    }
  return 0;
}


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines