summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/AV
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/AV')
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp771
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h495
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/sfp.cpp211
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/sfp.h81
4 files changed, 0 insertions, 1558 deletions
diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp
deleted file mode 100644
index 983e3527555..00000000000
--- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp
+++ /dev/null
@@ -1,771 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// AVStreams_i.cpp
-//
-// = AUTHOR
-// Sumedh Mungee <sumedh@cs.wustl.edu>
-//
-//
-// ============================================================================
-
-#include "orbsvcs/AV/AVStreams_i.h"
-
-// ----------------------------------------------------------------------
-// TAO_Basic_StreamCtrl
-// ----------------------------------------------------------------------
-
-// Constructor
-TAO_Basic_StreamCtrl::TAO_Basic_StreamCtrl (CORBA::ORB_var orb)
- : orb_ (orb)
-{
-}
-
-TAO_Basic_StreamCtrl::~TAO_Basic_StreamCtrl (void)
-{
-}
-
-// Stop the transfer of data of the stream
-// Empty the_spec means apply operation to all flows
-void
-TAO_Basic_StreamCtrl::stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- if (CORBA::is_nil (stream_endpoint_a_.in ()))
- return;
-
- // Make the upcall into the application
- this->stream_endpoint_a_->stop (the_spec, env);
-}
-
-// Start the transfer of data in the stream.
-// Empty the_spec means apply operation to all flows
-void
-TAO_Basic_StreamCtrl::start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- if (CORBA::is_nil (this->stream_endpoint_a_.in ()))
- return;
-
- // Make the upcall into the application
- this->stream_endpoint_a_->start (the_spec, env);
-}
-
-// Tears down the stream. This will close the connection, and delete
-// the streamendpoint and vdev associated with this stream
-// Empty the_spec means apply operation to all flows
-void
-TAO_Basic_StreamCtrl::destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- if (CORBA::is_nil (this->stream_endpoint_a_.in ()))
- return;
-
- // Make the upcall into the application
- this->stream_endpoint_a_->destroy (the_spec, env);
-}
-
-// Changes the QoS associated with the stream
-// Empty the_spec means apply operation to all flows
-CORBA::Boolean
-TAO_Basic_StreamCtrl::modify_QoS (AVStreams::streamQoS &new_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (new_qos);
- ACE_UNUSED_ARG (the_spec);
- ACE_UNUSED_ARG (env);
- return 0;
-}
-
-// Used by StreamEndPoint and VDev to inform StreamCtrl of events.
-// E.g., loss of flow, reestablishment of flow, etc..
-void
-TAO_Basic_StreamCtrl::push_event (const char *the_event,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) Recieved event \"%s\"",
- the_event));
- ACE_UNUSED_ARG (env);
-}
-
-// Used to control the flow protocol parameters.
-void
-TAO_Basic_StreamCtrl::set_FPStatus (const AVStreams::flowSpec &the_spec,
- const char *fp_name,
- const CORBA::Any &fp_settings,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (the_spec);
- ACE_UNUSED_ARG (fp_name);
- ACE_UNUSED_ARG (fp_settings);
- ACE_UNUSED_ARG (env);
-}
-
-// @@ Need to throw not-supported exception here
-CORBA::Object_ptr
-TAO_Basic_StreamCtrl::get_flow_connection (const char *flow_name,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (flow_name);
- ACE_UNUSED_ARG (env);
- return 0;
-}
-
-// @@ Need to throw not-supported exception here
-void
-TAO_Basic_StreamCtrl::set_flow_connection (const char *flow_name,
- CORBA::Object_ptr flow_connection,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (flow_name);
- ACE_UNUSED_ARG (flow_connection);
- ACE_UNUSED_ARG (env);
-}
-
-// ----------------------------------------------------------------------
-// TAO_StreamCtrl
-// ----------------------------------------------------------------------
-
-TAO_StreamCtrl::TAO_StreamCtrl (CORBA::ORB_var orb)
- : TAO_Basic_StreamCtrl (orb)
-{
-}
-
-TAO_StreamCtrl::~TAO_StreamCtrl (void)
-{
-}
-
-// request the two MMDevices to create vdev and stream endpoints. save
-// the references returned.
-
-// The interaction diagram for this method is on page 13 of the spec
-CORBA::Boolean
-TAO_StreamCtrl::bind_devs (AVStreams::MMDevice_ptr a_party,
- AVStreams::MMDevice_ptr b_party,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env)
-{
- // Check to see if we have non-nil parties to bind!
- if (CORBA::is_nil (a_party) ||
- CORBA::is_nil (b_party))
- ACE_ERROR_RETURN ((LM_ERROR,
- "\n(%P|%t) TAO_StreamCtrl::bind_devs: "
- "a_party or b_party is null!\n"),
- 1);
-
- // Request a_party to create the endpoint and vdev
- CORBA::Boolean met_qos;
- CORBA::String_var named_vdev;
-
- this->stream_endpoint_a_ =
- a_party-> create_A (this->_this (env),
- this->vdev_a_.out (),
- the_qos,
- met_qos,
- named_vdev.inout (),
- the_flows,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_StreamCtrl::create_A: succeeded"));
-
- // Request b_party to create the endpoint and vdev
-
- this->stream_endpoint_b_ =
- b_party-> create_B (this->_this (env),
- this->vdev_b_.out (),
- the_qos,
- met_qos,
- named_vdev.inout (),
- the_flows,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_StreamCtrl::create_B: succeeded"));
-
- ACE_DEBUG ((LM_DEBUG,
- "\nstream_endpoint_b_ = %s",
- this->orb_->object_to_string (this->stream_endpoint_b_,
- env)));
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Tell the 2 VDev's about one another
- this->vdev_a_->set_peer (this->_this (env),
- this->vdev_b_.in (),
- the_qos,
- the_flows,
- env);
-
- TAO_CHECK_ENV_RETURN (env, 1);
-
- this->vdev_b_->set_peer (this->_this (env),
- this->vdev_a_.in (),
- the_qos,
- the_flows,
- env);
-
- TAO_CHECK_ENV_RETURN (env, 1);
-
-
- // Now connect the streams together. This will
- // establish the connection
- this->stream_endpoint_a_->connect (this->stream_endpoint_b_,
- the_qos,
- the_flows,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
- return 0;
-}
-
-// Used to establish a connection between two endpoints
-// directly, i.e. without a MMDevice
-CORBA::Boolean
-TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr a_party,
- AVStreams::StreamEndPoint_B_ptr b_party,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env)
-{
- if (CORBA::is_nil (a_party) ||
- CORBA::is_nil (b_party))
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) TAO_StreamCtrl::bind:"
- "a_party or b_party null!"),
- 1);
-
- this->stream_endpoint_a_ = a_party;
- this->stream_endpoint_b_ = b_party;
- // Now connect the streams together
- this->stream_endpoint_a_->connect (this->stream_endpoint_b_,
- the_qos,
- the_flows,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
- return 0;
-}
-
-void
-TAO_StreamCtrl::unbind (CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (env);
-}
-
-void
-TAO_StreamCtrl::unbind_party (AVStreams::StreamEndPoint_ptr the_ep,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (the_ep);
- ACE_UNUSED_ARG (the_spec);
- ACE_UNUSED_ARG (env);
-}
-
-// ----------------------------------------------------------------------
-// TAO_StreamEndPoint
-// ----------------------------------------------------------------------
-
-TAO_StreamEndPoint::TAO_StreamEndPoint (void)
-{
-}
-
-// Stop the physical flow of data on the stream
-// Empty the_spec --> apply to all flows
-void
-TAO_StreamEndPoint::stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- // Make the upcall into the app
- this->handle_stop (the_spec, env);
-}
-
-// Start the physical flow of data on the stream
-// Empty the_spec --> apply to all flows
-void
-TAO_StreamEndPoint::start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- // Make the upcall into the app
- this->handle_start (the_spec, env);
-}
-
-// Close the connection
-void
-TAO_StreamEndPoint::destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- // Make the upcall into the app
- this->handle_destroy (the_spec, env);
-}
-
-// Called by streamctrl, requesting us to call request_connection
-// on the responder (to initiate a connection)
-CORBA::Boolean
-TAO_StreamEndPoint::connect (AVStreams::StreamEndPoint_ptr responder,
- AVStreams::streamQoS &qos_spec,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) In TAO_StreamEndPoint::connect\n"));
- responder->request_connection (this->_this (env),
- 0,
- qos_spec,
- the_spec,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-}
-
-// Called by our peer endpoint, requesting us to establish
-// a connection
-CORBA::Boolean
-TAO_StreamEndPoint::request_connection (AVStreams::StreamEndPoint_ptr initiator,
- CORBA::Boolean is_mcast,
- AVStreams::streamQoS &qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) TAO_StreamEndPoint::request_connection called"));
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_StreamEndPoint::request_connection: "
- "flowspec has length = %d"
- "and the strings are:",
- the_spec.length ()));
- for (int i = 0; i < the_spec.length (); i++)
- ACE_DEBUG ((LM_DEBUG,
- the_spec [i]));
-
- return 0;
-}
-
-CORBA::Boolean
-TAO_StreamEndPoint::modify_QoS (AVStreams::streamQoS &new_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-CORBA::Boolean
-TAO_StreamEndPoint::set_protocol_restriction (const AVStreams::protocolSpec &the_pspec,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-void
-TAO_StreamEndPoint::disconnect (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_StreamEndPoint::set_FPStatus (const AVStreams::flowSpec &the_spec,
- const char *fp_name,
- const CORBA::Any &fp_settings,
- CORBA::Environment &env)
-{
-}
-
-CORBA::Object_ptr
-TAO_StreamEndPoint::get_fep (const char *flow_name,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-char *
-TAO_StreamEndPoint::add_fep (CORBA::Object_ptr the_fep,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-void
-TAO_StreamEndPoint::remove_fep (const char *fep_name,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_StreamEndPoint::set_negotiator (AVStreams::Negotiator_ptr new_negotiator,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_StreamEndPoint::set_key (const char *flow_name,
- const char *the_key,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_StreamEndPoint::set_source_id (CORBA::Long source_id,
- CORBA::Environment &env)
-{
-}
-
-TAO_StreamEndPoint::~TAO_StreamEndPoint (void)
-{
-}
-
-// ----------------------------------------------------------------------
-// TAO_Client_StreamEndPoint
-// ----------------------------------------------------------------------
-
-TAO_Client_StreamEndPoint::TAO_Client_StreamEndPoint (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_Client_StreamEndPoint::TAO_Client_StreamEndPoint: created"));
-}
-
-CORBA::Boolean
-TAO_Client_StreamEndPoint::connect (AVStreams::StreamEndPoint_ptr responder,
- AVStreams::streamQoS &qos_spec,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- // Use the base class implementation of connect
- TAO_StreamEndPoint::connect (responder,
- qos_spec,
- the_spec,
- env);
-
- // Make the upcall to the app
- return this->handle_connection_established (responder,
- qos_spec,
- the_spec,
- env);
-
-}
-
-
-CORBA::Boolean
-TAO_Client_StreamEndPoint::multiconnect (AVStreams::streamQoS &the_qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-CORBA::Boolean
-TAO_Client_StreamEndPoint::connect_leaf (AVStreams::StreamEndPoint_B_ptr the_ep,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-void
-TAO_Client_StreamEndPoint::disconnect_leaf (AVStreams::StreamEndPoint_B_ptr the_ep,
- const AVStreams::flowSpec &theSpec,
- CORBA::Environment &env)
-{
-}
-
-TAO_Client_StreamEndPoint::~TAO_Client_StreamEndPoint (void)
-{
-}
-
-// ----------------------------------------------------------------------
-// TAO_Server_StreamEndPoint
-// ----------------------------------------------------------------------
-
-TAO_Server_StreamEndPoint::TAO_Server_StreamEndPoint (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_Server_StreamEndPoint::TAO_Server_StreamEndPoint: created"));
-}
-
-CORBA::Boolean
-TAO_Server_StreamEndPoint::request_connection (AVStreams::StreamEndPoint_ptr initiator,
- CORBA::Boolean is_mcast,
- AVStreams::streamQoS &qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-
-{
- // Use the base class implementation of request_connection
- TAO_StreamEndPoint::request_connection (initiator,
- is_mcast,
- qos,
- the_spec,
- env);
-
- // Make the upcall to the app
- return this->handle_connection_requested (initiator,
- is_mcast,
- qos,
- the_spec,
- env);
-
-}
-CORBA::Boolean
-TAO_Server_StreamEndPoint::multiconnect (AVStreams::streamQoS &the_qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-TAO_Server_StreamEndPoint::~TAO_Server_StreamEndPoint (void)
-{
-}
-
-// ----------------------------------------------------------------------
-// TAO_VDev
-// ----------------------------------------------------------------------
-
-TAO_VDev::TAO_VDev (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_VDev::TAO_VDev: created"));
-}
-
-// StreamCtrl will call this to give us a reference to itself, and to
-// our peer vdev..
-CORBA::Boolean
-TAO_VDev::set_peer (AVStreams::StreamCtrl_ptr the_ctrl,
- AVStreams::VDev_ptr the_peer_dev,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) TAO_VDev::set_peer: called"));
- this->streamctrl_ = the_ctrl;
- this->peer_ = the_peer_dev;
- return 0;
-}
-
-CORBA::Boolean
-TAO_VDev::set_Mcast_peer (AVStreams::StreamCtrl_ptr the_ctrl,
- AVStreams::MCastConfigIf_ptr a_mcastconfigif,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-void
-TAO_VDev::configure (const CosPropertyService::Property &the_config_mesg,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_VDev::set_format (const char *flowName,
- const char *format_name,
- CORBA::Environment &env)
-{
-}
-
-void
-TAO_VDev::set_dev_params (const char *flowName,
- const CosPropertyService::Properties &new_params,
- CORBA::Environment &env)
-{
-}
-
-CORBA::Boolean
-TAO_VDev::modify_QoS (AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-TAO_VDev::~TAO_VDev (void)
-{
-}
-
-// ----------------------------------------------------------------------
-// TAO_MMDevice
-// ----------------------------------------------------------------------
-
-
-
-TAO_MMDevice::TAO_MMDevice ()
-{
-}
-
-// create a streamctrl which is colocated with me, use that streamctrl
-// to bind the peer_device with me.
-AVStreams::StreamCtrl_ptr
-TAO_MMDevice ::bind (AVStreams::MMDevice_ptr peer_device,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out is_met,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
-#if 0
- TAO_TRY
- {
- TAO_StreamCtrl *stream_ctrl = new TAO_StreamCtrl ();
- if (stream_ctrl == 0)
- return 0;
- stream_ctrl->bind_devs (peer_device,
- AVStreams::StreamCtrl::_duplicate
- (this->_this (TAO_TRY_ENV)),
- the_qos,
- the_spec,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- return stream_ctrl;
- }
- TAO_CATCH (CORBA::SystemException, sysex)
- {
- TAO_TRY_ENV.print_exception ("System Exception");
- return -1;
- }
- TAO_CATCH (CORBA::UserException, userex)
- {
- TAO_TRY_ENV.print_exception ("User Exception");
- return -1;
- }
- TAO_ENDTRY;
-#endif
- return 0;
-}
-
-AVStreams::StreamCtrl_ptr
-TAO_MMDevice::bind_mcast (AVStreams::MMDevice_ptr first_peer,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out is_met,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-void
-TAO_MMDevice::destroy (AVStreams::StreamEndPoint_ptr the_ep,
- const char *vdev_name,
- CORBA::Environment &env)
-{
-}
-
-// need to throw notsupported exception
-char *
-TAO_MMDevice::add_fdev (CORBA::Object_ptr the_fdev,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-// need to throw notsupported exception
-CORBA::Object_ptr
-TAO_MMDevice::get_fdev (const char *flow_name,
- CORBA::Environment &env)
-{
- return 0;
-}
-
-// need to throw notsupported exception
-void
-TAO_MMDevice::remove_fdev (const char *flow_name,
- CORBA::Environment &env)
-{
-}
-
-TAO_MMDevice::~TAO_MMDevice (void)
-{
-}
-
-template <class T>
-TAO_Client_MMDevice <T>::TAO_Client_MMDevice ()
-{
-}
-
-// We have been asked to create a new stream_endpoint and a vdev.
-template <class T>
-AVStreams::StreamEndPoint_A_ptr
-TAO_Client_MMDevice <T>::create_A (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_MMDevice::create_A: called"));
-
- TAO_VDev *vdev = new TAO_VDev;
- the_vdev = AVStreams::VDev::_duplicate (vdev->_this (env));
-
- TAO_Client_StreamEndPoint *stream_endpoint_a =
- new T;
- return AVStreams::StreamEndPoint_A::_duplicate
- (stream_endpoint_a->_this (env));
-}
-
-template <class T>
-AVStreams::StreamEndPoint_B_ptr
-TAO_Client_MMDevice <T>::create_B (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Cannot create a B device on the client side!\n"),
- 0);
-}
-
-template <class T>
-TAO_Server_MMDevice <T>::TAO_Server_MMDevice ()
-{
-}
-
-template <class T>
-AVStreams::StreamEndPoint_A_ptr
-TAO_Server_MMDevice <T>::create_A (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Cannot create a A device on the server side!\n"),
- 0);
-}
-
-// We have been asked to create a new stream_endpoint and a vdev.
-template <class T>
-AVStreams::StreamEndPoint_B_ptr
-TAO_Server_MMDevice <T>::create_B (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env)
-{
- ACE_DEBUG ((LM_DEBUG,
- "\n(%P|%t) TAO_MMDevice::create_B: called"));
-
- TAO_VDev *vdev = new TAO_VDev;
- the_vdev = AVStreams::VDev::_duplicate (vdev->_this (env));
-
- TAO_Server_StreamEndPoint *stream_endpoint_b =
- new T;
- return AVStreams::StreamEndPoint_B::_duplicate
- (stream_endpoint_b->_this (env));
-}
-
diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h
deleted file mode 100644
index 4654abbdc43..00000000000
--- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h
+++ /dev/null
@@ -1,495 +0,0 @@
-/* -*- C++ -*- */
-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// cos
-//
-// = FILENAME
-// AVStreams_i.h
-//
-// = AUTHOR
-// Sumedh Mungee <sumedh@cs.wustl.edu>
-//
-//
-// ============================================================================
-
-#if !defined (AVSTREAMS_I_H)
-#define AVSTREAMS_I_H
-
-#include "orbsvcs/orbsvcs_export.h"
-#include "orbsvcs/AVStreamsS.h"
-
-class TAO_ORBSVCS_Export TAO_Basic_StreamCtrl
- : public virtual POA_AVStreams::Basic_StreamCtrl
-// = DESCRIPTION
-// Base class for StreamCtrl, implements basic stream start
-// and stop functionality
-{
- public:
- TAO_Basic_StreamCtrl (CORBA::ORB_var orb);
- // Constructor
-
- virtual void stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Stop the transfer of data of the stream
- // Empty the_spec means apply operation to all flows
-
-
- virtual void start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Start the transfer of data in the stream.
- // Empty the_spec means apply operation to all flows
-
- virtual void destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Tears down the stream. This will close the connection, and delete
- // the streamendpoint and vdev associated with this stream
- // Empty the_spec means apply operation to all flows
-
- virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &new_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Changes the QoS associated with the stream
- // Empty the_spec means apply operation to all flows
-
- virtual void push_event (const char *the_event,
- CORBA::Environment &env);
- // Used by StreamEndPoint and VDev to inform StreamCtrl of events.
- // E.g., loss of flow, reestablishment of flow, etc..
-
- virtual void set_FPStatus (const AVStreams::flowSpec &the_spec,
- const char *fp_name,
- const CORBA::Any &fp_settings,
- CORBA::Environment &env);
- // Used to control the flow protocol parameters.
-
- virtual CORBA::Object_ptr get_flow_connection (const char *flow_name,
- CORBA::Environment &env);
- // Not implemented in the light profile, will raise the notsupported
- // exception
-
- virtual void set_flow_connection (const char *flow_name,
- CORBA::Object_ptr flow_connection,
- CORBA::Environment &env);
- // Not implemented in the light profile, will raise the notsupported
- // exception
-
- virtual ~TAO_Basic_StreamCtrl (void);
- // Destructor
-
- protected:
- CORBA::ORB_var orb_;
- // ORB reference
-
- AVStreams::VDev_var vdev_a_;
- AVStreams::VDev_var vdev_b_;
- // The Virtual Devices for this stream
-
- AVStreams::StreamEndPoint_A_var stream_endpoint_a_;
- AVStreams::StreamEndPoint_B_var stream_endpoint_b_;
- // The Endpoints for this stream
-};
-
-class TAO_ORBSVCS_Export TAO_StreamCtrl
- : public virtual POA_AVStreams::StreamCtrl,
- public virtual TAO_Basic_StreamCtrl
-// = DESCRIPTION
-// Implementation the A/V StreamCtrl class. this class
-// is used to control the stream. It should be subclassed
-// by applications that want to provide more control features.
-{
-public:
- TAO_StreamCtrl (CORBA::ORB_var orb);
- // Constructor
-
- virtual CORBA::Boolean bind_devs (AVStreams::MMDevice_ptr a_party,
- AVStreams::MMDevice_ptr b_party,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env);
- // Establish a stream between a_party and b_party,
- // with qos the_qos, and for the flows in the_flows
- // if the_flows is empty, bind all the flows
- // Causes a connection to be established between the StreamEndpoints.
- // Returns success/failure
-
- virtual CORBA::Boolean bind (AVStreams::StreamEndPoint_A_ptr a_party,
- AVStreams::StreamEndPoint_B_ptr b_party,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env);
- // Establish a connection between two streamendpoints. This can
- // be used if the streamendpoints have been created independent of
- // a MMDevice
-
- virtual void unbind_party (AVStreams::StreamEndPoint_ptr the_ep,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Unbind the_ep from the stream. Empty the_spec means apply to all flows.
-
- virtual void unbind (CORBA::Environment &env);
- // unbind the stream. Same effect as Basic_StreamCtrl::destroy ()
-
- virtual ~TAO_StreamCtrl (void);
- // Destructor
-
-};
-
-
-class TAO_ORBSVCS_Export TAO_Base_StreamEndPoint
-// = DESCRIPTION
-// Base class for the A/V StreamEndPoint class. this class
-// is used to control the stream. It should be subclassed
-// by applications that want to provide more control features.
-{
-
-public:
-
- virtual void handle_stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env) = 0;
- // Application needs to define this
-
- virtual void handle_start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env) = 0;
- // Application needs to define this
-
-
- virtual void handle_destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env) = 0;
- // Application needs to define this
-};
-
-class TAO_ORBSVCS_Export TAO_Client_Base_StreamEndPoint
- : public virtual TAO_Base_StreamEndPoint
-{
-public:
- virtual CORBA::Boolean handle_connection_established (AVStreams::StreamEndPoint_ptr responder,
- AVStreams::streamQoS &qos_spec,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env) = 0;
- // Application needs to define this
-};
-
-class TAO_ORBSVCS_Export TAO_Server_Base_StreamEndPoint
- : public virtual TAO_Base_StreamEndPoint
-{
-public:
- virtual CORBA::Boolean handle_connection_requested (AVStreams::StreamEndPoint_ptr initiator,
- CORBA::Boolean is_mcast,
- AVStreams::streamQoS &qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env) = 0;
- // Application needs to define this
-};
-
-class TAO_ORBSVCS_Export TAO_StreamEndPoint
- : public virtual POA_AVStreams::StreamEndPoint, // The POA class
- public virtual TAO_Base_StreamEndPoint
-{
- // = DESCRIPTION
- // The Stream EndPoint. Used to implement one endpoint of a stream
- // that implements the transport layer.
-public:
- TAO_StreamEndPoint (void);
- // Constructor
-
- virtual void stop (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Stop the stream. Empty the_spec means, for all the flows
-
- virtual void start (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Start the stream, Empty the_spec means, for all the flows
-
- virtual void destroy (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Destroy the stream, Empty the_spec means, for all the flows
-
-
- virtual CORBA::Boolean connect (AVStreams::StreamEndPoint_ptr responder,
- AVStreams::streamQoS &qos_spec,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by StreamCtrl. responder is the peer to connect to
-
- virtual CORBA::Boolean request_connection (AVStreams::StreamEndPoint_ptr initiator,
- CORBA::Boolean is_mcast,
- AVStreams::streamQoS &qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by the peer StreamEndPoint. The flow_spec indicates the
- // flows (which contain transport addresses etc.)
-
- virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &new_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env);
- // Change the transport qos on a stream
-
- virtual CORBA::Boolean set_protocol_restriction (const AVStreams::protocolSpec &the_pspec,
- CORBA::Environment &env);
- // Used to restrict the set of protocols
-
- virtual void disconnect (const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // disconnect the flows
-
- virtual void set_FPStatus (const AVStreams::flowSpec &the_spec,
- const char *fp_name,
- const CORBA::Any &fp_settings,
- CORBA::Environment &env);
- // Used to control the flow
-
- virtual CORBA::Object_ptr get_fep (const char *flow_name,
- CORBA::Environment &env);
- // Not implemented in the light profile, throws notsupported
-
- virtual char * add_fep (CORBA::Object_ptr the_fep,
- CORBA::Environment &env);
- // Not implemented in the light profile, throws notsupported
-
- virtual void remove_fep (const char *fep_name,
- CORBA::Environment &env);
- // Not implemented in the light profile, throws notsupported
-
- virtual void set_negotiator (AVStreams::Negotiator_ptr new_negotiator,
- CORBA::Environment &env);
- // Used to "attach" a negotiator to the endpoint
-
- virtual void set_key (const char *flow_name,
- const char *the_key,
- CORBA::Environment &env);
- // Used for public key encryption.
-
- virtual void set_source_id (CORBA::Long source_id,
- CORBA::Environment &env);
- // Used to set a unique id for packets sent by this streamendpoint
-
- virtual ~TAO_StreamEndPoint (void);
- // Destructor
-
-};
-
-class TAO_ORBSVCS_Export TAO_Client_StreamEndPoint :
- public virtual POA_AVStreams::StreamEndPoint_A,
- public virtual TAO_StreamEndPoint,
- public virtual TAO_Client_Base_StreamEndPoint
-{
- // = DESCRIPTION
- // The "A" side of a streamendpoint
-public:
- TAO_Client_StreamEndPoint (void);
- // Constructor
-
- virtual CORBA::Boolean connect (AVStreams::StreamEndPoint_ptr responder,
- AVStreams::streamQoS &qos_spec,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by StreamCtrl. responder is the peer to connect to
-
- virtual CORBA::Boolean multiconnect (AVStreams::streamQoS &the_qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Used for ATM-style multicast
-
- virtual CORBA::Boolean connect_leaf (AVStreams::StreamEndPoint_B_ptr the_ep,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_flows,
- CORBA::Environment &env);
- // Used for ATM-style multicast
-
- virtual void disconnect_leaf (AVStreams::StreamEndPoint_B_ptr the_ep,
- const AVStreams::flowSpec &theSpec,
- CORBA::Environment &env);
- // Used to remove a multicast leaf
-
- virtual ~TAO_Client_StreamEndPoint (void);
- // Destructor
-
-};
-
-class TAO_ORBSVCS_Export TAO_Server_StreamEndPoint :
- public virtual POA_AVStreams::StreamEndPoint_B,
- public virtual TAO_StreamEndPoint,
- public virtual TAO_Server_Base_StreamEndPoint // Abstract interface
-{
- // = DESCRIPTION
- // The "B" side of a streamendpoint
-public:
- TAO_Server_StreamEndPoint (void);
- // Constructor
-
- virtual CORBA::Boolean request_connection (AVStreams::StreamEndPoint_ptr initiator,
- CORBA::Boolean is_mcast,
- AVStreams::streamQoS &qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by the peer StreamEndPoint. The flow_spec indicates the
- // flows (which contain transport addresses etc.)
-
- virtual CORBA::Boolean multiconnect (AVStreams::streamQoS &the_qos,
- AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Used for internet-style multicast
-
- virtual ~TAO_Server_StreamEndPoint (void);
- // Destructor
-};
-
-class TAO_ORBSVCS_Export TAO_VDev
- : public virtual POA_AVStreams::VDev
-// = DESCRIPTION
-// Implements the VDev interface. One of these is created per connection,
-// and represents device-specific parameters
-{
- public:
- TAO_VDev (void);
- // Constructor
-
- virtual CORBA::Boolean set_peer (AVStreams::StreamCtrl_ptr the_ctrl,
- AVStreams::VDev_ptr the_peer_dev,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called to tell the vdev who the streamctrl, peer vdev is
-
- virtual CORBA::Boolean set_Mcast_peer (AVStreams::StreamCtrl_ptr the_ctrl,
- AVStreams::MCastConfigIf_ptr a_mcastconfigif,
- AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Used to set the streamctrl and multicast device
-
- virtual void configure (const CosPropertyService::Property &the_config_mesg,
- CORBA::Environment &env);
- // Called by the peer VDev to configure the device (catch all)
-
- virtual void set_format (const char *flowName,
- const char *format_name,
- CORBA::Environment &env);
- // Used to set a format on a flowname
-
- virtual void set_dev_params (const char *flowName,
- const CosPropertyService::Properties &new_params,
- CORBA::Environment &env);
- // Used to set device parameters
-
- virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &the_qos,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called to change QoS of the device
-
- virtual ~TAO_VDev (void);
- // Destructor
-
- private:
- AVStreams::StreamCtrl_var streamctrl_;
- // My stream controller
-
- AVStreams::VDev_var peer_;
- // My peer
-};
-
-class TAO_ORBSVCS_Export TAO_MMDevice
- : public virtual POA_AVStreams::MMDevice
-// = DESCRIPTION
-// Implements a factory to create Endpoints and VDevs
-{
- protected:
- TAO_MMDevice (void);
- // Constructor
-
- public:
-
- virtual AVStreams::StreamCtrl_ptr bind (AVStreams::MMDevice_ptr peer_device,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out is_met,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Can be used to request the MMDevice to create a new StreamCtrl,
- // and call bind_devs on it
-
- virtual AVStreams::StreamCtrl_ptr bind_mcast (AVStreams::MMDevice_ptr first_peer,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out is_met,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Multicast bind
-
- virtual void destroy (AVStreams::StreamEndPoint_ptr the_ep,
- const char *vdev_name,
- CORBA::Environment &env);
- // Remove the StreamEndPoint and the related vdev
-
- virtual char * add_fdev (CORBA::Object_ptr the_fdev,
- CORBA::Environment &env);
- // Not supported in the light profile, raises notsupported
-
- virtual CORBA::Object_ptr get_fdev (const char *flow_name,
- CORBA::Environment &env);
- // Not supported in the light profile, raises notsupported
-
- virtual void remove_fdev (const char *flow_name,
- CORBA::Environment &env);
- // Not supported in the light profile, raises notsupported
-
- virtual ~TAO_MMDevice (void);
- // Destructor
-};
-
-template<class T>
-class TAO_ORBSVCS_Export TAO_Client_MMDevice
- : public virtual TAO_MMDevice
-{
-public:
- TAO_Client_MMDevice ();
- // Constructor
-
- virtual AVStreams::StreamEndPoint_A_ptr create_A (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by StreamCtrl to create a "A" type streamandpoint and vdev
-
- virtual AVStreams::StreamEndPoint_B_ptr create_B (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by StreamCtrl to create a "B" type streamandpoint and vdev
-};
-
-template<class T>
-class TAO_ORBSVCS_Export TAO_Server_MMDevice
- : public virtual TAO_MMDevice
-{
-public:
- TAO_Server_MMDevice ();
-
- virtual AVStreams::StreamEndPoint_A_ptr create_A (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by StreamCtrl to create a "A" type streamandpoint and vdev
-
- virtual AVStreams::StreamEndPoint_B_ptr create_B (AVStreams::StreamCtrl_ptr the_requester,
- AVStreams::VDev_out the_vdev,
- AVStreams::streamQoS &the_qos,
- CORBA::Boolean_out met_qos,
- char *&named_vdev,
- const AVStreams::flowSpec &the_spec,
- CORBA::Environment &env);
- // Called by StreamCtrl to create a "B" type streamandpoint and vdev
-
-};
-#endif /* AVSTREAMS_I_H */
diff --git a/TAO/orbsvcs/orbsvcs/AV/sfp.cpp b/TAO/orbsvcs/orbsvcs/AV/sfp.cpp
deleted file mode 100644
index a069f1dc01d..00000000000
--- a/TAO/orbsvcs/orbsvcs/AV/sfp.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-#include "orbsvcs/AV/sfp.h"
-#include "ace/ARGV.h"
-
-// $Id$
-
-// constructor.
-SFP_Encoder::SFP_Encoder ()
- : orb_ (0),
- encoder_ (0)
-{
- // We need to initialize the ORB!
-
- TAO_TRY
- {
- ACE_ARGV orb_args (TAO_SFP_ORB_ARGUMENTS);
- int argc = orb_args.argc ();
- this->orb_ = CORBA::ORB_init (argc,
- orb_args.argv (),
- 0,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("SFP_Encoder::ORB_init");
- return;
- }
- TAO_ENDTRY;
- ACE_NEW (encoder_,
- CDR ());
-
-}
-
-ACE_Message_Block *
-SFP_Encoder::encode_start_message ()
-{
- TAO_TRY
- {
- // construct the start message
- SFP::start_message start;
-
- // copy the magic number into the message
- start.magic_number = 4;
-
- // put the version number into the field
- start.major_version = TAO_SFP_MAJOR_VERSION;
- start.minor_version = TAO_SFP_MINOR_VERSION;
-
- // flags field is all zeroes
- start.flags = 0;
-
- // encode the start frame
- if (encoder_->encode (SFP::_tc_start_message,
- &start,
- 0,
- TAO_TRY_ENV)
- == CORBA_TypeCode::TRAVERSE_CONTINUE)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) encode of start message succeeded:"
- "length == %d\n",
- encoder_->length ()));
-
- }
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("SFP_Source_Endpoint::"
- "start_message");
- return 0;
- }
- TAO_ENDTRY;
-
- // put the cdr encoded buffer into the message block
- ACE_Message_Block *message;
-
- ACE_NEW_RETURN (message,
- ACE_Message_Block (encoder_->length ()),
- 0);
-
- if (message->copy ((char *) encoder_->buffer (),
- encoder_->length ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "SFP_Encoder: Could not copy"
- " start message into ACE_Message_Block"),
- 0);
-
- message->length (encoder_->length ());
- cerr << message->length ();
-
- return message;
-
-}
-
-ACE_Message_Block *
-SFP_Encoder::encode_simple_frame (ACE_Message_Block *data)
-{
- TAO_TRY
- {
- // construct the frame header
- SFP::frame_header frame_header;
- // copy the magic number into the message
- frame_header.magic_number.length (4);
- for (int i = 0; i < 4; i++)
- frame_header.magic_number [i] = TAO_SFP_MAGIC_NUMBER [i];
-
- // flags field is all zeroes
- frame_header.flags = 0;
-
- // put the message type
- frame_header.message_type = 2;
-
- // size
- frame_header.message_size = data->length ();
-
- // encode the frame
- if (encoder_->encode (SFP::_tc_frame_header,
- &frame_header,
- 0,
- TAO_TRY_ENV)
- == CORBA_TypeCode::TRAVERSE_CONTINUE)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) encode of simple frame succeeded:"
- "length == %d\n",
- encoder_->length ()));
-
- }
- TAO_CHECK_ENV;
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("SFP_Encoder::"
- "start_message");
- return 0;
- }
- TAO_ENDTRY;
-
- // put the cdr encoded buffer into the message block
- ACE_Message_Block *message;
-
- ACE_NEW_RETURN (message,
- ACE_Message_Block (encoder_->length ()),
- 0);
-
- if (message->copy ((char *) encoder_->buffer (),
- (size_t) encoder_->length ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "SFP_Encoder: Could not copy"
- " header for simpleframe into "
- "ACE_Message_Block"),
- 0);
-
- // set the next pointer to point to the data
- message->next (data);
-
- return message;
-}
-
-SFP_Encoder::~SFP_Encoder ()
-{
-
-}
-
-SFP_Decoder::SFP_Decoder ()
-{
- ACE_NEW (decoder_,
- CDR ());
-
-}
-
-int
-SFP_Decoder::decode_start_message (ACE_Message_Block *message)
-{
-
- SFP::start_message start;
-
- TAO_TRY
- {
- decoder_->setup_encapsulation (message->rd_ptr (),
- message->length ());
-
- decoder_->decode (SFP::_tc_start_message,
- &start,
- 0,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("SFP_Decoder::"
- "decode_start_message");
- return -1;
- }
- TAO_ENDTRY;
-
- ACE_DEBUG ((LM_DEBUG,
- "Decoded start message,"
- "version number == %d . %d\n",
- start.major_version,
- start.minor_version));
-
- return 0;
-}
-
-SFP_Decoder::~SFP_Decoder ()
-{
-
-}
diff --git a/TAO/orbsvcs/orbsvcs/AV/sfp.h b/TAO/orbsvcs/orbsvcs/AV/sfp.h
deleted file mode 100644
index edc5073736f..00000000000
--- a/TAO/orbsvcs/orbsvcs/AV/sfp.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#if !defined (TAO_AV_SFP_H)
-#define TAO_AV_SFP_H
-
-#include "ace/SOCK_CODgram.h"
-#include "orbsvcs/sfpC.h"
-
-// default arguments to pass to use for the ORB
-const char *TAO_SFP_ORB_ARGUMENTS = "-ORBobjrefstyle URL";
-
-// SFP magic numbers
-const char *TAO_SFP_MAGIC_NUMBER = "=SFP";
-const char *TAO_SFP_FRAGMENT_MAGIC_NUMBER = "FRAG";
-const char *TAO_SFP_START_MAGIC_NUMBER = "=STA";
-
-// SFP version 1.0
-const unsigned char TAO_SFP_MAJOR_VERSION = 1;
-const unsigned char TAO_SFP_MINOR_VERSION = 0;
-
-class SFP_Encoder
-// = DESCRIPTION
-// Encodes frames for the SFP protocol
-// This class uses the CDR encoding format internally.
-{
- public:
- SFP_Encoder ();
- // Default Constructor
-
- ACE_Message_Block *encode_start_message ();
- // returns a SFP start message. it is the users responsibility
- // to delete this message block after using it.
-
- ACE_Message_Block *encode_simple_frame (ACE_Message_Block *data);
- // Encodes the message_block in an SFP frame
-
- // ACE_Message_Block *encode_stop_message ();
- // returns a SFP start message. it is the users responsibility to
- // delete this message block after using it.
-
- ~SFP_Encoder ();
-
- private:
-
- CDR *encoder_;
- // Use the TAO CDR encoder to encode everything
-
- CORBA::ORB_var orb_;
- // Need the ORB to initialize the CDR encoder
-};
-
-class SFP_Decoder
-{
-public:
- SFP_Decoder ();
- // Default constructor
-
- int decode_start_message (ACE_Message_Block *message);
- // returns 0 if the message is a valid SFP start message
- // returns -1 otherwise.
-
- SFP::message_type decode_frame (ACE_Message_Block *message);
- // decodes the message and returns the data in the message.
- // Returns the message type.
-
- int decode_stop_message (ACE_Message_Block *message);
- // returns 0 if the message is a valid SFP start message
- // returns -1 otherwise.
-
- ~SFP_Decoder ();
-
-private:
- CDR *decoder_;
- // Use the TAO CDR encoder to encode everything
-
- CORBA::ORB_var orb_;
- // Need the ORB to initialize the CDR encoder
-};
-
-#endif /* !defined (TAO_SFP_H) */