diff options
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams')
64 files changed, 1640 insertions, 1642 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/Connection_Manager.cpp b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/Connection_Manager.cpp index 8f0e3c8c523..2e4d40d71d6 100644 --- a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/Connection_Manager.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/Connection_Manager.cpp @@ -24,8 +24,8 @@ Connection_Manager::init (CORBA::ORB_ptr orb) void Connection_Manager::bind_to_receivers (const ACE_CString &sender_name, - AVStreams::MMDevice_ptr sender, - CORBA::Environment &ACE_TRY_ENV) + AVStreams::MMDevice_ptr sender + TAO_ENV_ARG_DECL) { this->sender_name_ = sender_name; @@ -43,8 +43,8 @@ Connection_Manager::bind_to_receivers (const ACE_CString &sender_name, CORBA::string_dup (this->sender_name_.c_str ()); this->sender_context_ = - this->naming_client_->bind_new_context (name, - ACE_TRY_ENV); + this->naming_client_->bind_new_context (name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // @@ -58,8 +58,8 @@ Connection_Manager::bind_to_receivers (const ACE_CString &sender_name, // Try binding the receivers context under the sender context. this->receiver_context_ = - this->sender_context_->bind_new_context (name, - ACE_TRY_ENV); + this->sender_context_->bind_new_context (name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCH (CosNaming::NamingContext::AlreadyBound, al_ex) @@ -74,8 +74,8 @@ Connection_Manager::bind_to_receivers (const ACE_CString &sender_name, CORBA::string_dup (this->sender_name_.c_str ()); CORBA::Object_var object = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK; this->sender_context_ = @@ -86,14 +86,14 @@ Connection_Manager::bind_to_receivers (const ACE_CString &sender_name, CORBA::string_dup ("Receivers"); object = - this->sender_context_->resolve (name, - ACE_TRY_ENV); + this->sender_context_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK; this->receiver_context_ = CosNaming::NamingContext::_narrow (object.in ()); - this->find_receivers (ACE_TRY_ENV); + this->find_receivers (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } ACE_ENDTRY; @@ -104,13 +104,13 @@ Connection_Manager::bind_to_receivers (const ACE_CString &sender_name, // Register the sender object with the sender context. this->sender_context_->rebind (name, - sender, - ACE_TRY_ENV); + sender + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void -Connection_Manager::find_receivers (CORBA::Environment &ACE_TRY_ENV) +Connection_Manager::find_receivers (TAO_ENV_SINGLE_ARG_DECL) { CosNaming::BindingIterator_var iterator; CosNaming::BindingList_var binding_list; @@ -119,13 +119,13 @@ Connection_Manager::find_receivers (CORBA::Environment &ACE_TRY_ENV) // Get the list of receivers registered for this sender. this->receiver_context_->list (chunk, binding_list, - iterator, - ACE_TRY_ENV); + iterator + TAO_ENV_ARG_PARAMETER); ACE_CHECK; // Add the receivers found in the bindinglist to the <receivers>. - this->add_to_receivers (binding_list, - ACE_TRY_ENV); + this->add_to_receivers (binding_list + TAO_ENV_ARG_PARAMETER); ACE_CHECK; if (!CORBA::is_nil (iterator.in ())) @@ -136,20 +136,20 @@ Connection_Manager::find_receivers (CORBA::Environment &ACE_TRY_ENV) while (more) { more = iterator->next_n (chunk, - binding_list, - ACE_TRY_ENV); + binding_list + TAO_ENV_ARG_PARAMETER); ACE_CHECK; - this->add_to_receivers (binding_list, - ACE_TRY_ENV); + this->add_to_receivers (binding_list + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } } } void -Connection_Manager::add_to_receivers (CosNaming::BindingList &binding_list, - CORBA::Environment& ACE_TRY_ENV) +Connection_Manager::add_to_receivers (CosNaming::BindingList &binding_list + TAO_ENV_ARG_DECL) { for (CORBA::ULong i = 0; i < binding_list.length (); @@ -167,8 +167,8 @@ Connection_Manager::add_to_receivers (CosNaming::BindingList &binding_list, // Resolve the reference of the receiver from the receiver // context. CORBA::Object_var obj = - this->receiver_context_->resolve (name, - ACE_TRY_ENV); + this->receiver_context_->resolve (name + TAO_ENV_ARG_PARAMETER); AVStreams::MMDevice_var receiver_device = AVStreams::MMDevice::_narrow (obj.in ()); @@ -184,7 +184,7 @@ Connection_Manager::add_to_receivers (CosNaming::BindingList &binding_list, } void -Connection_Manager::connect_to_receivers (CORBA::Environment &ACE_TRY_ENV) +Connection_Manager::connect_to_receivers (TAO_ENV_SINGLE_ARG_DECL) { // Connect to all receivers that we know about. for (Receivers::iterator iterator = this->receivers_.begin (); @@ -223,7 +223,7 @@ Connection_Manager::connect_to_receivers (CORBA::Environment &ACE_TRY_ENV) // Register streamctrl. AVStreams::StreamCtrl_var streamctrl_object = - streamctrl->_this (ACE_TRY_ENV); + streamctrl->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Bind the flowname and the corresponding stream controller to @@ -235,8 +235,8 @@ Connection_Manager::connect_to_receivers (CORBA::Environment &ACE_TRY_ENV) (void) streamctrl->bind_devs (this->sender_.in (), (*iterator).int_id_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } } @@ -244,8 +244,8 @@ Connection_Manager::connect_to_receivers (CORBA::Environment &ACE_TRY_ENV) void Connection_Manager::bind_to_sender (const ACE_CString &sender_name, const ACE_CString &receiver_name, - AVStreams::MMDevice_ptr receiver, - CORBA::Environment &ACE_TRY_ENV) + AVStreams::MMDevice_ptr receiver + TAO_ENV_ARG_DECL) { this->sender_name_ = sender_name; @@ -268,8 +268,8 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, CORBA::string_dup (this->sender_name_.c_str ()); CORBA::Object_var object = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // @@ -286,8 +286,8 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, // Find the receivers context under the sender's context object = - this->sender_context_->resolve (name, - ACE_TRY_ENV); + this->sender_context_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK; this->receiver_context_ = @@ -300,8 +300,8 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, // Create the sender context this->sender_context_ = - this->naming_client_->bind_new_context (name, - ACE_TRY_ENV); + this->naming_client_->bind_new_context (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK; name [0].id = @@ -309,8 +309,8 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, // Create the receivers context under the sender's context this->receiver_context_ = - this->sender_context_->bind_new_context (name, - ACE_TRY_ENV); + this->sender_context_->bind_new_context (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } ACE_ENDTRY; @@ -325,8 +325,8 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, // Register this receiver object under the receiver context. this->receiver_context_->rebind (name, - receiver, - ACE_TRY_ENV); + receiver + TAO_ENV_ARG_PARAMETER); ACE_CHECK; // @@ -342,12 +342,12 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, CORBA::string_dup (this->sender_name_.c_str ()); CORBA::Object_var object = - this->sender_context_->resolve (name, - ACE_TRY_ENV); + this->sender_context_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX(SENDER_CONTEXT_EXISTS); this->sender_ = - AVStreams::MMDevice::_narrow (object.in (), ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (object.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX(SENDER_CONTEXT_EXISTS); } ACE_CATCH (CosNaming::NamingContext::NotFound, al_ex) @@ -360,7 +360,7 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, } void -Connection_Manager::connect_to_sender (CORBA::Environment &ACE_TRY_ENV) +Connection_Manager::connect_to_sender (TAO_ENV_SINGLE_ARG_DECL) { if (CORBA::is_nil (this->sender_.in ())) return; @@ -396,7 +396,7 @@ Connection_Manager::connect_to_sender (CORBA::Environment &ACE_TRY_ENV) // Register streamctrl. AVStreams::StreamCtrl_var streamctrl_object = - streamctrl->_this (ACE_TRY_ENV); + streamctrl->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // @@ -414,8 +414,8 @@ Connection_Manager::connect_to_sender (CORBA::Environment &ACE_TRY_ENV) streamctrl->bind_devs (this->sender_.in (), this->receiver_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK; if (result == 0) @@ -424,20 +424,20 @@ Connection_Manager::connect_to_sender (CORBA::Environment &ACE_TRY_ENV) // Start the data sending. AVStreams::flowSpec start_spec; - streamctrl->start (start_spec, - ACE_TRY_ENV); + streamctrl->start (start_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void Connection_Manager::add_streamctrl (const ACE_CString &flowname, - TAO_StreamEndPoint *endpoint, - CORBA::Environment &ACE_TRY_ENV) + TAO_StreamEndPoint *endpoint + TAO_ENV_ARG_DECL) { // Get the stream controller for this endpoint. CORBA::Any_ptr streamctrl_any = - endpoint->get_property_value ("Related_StreamCtrl", - ACE_TRY_ENV); + endpoint->get_property_value ("Related_StreamCtrl" + TAO_ENV_ARG_PARAMETER); ACE_CHECK; AVStreams::StreamCtrl_ptr streamctrl; @@ -449,7 +449,7 @@ Connection_Manager::add_streamctrl (const ACE_CString &flowname, } void -Connection_Manager::destroy (CORBA::Environment &ACE_TRY_ENV) +Connection_Manager::destroy (TAO_ENV_SINGLE_ARG_DECL) { AVStreams::flowSpec stop_spec; @@ -458,15 +458,15 @@ Connection_Manager::destroy (CORBA::Environment &ACE_TRY_ENV) iterator != this->streamctrls_.end (); ++iterator) { - (*iterator).int_id_->destroy (stop_spec, - ACE_TRY_ENV); + (*iterator).int_id_->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } } void -Connection_Manager::destroy (const ACE_CString &flowname, - CORBA::Environment &ACE_TRY_ENV) +Connection_Manager::destroy (const ACE_CString &flowname + TAO_ENV_ARG_DECL) { this->protocol_objects_.unbind (flowname); this->receivers_.unbind (flowname); @@ -476,8 +476,8 @@ Connection_Manager::destroy (const ACE_CString &flowname, streamctrl); AVStreams::flowSpec stop_spec; - streamctrl->destroy (stop_spec, - ACE_TRY_ENV); + streamctrl->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } diff --git a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/Connection_Manager.h b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/Connection_Manager.h index c121456931a..6db0ebd24bb 100644 --- a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/Connection_Manager.h +++ b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/Connection_Manager.h @@ -44,33 +44,33 @@ public: // Initialize this class. void bind_to_receivers (const ACE_CString &sender_name, - AVStreams::MMDevice_ptr sender, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + AVStreams::MMDevice_ptr sender + TAO_ENV_ARG_DECL_WITH_DEFAULTS); // Method that binds the sender to the Naming Service and retreives // the references of any registered receivers. - void connect_to_receivers (CORBA::Environment& ACE_TRY_ENV = TAO_default_environment ()); + void connect_to_receivers (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); // Connect to the receivers that we found. void bind_to_sender (const ACE_CString &sender_name, const ACE_CString &receiver_name, - AVStreams::MMDevice_ptr receiver, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + AVStreams::MMDevice_ptr receiver + TAO_ENV_ARG_DECL_WITH_DEFAULTS); // Bind receiver to the sender. - void connect_to_sender (CORBA::Environment& ACE_TRY_ENV = TAO_default_environment ()); + void connect_to_sender (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); // Connect to the sender that we found. - void destroy (CORBA::Environment & = TAO_default_environment ()); + void destroy (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); // Destroy all streams. - void destroy (const ACE_CString &flowname, - CORBA::Environment & = TAO_default_environment ()); + void destroy (const ACE_CString &flowname + TAO_ENV_ARG_DECL_WITH_DEFAULTS); // Destroy streams associated with <flowname>. void add_streamctrl (const ACE_CString &flowname, - TAO_StreamEndPoint *endpoint, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + TAO_StreamEndPoint *endpoint + TAO_ENV_ARG_DECL_WITH_DEFAULTS); // Add new streamctrl. // Map of receivers. @@ -98,10 +98,10 @@ public: protected: - void find_receivers (CORBA::Environment &ACE_TRY_ENV); + void find_receivers (TAO_ENV_SINGLE_ARG_DECL); - void add_to_receivers (CosNaming::BindingList &binding_list, - CORBA::Environment& ACE_TRY_ENV); + void add_to_receivers (CosNaming::BindingList &binding_list + TAO_ENV_ARG_DECL); TAO_Naming_Client naming_client_; // The Naming Service client. diff --git a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/distributer.cpp b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/distributer.cpp index d24a84b2951..4a9892f4428 100644 --- a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/distributer.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/distributer.cpp @@ -90,7 +90,7 @@ Distributer_Receiver_Callback::handle_destroy (void) ACE_DEBUG ((LM_DEBUG, "Distributer_Callback::end_stream\n")); - DISTRIBUTER::instance ()->connection_manager ().destroy (ACE_TRY_ENV); + DISTRIBUTER::instance ()->connection_manager ().destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // We can close down now. @@ -153,8 +153,8 @@ Distributer::parse_args (int argc, int Distributer::init (int argc, - char ** argv, - CORBA::Environment &ACE_TRY_ENV) + char ** argv + TAO_ENV_ARG_DECL) { // Initialize the connection class. int result = @@ -191,7 +191,7 @@ Distributer::init (int argc, this->distributer_sender_mmdevice_; AVStreams::MMDevice_var distributer_sender_mmdevice = - this->distributer_sender_mmdevice_->_this (ACE_TRY_ENV); + this->distributer_sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->distributer_receiver_mmdevice_, @@ -203,28 +203,28 @@ Distributer::init (int argc, this->distributer_receiver_mmdevice_; AVStreams::MMDevice_var distributer_receiver_mmdevice = - this->distributer_receiver_mmdevice_->_this (ACE_TRY_ENV); + this->distributer_receiver_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Bind to receivers. this->connection_manager_.bind_to_receivers (this->distributer_name_, - distributer_sender_mmdevice.in (), - ACE_TRY_ENV); + distributer_sender_mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Connect to receivers - this->connection_manager_.connect_to_receivers (ACE_TRY_ENV); + this->connection_manager_.connect_to_receivers (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Bind to sender. this->connection_manager_.bind_to_sender (this->sender_name_, this->distributer_name_, - distributer_receiver_mmdevice.in (), - ACE_TRY_ENV); + distributer_receiver_mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Connect to sender. - this->connection_manager_.connect_to_sender (ACE_TRY_ENV); + this->connection_manager_.connect_to_sender (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -246,46 +246,46 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize the ORB first. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Distributer int result = DISTRIBUTER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result != 0) @@ -293,7 +293,7 @@ main (int argc, while (!DISTRIBUTER::instance ()->done ()) { - orb->perform_work (ACE_TRY_ENV); + orb->perform_work (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } diff --git a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/distributer.h b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/distributer.h index a6e73b7e911..83e7ec81eea 100644 --- a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/distributer.h +++ b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/distributer.h @@ -115,8 +115,8 @@ public: // Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Initialize data components. int parse_args (int argc, diff --git a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/receiver.cpp index e1b130cb3e2..4bcedbd078b 100644 --- a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/receiver.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/receiver.cpp @@ -63,8 +63,8 @@ Receiver_Callback::handle_destroy (void) ACE_TRY_NEW_ENV { - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -93,8 +93,8 @@ Receiver::~Receiver (void) int Receiver::init (int, - char **, - CORBA::Environment &ACE_TRY_ENV) + char ** + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -119,18 +119,18 @@ Receiver::init (int, this->mmdevice_; AVStreams::MMDevice_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Bind to sender. this->connection_manager_.bind_to_sender (this->sender_name_, this->receiver_name_, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Connect to the sender. - this->connection_manager_.connect_to_sender (ACE_TRY_ENV); + this->connection_manager_.connect_to_sender (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -179,39 +179,39 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize the ORB first. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; Receiver receiver; @@ -237,20 +237,20 @@ main (int argc, result = receiver.init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result != 0) return result; - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Hack for now.... ACE_OS::sleep (1); - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/receiver.h b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/receiver.h index 48724fc7ce3..c38cb18815a 100644 --- a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/receiver.h +++ b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/receiver.h @@ -83,8 +83,8 @@ public: // Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Initialize data components. int parse_args (int argc, diff --git a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.cpp index a96e4e49c71..dd8678dd200 100644 --- a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.cpp @@ -81,8 +81,8 @@ Sender::parse_args (int argc, int Sender::init (int argc, - char **argv, - CORBA::Environment& ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -128,18 +128,18 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Register the object reference with the Naming Service and bind to // the receivers this->connection_manager_.bind_to_receivers (this->sender_name_, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Connect to the receivers - this->connection_manager_.connect_to_receivers (ACE_TRY_ENV); + this->connection_manager_.connect_to_receivers (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -147,7 +147,7 @@ Sender::init (int argc, // Method to send data at the specified rate int -Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) +Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL) { // The time that should lapse between two consecutive frames sent. ACE_Time_Value inter_frame_time; @@ -224,8 +224,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Run the orb for the wait time so the sender can // continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -280,54 +280,54 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; //Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AV Stream components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Client. int result = 0; result = SENDER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result < 0) ACE_ERROR_RETURN ((LM_ERROR, "client::init failed\n"), -1); - SENDER::instance ()->pace_data (ACE_TRY_ENV); + SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - SENDER::instance ()->connection_manager ().destroy (ACE_TRY_ENV); + SENDER::instance ()->connection_manager ().destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.h b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.h index 22038260fa8..58468c578b6 100644 --- a/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.h +++ b/TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/sender.h @@ -62,11 +62,11 @@ public: // Constructor int init (int argc, - char **argv, - CORBA::Environment&); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Method to initialize the various data components. - int pace_data (CORBA::Environment &); + int pace_data (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); // Method to pace and send data from a file. Connection_Manager &connection_manager (void); diff --git a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp index 6bceacbf55b..7c8defb9058 100644 --- a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.cpp @@ -26,7 +26,7 @@ Receiver_StreamEndPoint::get_callback (const char *, int Receiver_StreamEndPoint::set_protocol_object (const char * flowname, - TAO_AV_Protocol_Object *object) + TAO_AV_Protocol_Object *object) { // Set the sender protocol object corresponding to the transport // protocol selected. @@ -70,17 +70,17 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, frame = frame->cont (); } - + // Read from the file into a message block. int n = ACE_OS::fread (this->mb_.wr_ptr (), - 1, - this->mb_.size (), - RECEIVER::instance ()->input_file ()); - + 1, + this->mb_.size (), + RECEIVER::instance ()->input_file ()); + if (n < 0) ACE_DEBUG ((LM_DEBUG, - "Receiver::receive_frame fread failed\n")); - + "Receiver::receive_frame fread failed\n")); + if (n == 0) { // At end of file break the loop and end the sender. @@ -89,15 +89,15 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, else { this->mb_.wr_ptr (n); - + // Send frame. int result = - RECEIVER::instance ()->protocol_object ()->send_frame (&this->mb_); - + RECEIVER::instance ()->protocol_object ()->send_frame (&this->mb_); + if (result < 0) - ACE_DEBUG ((LM_DEBUG, - "Send Frame Failed\n")); - + ACE_DEBUG ((LM_DEBUG, + "Send Frame Failed\n")); + // Reset the message block. this->mb_.reset (); } @@ -117,18 +117,18 @@ Receiver_Callback::handle_destroy (void) if (count < 2) { ACE_TRY_NEW_ENV - { - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } + { + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Receiver_Callback::handle_destroy Failed\n"); + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "Receiver_Callback::handle_destroy Failed\n"); return -1; - - } + + } ACE_ENDTRY; } @@ -160,7 +160,7 @@ Receiver::protocol_object (TAO_AV_Protocol_Object *object) int Receiver::parse_args (int argc, - char **argv) + char **argv) { // Parse command line arguments ACE_Get_Opt opts (argc, argv, "f:r:d"); @@ -189,8 +189,8 @@ Receiver::parse_args (int argc, int Receiver::init (int argc, - char ** argv, - CORBA::Environment &ACE_TRY_ENV) + char ** argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -205,7 +205,7 @@ Receiver::init (int argc, argv); if (result != 0) return result; - + // Open file to read. this->input_file_ = ACE_OS::fopen (this->filename_.c_str (), @@ -230,7 +230,7 @@ Receiver::init (int argc, this->mmdevice_; CORBA::Object_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Register the mmdevice with the naming service. @@ -248,8 +248,8 @@ Receiver::init (int argc, // Register the receiver object with the naming server. this->naming_client_->rebind (name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -278,32 +278,32 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. - TAO_AV_CORE::instance ()->init (orb.in (), root_poa.in (), ACE_TRY_ENV); + TAO_AV_CORE::instance ()->init (orb.in (), root_poa.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + // Make sure we have a valid <output_file> output_file = ACE_OS::fopen (output_file_name, "w"); @@ -319,24 +319,24 @@ main (int argc, int result = RECEIVER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + // // Start sending data. - // result = SENDER::instance ()->pace_data (ACE_TRY_ENV); + // result = SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); // ACE_TRY_CHECK; - + if (result != 0) return result; - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + // Hack for now.... ACE_OS::sleep (1); - - //orb->destroy (ACE_TRY_ENV); + + //orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.h b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.h index 4511d5f7710..8050232c5b7 100644 --- a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.h +++ b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/receiver.h @@ -49,7 +49,7 @@ public: private: int frame_count_; // Keeping a count of the incoming frames. - + ACE_Message_Block mb_; // Message block into which data is read from a file and then sent. }; @@ -93,8 +93,8 @@ public: // Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Initialize data components. void protocol_object (TAO_AV_Protocol_Object *protocol_object); @@ -130,7 +130,7 @@ protected: ACE_CString filename_; // File from which data is read. - + int parse_args (int argc, char **argv); // Method to parse the command line arguments. diff --git a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/run_test.pl index 28372903db4..e5b712073f8 100755 --- a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/run_test.pl +++ b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/run_test.pl @@ -28,7 +28,7 @@ $NS->Spawn (); if (PerlACE::waitforfile_timed ($nsior, 5) == -1) { print STDERR "ERROR: cannot find naming service IOR file\n"; - $NS->Kill (); + $NS->Kill (); exit 1; } diff --git a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.cpp index 63dab991dd3..bdc873a3ac6 100644 --- a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.cpp @@ -42,8 +42,8 @@ Sender_Callback::Sender_Callback (void) int Sender_Callback::receive_frame (ACE_Message_Block *frame, - TAO_AV_frame_info *, - const ACE_Addr &) + TAO_AV_frame_info *, + const ACE_Addr &) { // // Upcall from the AVStreams when there is data to be received from @@ -52,7 +52,7 @@ Sender_Callback::receive_frame (ACE_Message_Block *frame, ACE_DEBUG ((LM_DEBUG, "Sender_Callback::receive_frame for frame %d\n", this->frame_count_++)); - + while (frame != 0) { // Write the received data to the file. @@ -108,15 +108,15 @@ Sender::shutdown (void) ACE_DECLARE_NEW_CORBA_ENV; // File reading is complete, destroy the stream. AVStreams::flowSpec stop_spec; - this->streamctrl_->destroy (stop_spec, - ACE_TRY_ENV); + this->streamctrl_->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + // Shut the orb down. - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + } int @@ -153,7 +153,7 @@ Sender::parse_args (int argc, // Method to get the object reference of the receiver int -Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) +Sender::bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL) { CosNaming::Name name (1); name.length (1); @@ -162,13 +162,13 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) // Resolve the receiver object reference from the Naming Service CORBA::Object_var receiver_mmdevice_obj = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->receiver_mmdevice_ = - AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (CORBA::is_nil (this->receiver_mmdevice_.in ())) @@ -181,8 +181,8 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) int Sender::init (int argc, - char **argv, - CORBA::Environment &ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -219,9 +219,9 @@ Sender::init (int argc, "File opened successfully\n")); // Resolve the object reference of the receiver from the Naming Service. - result = this->bind_to_receiver (ACE_TRY_ENV); + result = this->bind_to_receiver (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) Error binding to the naming service\n"), @@ -263,7 +263,7 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->streamctrl_, @@ -278,8 +278,8 @@ Sender::init (int argc, this->streamctrl_->bind_devs (mmdevice.in (), this->receiver_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (bind_result == 0) @@ -292,7 +292,7 @@ Sender::init (int argc, // Method to send data at the specified rate int -Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) +Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL) { // The time that should lapse between two consecutive frames sent. ACE_Time_Value inter_frame_time; @@ -330,7 +330,7 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) { // At end of file break the loop and end the sender. ACE_DEBUG ((LM_DEBUG,"Handle_Start:End of file\n")); - this->eof_ = 1; + this->eof_ = 1; break; } @@ -369,8 +369,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Run the orb for the wait time so the sender can // continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -399,13 +399,13 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // File reading is complete, destroy the stream. AVStreams::flowSpec stop_spec; - this->streamctrl_->destroy (stop_spec, - ACE_TRY_ENV); + this->streamctrl_->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Shut the orb down. //TAO_AV_CORE::instance ()->orb ()->shutdown (1, - // ACE_TRY_ENV); + // TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -428,42 +428,42 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AV Stream components. /* TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); */ + root_poa.in () + TAO_ENV_ARG_PARAMETER); */ ACE_TRY_CHECK; // Initialize the AVStreams components. - TAO_AV_CORE::instance ()->init (orb.in (), root_poa.in (), ACE_TRY_ENV); + TAO_AV_CORE::instance ()->init (orb.in (), root_poa.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Sender. int result = 0; result = SENDER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result < 0) @@ -483,9 +483,9 @@ main (int argc, else ACE_DEBUG ((LM_DEBUG, "File Opened Successfull\n")); - + // Start sending data. - result = SENDER::instance ()->pace_data (ACE_TRY_ENV); + result = SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; ACE_Time_Value tv(3,0); orb->run (tv); diff --git a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.h b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.h index 8188b7f49f7..fbe82c9e994 100644 --- a/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.h +++ b/TAO/orbsvcs/tests/AVStreams/Bidirectional_Flows/sender.h @@ -89,25 +89,25 @@ public: // Constructor int init (int argc, - char **argv, - CORBA::Environment&); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Method to initialize the various data components. - int pace_data (CORBA::Environment &); + int pace_data (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); // Method to pace and send data from a file. void protocol_object (TAO_AV_Protocol_Object *protocol_object); // Set the protocol object corresponding to the transport protocol chosen. int eof (void); - + void shutdown (void); private: int parse_args (int argc, char **argv); // Method to parse the command line arguments. - int bind_to_receiver (CORBA::Environment& ACE_TRY_ENV); + int bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL); // Method that binds the sender to the receiver. SENDER_ENDPOINT_STRATEGY endpoint_strategy_; @@ -145,6 +145,6 @@ private: TAO_AV_Protocol_Object *protocol_object_; // Protocol object corresponding to the transport protocol selected. - + int eof_; }; diff --git a/TAO/orbsvcs/tests/AVStreams/Component_Switching/Connection_Manager.cpp b/TAO/orbsvcs/tests/AVStreams/Component_Switching/Connection_Manager.cpp index 796b6e40464..b6a3c85341c 100644 --- a/TAO/orbsvcs/tests/AVStreams/Component_Switching/Connection_Manager.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Component_Switching/Connection_Manager.cpp @@ -25,8 +25,8 @@ Connection_Manager::init (CORBA::ORB_ptr orb) void Connection_Manager::bind_to_receivers (const ACE_CString &sender_name, - AVStreams::MMDevice_ptr sender, - CORBA::Environment &ACE_TRY_ENV) + AVStreams::MMDevice_ptr sender + TAO_ENV_ARG_DECL) { this->sender_name_ = sender_name; @@ -44,8 +44,8 @@ Connection_Manager::bind_to_receivers (const ACE_CString &sender_name, CORBA::string_dup (this->sender_name_.c_str ()); this->sender_context_ = - this->naming_client_->bind_new_context (name, - ACE_TRY_ENV); + this->naming_client_->bind_new_context (name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // @@ -59,8 +59,8 @@ Connection_Manager::bind_to_receivers (const ACE_CString &sender_name, // Try binding the receivers context under the sender context. this->receiver_context_ = - this->sender_context_->bind_new_context (name, - ACE_TRY_ENV); + this->sender_context_->bind_new_context (name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCH (CosNaming::NamingContext::AlreadyBound, al_ex) @@ -75,8 +75,8 @@ Connection_Manager::bind_to_receivers (const ACE_CString &sender_name, CORBA::string_dup (this->sender_name_.c_str ()); CORBA::Object_var object = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK; this->sender_context_ = @@ -87,14 +87,14 @@ Connection_Manager::bind_to_receivers (const ACE_CString &sender_name, CORBA::string_dup ("Receivers"); object = - this->sender_context_->resolve (name, - ACE_TRY_ENV); + this->sender_context_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK; this->receiver_context_ = CosNaming::NamingContext::_narrow (object.in ()); - this->find_receivers (ACE_TRY_ENV); + this->find_receivers (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } ACE_ENDTRY; @@ -105,13 +105,13 @@ Connection_Manager::bind_to_receivers (const ACE_CString &sender_name, // Register the sender object with the sender context. this->sender_context_->rebind (name, - sender, - ACE_TRY_ENV); + sender + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void -Connection_Manager::find_receivers (CORBA::Environment &ACE_TRY_ENV) +Connection_Manager::find_receivers (TAO_ENV_SINGLE_ARG_DECL) { CosNaming::BindingIterator_var iterator; CosNaming::BindingList_var binding_list; @@ -120,13 +120,13 @@ Connection_Manager::find_receivers (CORBA::Environment &ACE_TRY_ENV) // Get the list of receivers registered for this sender. this->receiver_context_->list (chunk, binding_list, - iterator, - ACE_TRY_ENV); + iterator + TAO_ENV_ARG_PARAMETER); ACE_CHECK; // Add the receivers found in the bindinglist to the <receivers>. - this->add_to_receivers (binding_list, - ACE_TRY_ENV); + this->add_to_receivers (binding_list + TAO_ENV_ARG_PARAMETER); ACE_CHECK; if (!CORBA::is_nil (iterator.in ())) @@ -137,20 +137,20 @@ Connection_Manager::find_receivers (CORBA::Environment &ACE_TRY_ENV) while (more) { more = iterator->next_n (chunk, - binding_list, - ACE_TRY_ENV); + binding_list + TAO_ENV_ARG_PARAMETER); ACE_CHECK; - this->add_to_receivers (binding_list, - ACE_TRY_ENV); + this->add_to_receivers (binding_list + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } } } void -Connection_Manager::add_to_receivers (CosNaming::BindingList &binding_list, - CORBA::Environment& ACE_TRY_ENV) +Connection_Manager::add_to_receivers (CosNaming::BindingList &binding_list + TAO_ENV_ARG_DECL) { for (CORBA::ULong i = 0; i < binding_list.length (); @@ -168,8 +168,8 @@ Connection_Manager::add_to_receivers (CosNaming::BindingList &binding_list, // Resolve the reference of the receiver from the receiver // context. CORBA::Object_var obj = - this->receiver_context_->resolve (name, - ACE_TRY_ENV); + this->receiver_context_->resolve (name + TAO_ENV_ARG_PARAMETER); AVStreams::MMDevice_var receiver_device = AVStreams::MMDevice::_narrow (obj.in ()); @@ -185,7 +185,7 @@ Connection_Manager::add_to_receivers (CosNaming::BindingList &binding_list, } void -Connection_Manager::connect_to_receivers (CORBA::Environment &ACE_TRY_ENV) +Connection_Manager::connect_to_receivers (TAO_ENV_SINGLE_ARG_DECL) { // Connect to all receivers that we know about. for (Receivers::iterator iterator = this->receivers_.begin (); @@ -224,7 +224,7 @@ Connection_Manager::connect_to_receivers (CORBA::Environment &ACE_TRY_ENV) // Register streamctrl. AVStreams::StreamCtrl_var streamctrl_object = - streamctrl->_this (ACE_TRY_ENV); + streamctrl->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // Bind the flowname and the corresponding stream controller to @@ -236,8 +236,8 @@ Connection_Manager::connect_to_receivers (CORBA::Environment &ACE_TRY_ENV) (void) streamctrl->bind_devs (this->sender_.in (), (*iterator).int_id_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } } @@ -245,8 +245,8 @@ Connection_Manager::connect_to_receivers (CORBA::Environment &ACE_TRY_ENV) void Connection_Manager::bind_to_sender (const ACE_CString &sender_name, const ACE_CString &receiver_name, - AVStreams::MMDevice_ptr receiver, - CORBA::Environment &ACE_TRY_ENV) + AVStreams::MMDevice_ptr receiver + TAO_ENV_ARG_DECL) { this->sender_name_ = sender_name; @@ -271,8 +271,8 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, CORBA::string_dup (this->sender_name_.c_str ()); CORBA::Object_var object = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // @@ -289,8 +289,8 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, // Find the receivers context under the sender's context object = - this->sender_context_->resolve (name, - ACE_TRY_ENV); + this->sender_context_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK; this->receiver_context_ = @@ -303,8 +303,8 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, // Create the sender context this->sender_context_ = - this->naming_client_->bind_new_context (name, - ACE_TRY_ENV); + this->naming_client_->bind_new_context (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK; name [0].id = @@ -312,8 +312,8 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, // Create the receivers context under the sender's context this->receiver_context_ = - this->sender_context_->bind_new_context (name, - ACE_TRY_ENV); + this->sender_context_->bind_new_context (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } ACE_ENDTRY; @@ -328,8 +328,8 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, // Register this receiver object under the receiver context. this->receiver_context_->rebind (name, - receiver, - ACE_TRY_ENV); + receiver + TAO_ENV_ARG_PARAMETER); ACE_CHECK; // @@ -345,12 +345,12 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, CORBA::string_dup (this->sender_name_.c_str ()); CORBA::Object_var object = - this->sender_context_->resolve (name, - ACE_TRY_ENV); + this->sender_context_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX(SENDER_CONTEXT_EXISTS); this->sender_ = - AVStreams::MMDevice::_narrow (object.in (), ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (object.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX(SENDER_CONTEXT_EXISTS); } ACE_CATCH (CosNaming::NamingContext::NotFound, al_ex) @@ -363,7 +363,7 @@ Connection_Manager::bind_to_sender (const ACE_CString &sender_name, } void -Connection_Manager::connect_to_sender (CORBA::Environment &ACE_TRY_ENV) +Connection_Manager::connect_to_sender (TAO_ENV_SINGLE_ARG_DECL) { if (CORBA::is_nil (this->sender_.in ())) return; @@ -399,7 +399,7 @@ Connection_Manager::connect_to_sender (CORBA::Environment &ACE_TRY_ENV) // Register streamctrl. AVStreams::StreamCtrl_var streamctrl_object = - streamctrl->_this (ACE_TRY_ENV); + streamctrl->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // @@ -417,8 +417,8 @@ Connection_Manager::connect_to_sender (CORBA::Environment &ACE_TRY_ENV) streamctrl->bind_devs (this->sender_.in (), this->receiver_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK; if (result == 0) @@ -427,20 +427,20 @@ Connection_Manager::connect_to_sender (CORBA::Environment &ACE_TRY_ENV) // Start the data sending. AVStreams::flowSpec start_spec; - streamctrl->start (start_spec, - ACE_TRY_ENV); + streamctrl->start (start_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void Connection_Manager::add_streamctrl (const ACE_CString &flowname, - TAO_StreamEndPoint *endpoint, - CORBA::Environment &ACE_TRY_ENV) + TAO_StreamEndPoint *endpoint + TAO_ENV_ARG_DECL) { // Get the stream controller for this endpoint. CORBA::Any_ptr streamctrl_any = - endpoint->get_property_value ("Related_StreamCtrl", - ACE_TRY_ENV); + endpoint->get_property_value ("Related_StreamCtrl" + TAO_ENV_ARG_PARAMETER); ACE_CHECK; AVStreams::StreamCtrl_ptr streamctrl; @@ -452,33 +452,33 @@ Connection_Manager::add_streamctrl (const ACE_CString &flowname, } void -Connection_Manager::destroy (CORBA::Environment &ACE_TRY_ENV) +Connection_Manager::destroy (TAO_ENV_SINGLE_ARG_DECL) { AVStreams::flowSpec stop_spec; - + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "Connection_Manager::destroy\n")); - + "Connection_Manager::destroy\n")); + StreamCtrls::iterator iterator = this->streamctrls_.begin (); int size = this->streamctrls_.current_size (); for (int i = 0 ; i < size; i++) { - (*iterator).int_id_->destroy (stop_spec, - ACE_TRY_ENV); + (*iterator).int_id_->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK; iterator.advance (); } - + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "Finished with the destroy\n")); + "Finished with the destroy\n")); } void -Connection_Manager::destroy (const ACE_CString &flowname, - CORBA::Environment &ACE_TRY_ENV) +Connection_Manager::destroy (const ACE_CString &flowname + TAO_ENV_ARG_DECL) { this->protocol_objects_.unbind (flowname); this->receivers_.unbind (flowname); @@ -488,163 +488,163 @@ Connection_Manager::destroy (const ACE_CString &flowname, streamctrl); AVStreams::flowSpec stop_spec; - streamctrl->destroy (stop_spec, - ACE_TRY_ENV); + streamctrl->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void -Connection_Manager::unbind_sender (const ACE_CString &sender_name, - AVStreams::MMDevice_ptr sender_mmdevice_obj, - CORBA::Environment &ACE_TRY_ENV) +Connection_Manager::unbind_sender (const ACE_CString &sender_name, + AVStreams::MMDevice_ptr sender_mmdevice_obj + TAO_ENV_ARG_DECL) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "Connection_Manager::unbind_sender\n")); - + "Connection_Manager::unbind_sender\n")); + CosNaming::Name name (1); name.length (1); // Try binding the sender context in the NS name [0].id = CORBA::string_dup (sender_name.c_str ()); - + ACE_TRY { CORBA::Object_var object = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + CosNaming::NamingContext_var sender_context = - CosNaming::NamingContext::_narrow (object.in ()); - + CosNaming::NamingContext::_narrow (object.in ()); + if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "Sender Context Found\n")); - + ACE_DEBUG ((LM_DEBUG, + "Sender Context Found\n")); + ACE_TRY_EX (Resolve_Sender) - { - object = - sender_context->resolve (name, - ACE_TRY_ENV); - ACE_TRY_CHECK_EX (Resolve_Sender); - - AVStreams::MMDevice_var mmdevice = - AVStreams::MMDevice::_narrow (object.in ()); - - if (mmdevice->_is_equivalent (sender_mmdevice_obj)) - { - sender_context->unbind (name, - ACE_TRY_ENV); - ACE_TRY_CHECK_EX (Resolve_Sender); - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "Sender Unbound\n")); - } - } + { + object = + sender_context->resolve (name + TAO_ENV_ARG_PARAMETER); + ACE_TRY_CHECK_EX (Resolve_Sender); + + AVStreams::MMDevice_var mmdevice = + AVStreams::MMDevice::_narrow (object.in ()); + + if (mmdevice->_is_equivalent (sender_mmdevice_obj)) + { + sender_context->unbind (name + TAO_ENV_ARG_PARAMETER); + ACE_TRY_CHECK_EX (Resolve_Sender); + + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "Sender Unbound\n")); + } + } ACE_CATCH (CosNaming::NamingContext::NotFound, al_ex) - { - ACE_DEBUG ((LM_DEBUG, - "Sender object not found\n")); - // Do not have to unbind. - } + { + ACE_DEBUG ((LM_DEBUG, + "Sender object not found\n")); + // Do not have to unbind. + } ACE_ENDTRY; } ACE_CATCH (CosNaming::NamingContext::NotFound, al_ex) { ACE_DEBUG ((LM_DEBUG, - "Sender Context Not Found\n")); + "Sender Context Not Found\n")); // Do not have to unbind. } ACE_ENDTRY; - + } void Connection_Manager::unbind_receiver (const ACE_CString &sender_name, - const ACE_CString &receiver_name, - AVStreams::MMDevice_ptr receiver_mmdevice) + const ACE_CString &receiver_name, + AVStreams::MMDevice_ptr receiver_mmdevice) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "Connection_Manager::unbind_receiver\n")); - + "Connection_Manager::unbind_receiver\n")); + CosNaming::Name name (1); name.length (1); // Try binding the sender context in the NS name [0].id = CORBA::string_dup (sender_name.c_str ()); - + ACE_TRY_NEW_ENV { CORBA::Object_var object = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + CosNaming::NamingContext_var sender_context = - CosNaming::NamingContext::_narrow (object.in ()); - + CosNaming::NamingContext::_narrow (object.in ()); + if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "Sender Context Found\n")); - + ACE_DEBUG ((LM_DEBUG, + "Sender Context Found\n")); + ACE_TRY_EX (Resolve_Receiver) - { - name [0].id = - CORBA::string_dup ("Receivers"); - - object = - sender_context->resolve (name, - ACE_TRY_ENV); - ACE_TRY_CHECK_EX (Resolve_Receiver); - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "Receivers Context Found\n")); - - CosNaming::NamingContext_var receivers_context = - CosNaming::NamingContext::_narrow (object.in ()); - - name [0].id = - CORBA::string_dup (receiver_name.c_str ()); - - object = - receivers_context->resolve (name, - ACE_TRY_ENV); - ACE_TRY_CHECK_EX (Resolve_Receiver); - - AVStreams::MMDevice_var mmdevice = - AVStreams::MMDevice::_narrow (object.in ()); - - if (mmdevice->_is_equivalent (receiver_mmdevice)) - { - receivers_context->unbind (name, - ACE_TRY_ENV); - ACE_TRY_CHECK_EX (Resolve_Receiver); - - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "Receiver Unbound\n")); - } - } + { + name [0].id = + CORBA::string_dup ("Receivers"); + + object = + sender_context->resolve (name + TAO_ENV_ARG_PARAMETER); + ACE_TRY_CHECK_EX (Resolve_Receiver); + + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "Receivers Context Found\n")); + + CosNaming::NamingContext_var receivers_context = + CosNaming::NamingContext::_narrow (object.in ()); + + name [0].id = + CORBA::string_dup (receiver_name.c_str ()); + + object = + receivers_context->resolve (name + TAO_ENV_ARG_PARAMETER); + ACE_TRY_CHECK_EX (Resolve_Receiver); + + AVStreams::MMDevice_var mmdevice = + AVStreams::MMDevice::_narrow (object.in ()); + + if (mmdevice->_is_equivalent (receiver_mmdevice)) + { + receivers_context->unbind (name + TAO_ENV_ARG_PARAMETER); + ACE_TRY_CHECK_EX (Resolve_Receiver); + + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "Receiver Unbound\n")); + } + } ACE_CATCH (CosNaming::NamingContext::NotFound, al_ex) - { - ACE_DEBUG ((LM_DEBUG, - "Receiver Not found\n")); - // Do not have to unbind. - } + { + ACE_DEBUG ((LM_DEBUG, + "Receiver Not found\n")); + // Do not have to unbind. + } ACE_ENDTRY; - + } ACE_CATCH (CosNaming::NamingContext::NotFound, al_ex) { ACE_DEBUG ((LM_DEBUG, - "Sender Context Not Found\n")); + "Sender Context Not Found\n")); // Do not have to unbind. } ACE_ENDTRY; diff --git a/TAO/orbsvcs/tests/AVStreams/Component_Switching/Connection_Manager.h b/TAO/orbsvcs/tests/AVStreams/Component_Switching/Connection_Manager.h index 83d71d94977..f7f44716a56 100644 --- a/TAO/orbsvcs/tests/AVStreams/Component_Switching/Connection_Manager.h +++ b/TAO/orbsvcs/tests/AVStreams/Component_Switching/Connection_Manager.h @@ -47,43 +47,43 @@ public: // Initialize this class. void bind_to_receivers (const ACE_CString &sender_name, - AVStreams::MMDevice_ptr sender, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + AVStreams::MMDevice_ptr sender + TAO_ENV_ARG_DECL_WITH_DEFAULTS); // Method that binds the sender to the Naming Service and retreives // the references of any registered receivers. - void connect_to_receivers (CORBA::Environment& ACE_TRY_ENV = TAO_default_environment ()); + void connect_to_receivers (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); // Connect to the receivers that we found. void bind_to_sender (const ACE_CString &sender_name, const ACE_CString &receiver_name, - AVStreams::MMDevice_ptr receiver, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + AVStreams::MMDevice_ptr receiver + TAO_ENV_ARG_DECL_WITH_DEFAULTS); // Bind receiver to the sender. - void connect_to_sender (CORBA::Environment& ACE_TRY_ENV = TAO_default_environment ()); + void connect_to_sender (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); // Connect to the sender that we found. - void destroy (CORBA::Environment & = TAO_default_environment ()); + void destroy (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); // Destroy all streams. - void destroy (const ACE_CString &flowname, - CORBA::Environment & = TAO_default_environment ()); + void destroy (const ACE_CString &flowname + TAO_ENV_ARG_DECL_WITH_DEFAULTS); // Destroy streams associated with <flowname>. - void unbind_sender (const ACE_CString &sender_name, - AVStreams::MMDevice_ptr sender_mmdevice, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ; + void unbind_sender (const ACE_CString &sender_name, + AVStreams::MMDevice_ptr sender_mmdevice + TAO_ENV_ARG_DECL_WITH_DEFAULTS) ; // Unbind the sender from the Naming Service - void unbind_receiver (const ACE_CString &sender_name, - const ACE_CString &receiver_name, - AVStreams::MMDevice_ptr receiver_mmdevice); + void unbind_receiver (const ACE_CString &sender_name, + const ACE_CString &receiver_name, + AVStreams::MMDevice_ptr receiver_mmdevice); // Unbind the Receiver from the Naming Service void add_streamctrl (const ACE_CString &flowname, - TAO_StreamEndPoint *endpoint, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); + TAO_StreamEndPoint *endpoint + TAO_ENV_ARG_DECL_WITH_DEFAULTS); // Add new streamctrl. // Map of receivers. @@ -111,10 +111,10 @@ public: protected: - void find_receivers (CORBA::Environment &ACE_TRY_ENV); + void find_receivers (TAO_ENV_SINGLE_ARG_DECL); - void add_to_receivers (CosNaming::BindingList &binding_list, - CORBA::Environment& ACE_TRY_ENV); + void add_to_receivers (CosNaming::BindingList &binding_list + TAO_ENV_ARG_DECL); TAO_Naming_Client naming_client_; // The Naming Service client. diff --git a/TAO/orbsvcs/tests/AVStreams/Component_Switching/distributer.cpp b/TAO/orbsvcs/tests/AVStreams/Component_Switching/distributer.cpp index a3c6579f6be..5720e0a6cb6 100644 --- a/TAO/orbsvcs/tests/AVStreams/Component_Switching/distributer.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Component_Switching/distributer.cpp @@ -21,12 +21,12 @@ Signal_Handler::handle_signal (int signum, siginfo_t *, ucontext_t*) if (signum == SIGINT) { if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "In the signal handler\n")); - + ACE_DEBUG ((LM_DEBUG, + "In the signal handler\n")); + DISTRIBUTER::instance ()->done (1); - - } + + } return 0; } @@ -37,7 +37,7 @@ Distributer_Sender_StreamEndPoint::get_callback (const char *flow_name, /// Create and return the sender application callback to AVStreams /// for further upcalls. callback = &this->callback_; - + ACE_CString fname = flow_name; this->callback_.flowname (fname); @@ -59,7 +59,7 @@ Distributer_Sender_StreamEndPoint::set_protocol_object (const char *flowname, /// Store the related streamctrl. connection_manager.add_streamctrl (flowname, this); - + return 0; } @@ -87,17 +87,17 @@ Distributer_Receiver_StreamEndPoint::set_protocol_object (const char *, return 0; } -CORBA::Boolean -Distributer_Receiver_StreamEndPoint::handle_connection_requested (AVStreams::flowSpec &flowspec, - CORBA::Environment &) +CORBA::Boolean +Distributer_Receiver_StreamEndPoint::handle_connection_requested (AVStreams::flowSpec &flowspec + TAO_ENV_ARG_DECL_NOT_USED) { //if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "Distributer_Receiver_StreamEndPoint::handle_connection_requested\n")); - + "Distributer_Receiver_StreamEndPoint::handle_connection_requested\n")); + Connection_Manager &connection_manager = DISTRIBUTER::instance ()->connection_manager (); - + /// Check to see if the flow already exists. If it does then close the /// old connection and setup a new one with the new sender. @@ -107,34 +107,34 @@ Distributer_Receiver_StreamEndPoint::handle_connection_requested (AVStreams::flo { TAO_Forward_FlowSpec_Entry entry; entry.parse (flowspec[i].in ()); - + //if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "Handle Conection Requested flowname %s \n", - entry.flowname ())); - + ACE_DEBUG ((LM_DEBUG, + "Handle Conection Requested flowname %s \n", + entry.flowname ())); + ACE_CString flowname (entry.flowname ()); - + int result = connection_manager.streamctrls ().find (flowname); - + /// If the flowname is found. if (result == 0) - { - ACE_DEBUG ((LM_DEBUG, "\nDistributer switching senders handle connection requested\n\n")); - - ///Destroy old stream with the same flowname. - connection_manager.destroy (flowname); - - } - + { + ACE_DEBUG ((LM_DEBUG, "\nDistributer switching senders handle connection requested\n\n")); + + ///Destroy old stream with the same flowname. + connection_manager.destroy (flowname); + + } + /// Store the related streamctrl. connection_manager.add_streamctrl (flowname.c_str (), - this); - + this); + } return 1; - + } @@ -149,7 +149,7 @@ Distributer_Receiver_Callback::flowname (void) return this->flowname_; } -void +void Distributer_Receiver_Callback::flowname (const ACE_CString &flowname) { this->flowname_ = flowname; @@ -193,13 +193,13 @@ Distributer_Receiver_Callback::handle_destroy (void) { /// Called when the sender requests the stream to be shutdown. ACE_DEBUG ((LM_DEBUG, - "Distributer_Receiver_Callback::end_stream\n")); - + "Distributer_Receiver_Callback::end_stream\n")); + DISTRIBUTER::instance ()->connection_manager ().streamctrls ().unbind (this->flowname_.c_str ()); - + /// Decrement the stream count. DISTRIBUTER::instance ()->stream_destroyed (); - + return 0; } @@ -209,7 +209,7 @@ Distributer_Sender_Callback::flowname (void) return this->flowname_; } -void +void Distributer_Sender_Callback::flowname (const ACE_CString &flowname) { this->flowname_ = flowname; @@ -222,11 +222,11 @@ Distributer_Sender_Callback::handle_destroy (void) ACE_DEBUG ((LM_DEBUG, "Distributer_Sender_Callback::end_stream\n")); - + DISTRIBUTER::instance ()->connection_manager ().protocol_objects ().unbind (this->flowname_.c_str ()); - + DISTRIBUTER::instance ()->connection_manager ().streamctrls ().unbind (this->flowname_.c_str ()); - + DISTRIBUTER::instance ()->connection_manager ().receivers ().unbind (this->flowname_.c_str ()); return 0; @@ -244,17 +244,17 @@ Distributer::~Distributer (void) { } -void +void Distributer::stream_created (void) { this->stream_count_++; } -void +void Distributer::stream_destroyed (void) { this->stream_count_--; - + if (this->stream_count_ == 0) this->done_ = 1; } @@ -295,8 +295,8 @@ Distributer::parse_args (int argc, int Distributer::init (int argc, - char ** argv, - CORBA::Environment &ACE_TRY_ENV) + char ** argv + TAO_ENV_ARG_DECL) { /// Initialize the connection class. int result = @@ -324,15 +324,15 @@ Distributer::init (int argc, if (result != 0) return result; - ACE_Reactor *reactor = + ACE_Reactor *reactor = TAO_AV_CORE::instance ()->reactor (); - + if (reactor->register_handler (SIGINT, - &this->signal_handler_) == -1) + &this->signal_handler_) == -1) ACE_ERROR_RETURN ((LM_ERROR, - "Error in handler register\n"), - -1); - /// Register the signal handler for clean termination of the process. + "Error in handler register\n"), + -1); + /// Register the signal handler for clean termination of the process. ACE_NEW_RETURN (this->distributer_sender_mmdevice_, TAO_MMDevice (&this->sender_endpoint_strategy_), @@ -343,7 +343,7 @@ Distributer::init (int argc, this->distributer_sender_mmdevice_; AVStreams::MMDevice_var distributer_sender_mmdevice = - this->distributer_sender_mmdevice_->_this (ACE_TRY_ENV); + this->distributer_sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->distributer_receiver_mmdevice_, @@ -355,31 +355,31 @@ Distributer::init (int argc, this->distributer_receiver_mmdevice_; AVStreams::MMDevice_var distributer_receiver_mmdevice = - this->distributer_receiver_mmdevice_->_this (ACE_TRY_ENV); + this->distributer_receiver_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); /// Bind to sender. this->connection_manager_.bind_to_sender (this->sender_name_, this->distributer_name_, - distributer_receiver_mmdevice.in (), - ACE_TRY_ENV); + distributer_receiver_mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + /// Connect to sender. - this->connection_manager_.connect_to_sender (ACE_TRY_ENV); + this->connection_manager_.connect_to_sender (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + /// Bind to receivers. this->connection_manager_.bind_to_receivers (this->distributer_name_, - distributer_sender_mmdevice.in (), - ACE_TRY_ENV); + distributer_sender_mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + /// Connect to receivers - this->connection_manager_.connect_to_receivers (ACE_TRY_ENV); + this->connection_manager_.connect_to_receivers (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + return 0; } @@ -390,25 +390,25 @@ Distributer::done (void) const } void -Distributer::shut_down (CORBA::Environment &ACE_TRY_ENV) +Distributer::shut_down (TAO_ENV_SINGLE_ARG_DECL) { ACE_TRY { - AVStreams::MMDevice_var receiver_mmdevice = - this->distributer_receiver_mmdevice_->_this (ACE_TRY_ENV); + AVStreams::MMDevice_var receiver_mmdevice = + this->distributer_receiver_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; DISTRIBUTER::instance ()->connection_manager ().unbind_receiver (this->sender_name_, - this->distributer_name_, - receiver_mmdevice.in ()); - AVStreams::MMDevice_var sender_mmdevice = - this->distributer_sender_mmdevice_->_this (ACE_TRY_ENV); + this->distributer_name_, + receiver_mmdevice.in ()); + AVStreams::MMDevice_var sender_mmdevice = + this->distributer_sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + DISTRIBUTER::instance ()->connection_manager ().unbind_sender (this->distributer_name_, - sender_mmdevice.in ()); - - DISTRIBUTER::instance ()->connection_manager ().destroy (ACE_TRY_ENV); + sender_mmdevice.in ()); + + DISTRIBUTER::instance ()->connection_manager ().destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } @@ -429,60 +429,60 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { /// Initialize the ORB first. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; /// Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; /// Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; /// Initialize the Distributer int result = DISTRIBUTER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result != 0) return result; while (!DISTRIBUTER::instance ()->done ()) - { - orb->perform_work (ACE_TRY_ENV); - ACE_TRY_CHECK; - } + { + orb->perform_work (TAO_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } - DISTRIBUTER::instance ()->shut_down (ACE_TRY_ENV); + DISTRIBUTER::instance ()->shut_down (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + } ACE_CATCHANY { diff --git a/TAO/orbsvcs/tests/AVStreams/Component_Switching/distributer.h b/TAO/orbsvcs/tests/AVStreams/Component_Switching/distributer.h index 4f1a2e96c3c..b410f8a662e 100644 --- a/TAO/orbsvcs/tests/AVStreams/Component_Switching/distributer.h +++ b/TAO/orbsvcs/tests/AVStreams/Component_Switching/distributer.h @@ -30,7 +30,7 @@ class Signal_Handler : public ACE_Event_Handler // Useful to gracefully release the process public: - + Signal_Handler (void); int handle_signal(int signum, siginfo_t*,ucontext_t*); @@ -64,7 +64,7 @@ public: /// Accessor methods for the flowname of the callback. ACE_CString &flowname (void); void flowname (const ACE_CString &flowname); - + private: int frame_count_; /// Count of the frames passing through us. @@ -80,9 +80,9 @@ class Distributer_Sender_Callback : public TAO_AV_Callback // for receiving data. // // = DESCRIPTION - // This class overides the methods of the TAO_AV_Callback so the + // This class overides the methods of the TAO_AV_Callback so the // AVStreams can make upcalls to the application. - + public: int handle_destroy (void); @@ -94,9 +94,9 @@ public: void flowname (const ACE_CString &flowname); private: - + ACE_CString flowname_; - + }; class Distributer_Receiver_StreamEndPoint : public TAO_Server_StreamEndPoint @@ -110,14 +110,14 @@ public: /// Create a receiver application callback. int get_callback (const char *flowname, TAO_AV_Callback *&callback); - + int set_protocol_object (const char *, - TAO_AV_Protocol_Object *object); + TAO_AV_Protocol_Object *object); /// Store the reference to the protocol object corresponding /// to the transport - virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, - CORBA::Environment &); + virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec + TAO_ENV_ARG_DECL_NOT_USED); /// Called when a sender makes a connection request. private: @@ -139,7 +139,7 @@ public: TAO_AV_Protocol_Object *object); /// Set protocol object corresponding to the transport protocol /// chosen. - + protected: Distributer_Sender_Callback callback_; /// Application callback. @@ -173,8 +173,8 @@ public: /// Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); /// Initialize data components. int parse_args (int argc, @@ -190,11 +190,11 @@ public: void stream_created (void); /// Called when stream created - + void stream_destroyed (void); /// Called when stream destroyed - void shut_down (CORBA::Environment &); + void shut_down (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); ///Unbind the sender and receiver from the Naming Service protected: @@ -221,13 +221,13 @@ protected: int done_; /// Flag to know when we are done. - + int stream_count_; - /// Number of active streams. When a stream is disconnected this + /// Number of active streams. When a stream is disconnected this /// count is decremented. Signal_Handler signal_handler_; /// Reference to the signal handler. - + }; diff --git a/TAO/orbsvcs/tests/AVStreams/Component_Switching/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Component_Switching/receiver.cpp index a33af2bec29..afede31f802 100644 --- a/TAO/orbsvcs/tests/AVStreams/Component_Switching/receiver.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Component_Switching/receiver.cpp @@ -23,11 +23,11 @@ Signal_Handler::handle_signal (int signum, siginfo_t *, ucontext_t*) if (signum == SIGINT) { if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "In the signal handler\n")); - + ACE_DEBUG ((LM_DEBUG, + "In the signal handler\n")); + done = 1; - } + } return 0; } @@ -41,54 +41,54 @@ Receiver_StreamEndPoint::get_callback (const char *flow_name, /// Return the receiver application callback to the AVStreams for /// future upcalls. callback = &this->callback_; - + ACE_CString fname = flow_name; this->callback_.flowname (fname); return 0; } -CORBA::Boolean -Receiver_StreamEndPoint::handle_connection_requested (AVStreams::flowSpec &flowspec, - CORBA::Environment &) +CORBA::Boolean +Receiver_StreamEndPoint::handle_connection_requested (AVStreams::flowSpec &flowspec + TAO_ENV_ARG_DECL_NOT_USED) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "In Handle Conection Requested \n")); - + "In Handle Conection Requested \n")); + for (CORBA::ULong i = 0; i < flowspec.length (); i++) { TAO_Forward_FlowSpec_Entry entry; entry.parse (flowspec[i].in ()); - + ACE_DEBUG ((LM_DEBUG, - "Handle Conection Requested flowname %s \n", - entry.flowname ())); - + "Handle Conection Requested flowname %s \n", + entry.flowname ())); + ACE_CString flowname (entry.flowname ()); - + int result = - connection_manager->streamctrls ().find (flowname); - + connection_manager->streamctrls ().find (flowname); + /// If the flowname is found. if (result == 0) - { - ACE_DEBUG ((LM_DEBUG, "\nReceiver switching distributers handle connection requested\n\n")); - - ///Destroy old stream with the same flowname. - - connection_manager->destroy (flowname); - - } - + { + ACE_DEBUG ((LM_DEBUG, "\nReceiver switching distributers handle connection requested\n\n")); + + ///Destroy old stream with the same flowname. + + connection_manager->destroy (flowname); + + } + /// Store the related streamctrl. connection_manager->add_streamctrl (flowname.c_str (), - this); - + this); + } return 1; - + } Receiver_Callback::Receiver_Callback (void) @@ -102,7 +102,7 @@ Receiver_Callback::flowname (void) return this->flowname_; } -void +void Receiver_Callback::flowname (const ACE_CString &flowname) { this->flowname_ = flowname; @@ -113,11 +113,11 @@ Receiver_Callback::handle_destroy (void) { /// Called when the sender requests the stream to be shutdown. ACE_DEBUG ((LM_DEBUG, - "Receiver_Callback::end_stream\n")); + "Receiver_Callback::end_stream\n")); /// Remove the related stream control reference. connection_manager->streamctrls ().unbind (this->flowname_.c_str ()); - + return 0; } int @@ -180,8 +180,8 @@ Receiver::receiver_name (void) int Receiver::init (int, - char **, - CORBA::Environment &ACE_TRY_ENV) + char ** + TAO_ENV_ARG_DECL) { /// Initialize the endpoint strategy with the orb and poa. int result = @@ -197,17 +197,17 @@ Receiver::init (int, return result; connection_manager = &this->connection_manager_; - - ACE_Reactor *reactor = + + ACE_Reactor *reactor = TAO_AV_CORE::instance ()->reactor (); - + if (reactor->register_handler (SIGINT, - &this->signal_handler_) == -1) + &this->signal_handler_) == -1) ACE_ERROR_RETURN ((LM_ERROR, - "Error in handler register\n"), - -1); + "Error in handler register\n"), + -1); /// Register the signal handler for clean termination of the process. - + /// Register the receiver mmdevice object with the ORB ACE_NEW_RETURN (this->mmdevice_, TAO_MMDevice (&this->reactive_strategy_), @@ -218,18 +218,18 @@ Receiver::init (int, this->mmdevice_; AVStreams::MMDevice_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); /// Bind to sender. this->connection_manager_.bind_to_sender (this->sender_name_, this->receiver_name_, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); /// Connect to the sender. - this->connection_manager_.connect_to_sender (ACE_TRY_ENV); + this->connection_manager_.connect_to_sender (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -275,20 +275,20 @@ Receiver::output_file_name (void) } void -Receiver::shut_down (CORBA::Environment &ACE_TRY_ENV) +Receiver::shut_down (TAO_ENV_SINGLE_ARG_DECL) { ACE_TRY { AVStreams::MMDevice_var mmdevice_obj = - this->mmdevice_->_this (ACE_TRY_ENV); - + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; this->connection_manager_.unbind_receiver (this->sender_name_, - this->receiver_name_, - mmdevice_obj.in ()); + this->receiver_name_, + mmdevice_obj.in ()); - this->connection_manager_.destroy (ACE_TRY_ENV); + this->connection_manager_.destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } @@ -297,46 +297,46 @@ Receiver::shut_down (CORBA::Environment &ACE_TRY_ENV) ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,"Receiver::unbind"); } ACE_ENDTRY; - + } int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { /// Initialize the ORB first. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; /// Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; /// Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; Receiver receiver; @@ -362,20 +362,20 @@ main (int argc, result = receiver.init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result != 0) return result; - while (!done) - { - orb->perform_work (ACE_TRY_ENV); - ACE_TRY_CHECK; - } + while (!done) + { + orb->perform_work (TAO_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } - receiver.shut_down (ACE_TRY_ENV); + receiver.shut_down (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; ACE_OS::fclose (output_file); diff --git a/TAO/orbsvcs/tests/AVStreams/Component_Switching/receiver.h b/TAO/orbsvcs/tests/AVStreams/Component_Switching/receiver.h index f193d072230..fe302b57523 100644 --- a/TAO/orbsvcs/tests/AVStreams/Component_Switching/receiver.h +++ b/TAO/orbsvcs/tests/AVStreams/Component_Switching/receiver.h @@ -30,7 +30,7 @@ class Signal_Handler : public ACE_Event_Handler // Useful to gracefully release the process public: - + Signal_Handler (void); int handle_signal(int signum, siginfo_t*,ucontext_t*); @@ -61,7 +61,7 @@ public: /// Accessor methods for the flowname of the callback. ACE_CString &flowname (void); void flowname (const ACE_CString &flowname); - + private: int frame_count_; /// Keeping a count of the incoming frames. @@ -81,9 +81,9 @@ public: /// Create a receiver application callback. int get_callback (const char *flowname, TAO_AV_Callback *&callback); - - virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, - CORBA::Environment &); + + virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec + TAO_ENV_ARG_DECL_NOT_USED); /// Called when a distributor tries to connect to the receiver private: @@ -107,8 +107,8 @@ public: /// Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); /// Initialize data components. int parse_args (int argc, @@ -117,11 +117,11 @@ public: ACE_CString output_file_name (void); /// Name of the output file. - + ACE_CString sender_name (void); ACE_CString receiver_name (void); - void shut_down (CORBA::Environment &); + void shut_down (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); protected: Connection_Manager connection_manager_; diff --git a/TAO/orbsvcs/tests/AVStreams/Component_Switching/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Component_Switching/sender.cpp index 71588022d7c..833a089cae7 100644 --- a/TAO/orbsvcs/tests/AVStreams/Component_Switching/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Component_Switching/sender.cpp @@ -25,12 +25,12 @@ Signal_Handler::handle_signal (int signum, siginfo_t *, ucontext_t*) if (signum == SIGINT) { if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "In the signal handler\n")); - + ACE_DEBUG ((LM_DEBUG, + "In the signal handler\n")); + g_shutdown = 1; - - } + + } return 0; } @@ -40,7 +40,7 @@ Sender_Callback::flowname (void) return this->flowname_; } -void +void Sender_Callback::flowname (const ACE_CString &flowname) { this->flowname_ = flowname; @@ -51,11 +51,11 @@ int Sender_Callback::handle_destroy (void) { SENDER::instance ()->connection_manager ().protocol_objects ().unbind (this->flowname_.c_str ()); - + SENDER::instance ()->connection_manager ().streamctrls ().unbind (this->flowname_.c_str ()); SENDER::instance ()->connection_manager ().receivers ().unbind (this->flowname_.c_str ()); - + // SENDER::instance ()->remove_stream (); return 0; @@ -66,14 +66,14 @@ Sender_StreamEndPoint::get_callback (const char * flowname, TAO_AV_Callback *&callback) { //SENDER::instance ()->add_stream (); - + /// Create and return the client application callback and return to the AVStreams /// for further upcalls. callback = &this->callback_; ACE_CString flow_name (flowname); this->callback_.flowname (flow_name); - + return 0; } @@ -142,24 +142,24 @@ Sender::~Sender (void) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "Sender destructor\n")); + "Sender destructor\n")); } void -Sender::shut_down (CORBA::Environment &ACE_TRY_ENV) +Sender::shut_down (TAO_ENV_SINGLE_ARG_DECL) { ACE_TRY { AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + SENDER::instance ()->connection_manager ().unbind_sender (this->sender_name_, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - - SENDER::instance ()->connection_manager ().destroy (ACE_TRY_ENV); + + SENDER::instance ()->connection_manager ().destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -204,8 +204,8 @@ Sender::parse_args (int argc, int Sender::init (int argc, - char **argv, - CORBA::Environment& ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { /// Initialize the endpoint strategy with the orb and poa. int result = @@ -226,15 +226,15 @@ Sender::init (int argc, argv); if (result != 0) return result; - - ACE_Reactor *reactor = + + ACE_Reactor *reactor = TAO_AV_CORE::instance ()->reactor (); - + if (reactor->register_handler (SIGINT, - &this->signal_handler_) == -1) + &this->signal_handler_) == -1) ACE_ERROR_RETURN ((LM_ERROR, - "Error in handler register\n"), - -1); + "Error in handler register\n"), + -1); /// Register the signal handler for clean termination of the process. /// Open file to read. @@ -261,18 +261,18 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); /// Register the object reference with the Naming Service and bind to /// the receivers this->connection_manager_.bind_to_receivers (this->sender_name_, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); /// Connect to the receivers - this->connection_manager_.connect_to_receivers (ACE_TRY_ENV); + this->connection_manager_.connect_to_receivers (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -280,7 +280,7 @@ Sender::init (int argc, /// Method to send data at the specified rate int -Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) +Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL) { /// The time that should lapse between two consecutive frames sent. ACE_Time_Value inter_frame_time; @@ -304,16 +304,16 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) while (1) { - if (g_shutdown == 1) - { - ACE_DEBUG ((LM_DEBUG, - "Shut Down called\n")); + if (g_shutdown == 1) + { + ACE_DEBUG ((LM_DEBUG, + "Shut Down called\n")); - this->shut_down (ACE_TRY_ENV); - ACE_TRY_CHECK; + this->shut_down (TAO_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; - break; - } + break; + } /// Read from the file into a message block. int n = ACE_OS::fread (this->mb_.wr_ptr (), @@ -329,16 +329,16 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) if (n == 0) { /// At end of file break the loop and end the sender. - if (TAO_debug_level > 0) + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"Handle_Start:End of file\n")); - this->shut_down (ACE_TRY_ENV); - ACE_TRY_CHECK; + this->shut_down (TAO_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + break; - break; - } - + this->mb_.wr_ptr (n); if (this->frame_count_ > 1) @@ -374,9 +374,9 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) /// Run the orb for the wait time so the sender can /// continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); - ACE_TRY_CHECK; + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; } } @@ -450,51 +450,51 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ///Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; /// Initialize the AV Stream components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; /// Initialize the Client. int result = 0; result = SENDER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result < 0) ACE_ERROR_RETURN ((LM_ERROR, "client::init failed\n"), -1); - SENDER::instance ()->pace_data (ACE_TRY_ENV); + SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; orb->destroy (); diff --git a/TAO/orbsvcs/tests/AVStreams/Component_Switching/sender.h b/TAO/orbsvcs/tests/AVStreams/Component_Switching/sender.h index 9e64e1ee716..a28a58fc69f 100644 --- a/TAO/orbsvcs/tests/AVStreams/Component_Switching/sender.h +++ b/TAO/orbsvcs/tests/AVStreams/Component_Switching/sender.h @@ -30,7 +30,7 @@ class Signal_Handler : public ACE_Event_Handler // Useful to gracefully release the process public: - + Signal_Handler (void); int handle_signal(int signum, siginfo_t*,ucontext_t*); @@ -45,11 +45,11 @@ class Sender_Callback : public TAO_AV_Callback // Defines a class for the sender application callback. // // = DESCRIPTION - // This class overides the methods of the TAO_AV_Callback so the + // This class overides the methods of the TAO_AV_Callback so the // AVStreams can make upcalls to the application. public: - + int handle_destroy (void); /// Called when the sender has finished reading the file and wants /// to close down the connection. Also called when the distributer @@ -58,7 +58,7 @@ public: ACE_CString &flowname (void); void flowname (const ACE_CString &flowname); /// Accessor methods for the flowname of the callback - + private: ACE_CString flowname_; /// Flowname of the callback. @@ -109,14 +109,14 @@ public: ~Sender (void); /// Destructor - void shut_down (CORBA::Environment &); + void shut_down (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); int init (int argc, - char **argv, - CORBA::Environment&); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); /// Method to initialize the various data components. - int pace_data (CORBA::Environment &); + int pace_data (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); /// Method to pace and send data from a file. Connection_Manager &connection_manager (void); @@ -152,10 +152,10 @@ private: Connection_Manager connection_manager_; /// Connection manager. - + // int stream_count_; /// Teh count of the number of streams that are active - + Signal_Handler signal_handler_; /// Reference to the signal handler. }; diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp index a64c2ff9856..ab852c5c2de 100644 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/ftp.cpp @@ -49,9 +49,9 @@ FTP_Client_Callback::handle_timeout (void *) { ACE_DEBUG ((LM_DEBUG,"handle_timeout:End of file\n")); AVStreams::flowSpec stop_spec (1); - CLIENT::instance ()->streamctrl ()->stop (stop_spec,ACE_TRY_ENV); + CLIENT::instance ()->streamctrl ()->stop (stop_spec TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - //CLIENT::instance ()->streamctrl ()->destroy (stop_spec,ACE_TRY_ENV); + //CLIENT::instance ()->streamctrl ()->destroy (stop_spec TAO_ENV_ARG_PARAMETER); TAO_AV_CORE::instance ()->orb ()->shutdown (0); ACE_TRY_CHECK; return 0; @@ -192,7 +192,7 @@ Client::Client (void) int Client::bind_to_server (void) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { @@ -207,13 +207,13 @@ Client::bind_to_server (void) server_mmdevice_name.length (1); server_mmdevice_name [0].id = CORBA::string_dup ("Server_MMDevice"); CORBA::Object_var server_mmdevice_obj = - my_naming_client_->resolve (server_mmdevice_name, - ACE_TRY_ENV); + my_naming_client_->resolve (server_mmdevice_name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; this->server_mmdevice_ = - AVStreams::MMDevice::_narrow (server_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (server_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (this->server_mmdevice_.in ())) @@ -238,7 +238,7 @@ Client::init (int argc,char **argv) this->argv_ = argv; CORBA::String_var ior; - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { @@ -261,12 +261,12 @@ Client::init (int argc,char **argv) "Data"); this->fdev_->flowname (this->flowname ()); - AVStreams::MMDevice_var mmdevice = this->client_mmdevice_._this (ACE_TRY_ENV); + AVStreams::MMDevice_var mmdevice = this->client_mmdevice_._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - AVStreams::FDev_var fdev = this->fdev_->_this (ACE_TRY_ENV); + AVStreams::FDev_var fdev = this->fdev_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mmdevice->add_fdev (fdev.in (), - ACE_TRY_ENV); + mmdevice->add_fdev (fdev.in () + TAO_ENV_ARG_PARAMETER); if (this->my_naming_client_.init (this->orb_.in ()) != 0) ACE_ERROR_RETURN ((LM_ERROR, @@ -299,7 +299,7 @@ Client::init (int argc,char **argv) int Client::run (void) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { char flow_protocol_str [BUFSIZ]; @@ -324,16 +324,16 @@ Client::run (void) timer.start (); AVStreams::MMDevice_var client_mmdevice - = this->client_mmdevice_._this (ACE_TRY_ENV); + = this->client_mmdevice_._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + // Bind the client and server mmdevices. CORBA::Boolean result = this->streamctrl_.bind_devs (client_mmdevice.in (), this->server_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); timer.stop (); timer.elapsed_time (elapsed); elapsed.dump (); @@ -341,12 +341,12 @@ Client::run (void) if (result == 0) ACE_ERROR_RETURN ((LM_ERROR,"streamctrl::bind_devs failed\n"),-1); AVStreams::flowSpec start_spec (1); - this->streamctrl_.start (start_spec,ACE_TRY_ENV); + this->streamctrl_.start (start_spec TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Schedule a timer for the for the flow handler. ACE_Time_Value tv (10000,0); - this->orb_->run (tv, ACE_TRY_ENV); + this->orb_->run (tv TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); @@ -366,21 +366,21 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); TAO_AV_CORE::instance ()->init (orb.in (), - poa.in (), - ACE_TRY_ENV); + poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -390,10 +390,10 @@ main (int argc, ACE_ERROR_RETURN ((LM_ERROR,"client::init failed\n"),1); result = CLIENT::instance ()->run (); - poa->destroy (1, 1, ACE_TRY_ENV); + poa->destroy (1, 1 TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (result < 0) diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp b/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp index d396833b908..aac3bf6209c 100644 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/server.cpp @@ -10,11 +10,11 @@ FTP_Server_FlowEndPoint::FTP_Server_FlowEndPoint (void) protocols [0] = CORBA::string_dup ("TCP"); protocols [1] = CORBA::string_dup ("UDP"); protocols [2] = CORBA::string_dup ("RTP/UDP"); - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { - this->set_protocol_restriction (protocols, - ACE_TRY_ENV); + this->set_protocol_restriction (protocols + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -103,7 +103,7 @@ int Server::init (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { PortableServer::POAManager_var mgr @@ -133,10 +133,10 @@ Server::init (int argc, this->fdev_->flowname ("Data"); - AVStreams::MMDevice_var mmdevice = this->mmdevice_->_this (ACE_TRY_ENV); + AVStreams::MMDevice_var mmdevice = this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - AVStreams::FDev_var fdev = this->fdev_->_this (ACE_TRY_ENV); + AVStreams::FDev_var fdev = this->fdev_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (fdev.in ())) @@ -145,7 +145,7 @@ Server::init (int argc, if (CORBA::is_nil (mmdevice.in ())) cout << "MMDevice is nil" << endl; - mmdevice->add_fdev (fdev.in (), ACE_TRY_ENV); + mmdevice->add_fdev (fdev.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Register the mmdevice with the naming service. @@ -155,8 +155,8 @@ Server::init (int argc, // Register the video control object with the naming server. this->my_naming_client_->rebind (server_mmdevice_name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -172,10 +172,10 @@ Server::init (int argc, int Server::run (void) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { - this->orb_->run (ACE_TRY_ENV); + this->orb_->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -226,22 +226,22 @@ main (int argc, char **argv) { int result = 0; - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); TAO_AV_CORE::instance ()->init (orb.in (), - poa.in (), - ACE_TRY_ENV); + poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp b/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp index fcfa07ea215..6f7c7af972f 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Latency/control.cpp @@ -85,7 +85,7 @@ int main (int argc, char *argv[]) argv); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa @@ -97,8 +97,8 @@ int main (int argc, char *argv[]) mgr->activate (); TAO_AV_CORE::instance ()->init (orb.in (), - poa.in (), - ACE_TRY_ENV); + poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Connect the two streams and run them... @@ -128,19 +128,19 @@ int main (int argc, char *argv[]) TAO_StreamCtrl stream_control_impl; AVStreams::StreamCtrl_var stream_control = - stream_control_impl._this (ACE_TRY_ENV); + stream_control_impl._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - obj = orb->string_to_object (ping_ior, ACE_TRY_ENV); + obj = orb->string_to_object (ping_ior TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; AVStreams::MMDevice_var ping_sender = - AVStreams::MMDevice::_narrow (obj.in (), ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - obj = orb->string_to_object (pong_ior, ACE_TRY_ENV); + obj = orb->string_to_object (pong_ior TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; AVStreams::MMDevice_var pong_sender = - AVStreams::MMDevice::_narrow (obj.in (), ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (obj.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; AVStreams::streamQoS_var the_qos = @@ -149,29 +149,29 @@ int main (int argc, char *argv[]) stream_control->bind_devs (pong_sender.in (), ping_sender.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; flow_spec.length (0); - stream_control->start (flow_spec, ACE_TRY_ENV); + stream_control->start (flow_spec TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_Time_Value tv (100, 0); - orb->run (tv, ACE_TRY_ENV); + orb->run (tv TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); // flow_spec.length (0); - // stream_control->stop (flow_spec, ACE_TRY_ENV); + // stream_control->stop (flow_spec TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY { ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Catched exception:"); + "Caught exception:"); return 1; } ACE_ENDTRY; diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/ping.cpp b/TAO/orbsvcs/tests/AVStreams/Latency/ping.cpp index 98d415865df..3a061df9629 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/ping.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Latency/ping.cpp @@ -101,7 +101,7 @@ int main (int argc, char *argv[]) argv); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa @@ -113,8 +113,8 @@ int main (int argc, char *argv[]) mgr->activate (); TAO_AV_CORE::instance ()->init (orb.in (), - poa.in (), - ACE_TRY_ENV); + poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Register the video mmdevice object with the ORB @@ -129,11 +129,11 @@ int main (int argc, char *argv[]) 1); AVStreams::MMDevice_var mmdevice = - mmdevice_impl->_this (ACE_TRY_ENV); + mmdevice_impl->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::String_var ior = - orb->object_to_string (mmdevice.in (), ACE_TRY_ENV); + orb->object_to_string (mmdevice.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ())); @@ -161,18 +161,18 @@ int main (int argc, char *argv[]) 1); AVStreams::FDev_var ping_fdev = - ping_fdev_impl->_this (ACE_TRY_ENV); + ping_fdev_impl->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; AVStreams::FDev_var pong_fdev = - pong_fdev_impl->_this (ACE_TRY_ENV); + pong_fdev_impl->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mmdevice->add_fdev (ping_fdev.in (), ACE_TRY_ENV); + mmdevice->add_fdev (ping_fdev.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (respond == 1) { - mmdevice->add_fdev (pong_fdev.in (), ACE_TRY_ENV); + mmdevice->add_fdev (pong_fdev.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } @@ -190,7 +190,7 @@ int main (int argc, char *argv[]) ACE_CATCHANY { ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Catched exception:"); + "Caught exception:"); return 1; } ACE_ENDTRY; diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/pong.cpp b/TAO/orbsvcs/tests/AVStreams/Latency/pong.cpp index bd50c1f2842..2ab4114cd1e 100644 --- a/TAO/orbsvcs/tests/AVStreams/Latency/pong.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Latency/pong.cpp @@ -118,7 +118,7 @@ int main (int argc, char *argv[]) argv); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa @@ -130,8 +130,8 @@ int main (int argc, char *argv[]) mgr->activate (); TAO_AV_CORE::instance ()->init (orb.in (), - poa.in (), - ACE_TRY_ENV); + poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; Reactive_Strategy *reactive_strategy; @@ -145,11 +145,11 @@ int main (int argc, char *argv[]) 1); AVStreams::MMDevice_var mmdevice = - mmdevice_impl->_this (ACE_TRY_ENV); + mmdevice_impl->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::String_var ior = - orb->object_to_string (mmdevice.in (), ACE_TRY_ENV); + orb->object_to_string (mmdevice.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ())); @@ -177,17 +177,17 @@ int main (int argc, char *argv[]) 1); AVStreams::FDev_var ping_fdev = - ping_fdev_impl->_this (ACE_TRY_ENV); + ping_fdev_impl->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; AVStreams::FDev_var pong_fdev = - pong_fdev_impl->_this (ACE_TRY_ENV); + pong_fdev_impl->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mmdevice->add_fdev (ping_fdev.in (), ACE_TRY_ENV); + mmdevice->add_fdev (ping_fdev.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (respond == 1) { - mmdevice->add_fdev (pong_fdev.in (), ACE_TRY_ENV); + mmdevice->add_fdev (pong_fdev.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } @@ -208,7 +208,7 @@ int main (int argc, char *argv[]) ACE_CATCHANY { ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Catched exception:"); + "Caught exception:"); return 1; } ACE_ENDTRY; diff --git a/TAO/orbsvcs/tests/AVStreams/Modify_QoS/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Modify_QoS/receiver.cpp index 6210c289a7b..027a15f2ee3 100644 --- a/TAO/orbsvcs/tests/AVStreams/Modify_QoS/receiver.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Modify_QoS/receiver.cpp @@ -1,4 +1,4 @@ -// $Id$ +// $Id$ #include "receiver.h" #include "ace/Get_Opt.h" @@ -25,13 +25,13 @@ Receiver_StreamEndPoint::get_callback (const char *, ACE_TRY_NEW_ENV { CORBA::Any_ptr streamctrl_any = - this->get_property_value ("Related_StreamCtrl", - ACE_TRY_ENV); + this->get_property_value ("Related_StreamCtrl" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + AVStreams::StreamCtrl_ptr streamctrl; *streamctrl_any >>= streamctrl; - + // Store the stream control for the stream with the callback. this->callback_.streamctrl (streamctrl); } @@ -39,11 +39,11 @@ Receiver_StreamEndPoint::get_callback (const char *, { ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Sender_StreamEndPoint::get_callback failed"); - + return -1; } ACE_ENDTRY; - + return 0; } @@ -73,7 +73,7 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, ACE_DEBUG ((LM_DEBUG, "Receiver_Callback::receive_frame for frame %d\n", ++this->frame_count_)); - + if (this->streamctrl_ != 0) { @@ -86,27 +86,27 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, "", "", 0); - + AVStreams::flowSpec flow_spec (1); flow_spec.length (1); flow_spec [0] = CORBA::string_dup (entry.entry_to_string ()); - - // Initialize the qos parameter(s) that need to be changed + + // Initialize the qos parameter(s) that need to be changed // with the corresponding value. AVStreams::streamQoS qos; qos.length (1); - + // The QoS Type that needs to be changed. qos [0].QoSType = CORBA::string_dup ("video_qos"); - + qos [0].QoSParams.length (1); qos [0].QoSParams [0].property_name = CORBA::string_dup ("video_frame_rate"); qos [0].QoSParams [0].property_value <<= (CORBA::Short) 30; ACE_DECLARE_NEW_CORBA_ENV; - + // Initiate the modifying of the qos for the flows. - this->streamctrl_->modify_QoS (qos, flow_spec, ACE_TRY_ENV); + this->streamctrl_->modify_QoS (qos, flow_spec TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); ACE_DEBUG ((LM_DEBUG, @@ -115,7 +115,7 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, } else ACE_DEBUG ((LM_DEBUG, "No Stream Ctrl\n")); - + while (frame != 0) { // Write the received data to the file. @@ -145,8 +145,8 @@ Receiver_Callback::handle_destroy (void) ACE_TRY_NEW_ENV { - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -174,8 +174,8 @@ Receiver::~Receiver (void) int Receiver::init (int, - char **, - CORBA::Environment &ACE_TRY_ENV) + char ** + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -194,7 +194,7 @@ Receiver::init (int, this->mmdevice_; CORBA::Object_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Register the mmdevice with the naming service. @@ -212,8 +212,8 @@ Receiver::init (int, // Register the receiver object with the naming server. this->naming_client_->rebind (name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -250,39 +250,39 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize the ORB first. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; int result = @@ -308,20 +308,20 @@ main (int argc, Receiver receiver; result = receiver.init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result != 0) return result; - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Hack for now.... ACE_OS::sleep (1); - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Modify_QoS/receiver.h b/TAO/orbsvcs/tests/AVStreams/Modify_QoS/receiver.h index 9fba843cfa1..11e76614d32 100644 --- a/TAO/orbsvcs/tests/AVStreams/Modify_QoS/receiver.h +++ b/TAO/orbsvcs/tests/AVStreams/Modify_QoS/receiver.h @@ -6,7 +6,7 @@ * @file receiver.h * * receiver.h,v 1.1 2001/04/15 02:56:26 yamuna Exp - * + * * @author Yamuna Krishnamurthy <yamuna@cs.wustl.edu> */ //============================================================================= @@ -36,14 +36,14 @@ public: /// Set the related stream control for this flow. void streamctrl (AVStreams::StreamCtrl_ptr streamctrl); - + private: int frame_count_; /// Keeping a count of the incoming frames. - + /// Related stream control. AVStreams::StreamCtrl_ptr streamctrl_; - + }; // = AVStreams calls this class during connection setup. @@ -54,7 +54,7 @@ public: /// Create a receiver application callback. int get_callback (const char *flowname, TAO_AV_Callback *&callback); - + private: Receiver_Callback callback_; /// Receiver application callback. @@ -71,11 +71,11 @@ public: /// Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); /// Initialize data components. - - + + protected: TAO_Naming_Client naming_client_; /// The Naming Service Client. diff --git a/TAO/orbsvcs/tests/AVStreams/Modify_QoS/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Modify_QoS/sender.cpp index 3a73cc54205..b06449a23e8 100644 --- a/TAO/orbsvcs/tests/AVStreams/Modify_QoS/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Modify_QoS/sender.cpp @@ -33,15 +33,15 @@ Sender_StreamEndPoint::set_protocol_object (const char *, CORBA::Boolean Sender_StreamEndPoint::modify_QoS (AVStreams::streamQoS &new_qos, - const AVStreams::flowSpec &/* the_flows */, - CORBA::Environment &/* ACE_TRY_ENV */) + const AVStreams::flowSpec &/* the_flows */ + TAO_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC((CORBA::SystemException, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed )) { ACE_DEBUG ((LM_DEBUG, "Sender_StreamEndPoint::modify_QoS\n")); - + // Check if the qos for the flow has changed. if (new_qos.length () != 0) { @@ -53,10 +53,10 @@ Sender_StreamEndPoint::modify_QoS (AVStreams::streamQoS &new_qos, // Get the new value of the frame rate. CORBA::Any frame_rate_any = new_qos [0].QoSParams [0].property_value; - + CORBA::Short frame_rate; frame_rate_any >>= frame_rate; - + // Calculate the new inter frame time. inter_frame_time.set (1 / (double) frame_rate); } @@ -119,7 +119,7 @@ Sender::parse_args (int argc, // Method to get the object reference of the receiver int -Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) +Sender::bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL) { CosNaming::Name name (1); name.length (1); @@ -128,13 +128,13 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) // Resolve the receiver object reference from the Naming Service CORBA::Object_var receiver_mmdevice_obj = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->receiver_mmdevice_ = - AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (CORBA::is_nil (this->receiver_mmdevice_.in ())) @@ -147,8 +147,8 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) int Sender::init (int argc, - char **argv, - CORBA::Environment &ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -185,9 +185,9 @@ Sender::init (int argc, "File opened successfully\n")); // Resolve the object reference of the receiver from the Naming Service. - result = this->bind_to_receiver (ACE_TRY_ENV); + result = this->bind_to_receiver (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) Error binding to the naming service\n"), @@ -219,7 +219,7 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->streamctrl_, @@ -234,8 +234,8 @@ Sender::init (int argc, this->streamctrl_->bind_devs (mmdevice.in (), this->receiver_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (bind_result == 0) @@ -248,7 +248,7 @@ Sender::init (int argc, // Method to send data at the specified rate int -Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) +Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL) { @@ -324,8 +324,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Run the orb for the wait time so the sender can // continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -354,13 +354,11 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // File reading is complete, destroy the stream. AVStreams::flowSpec stop_spec; - this->streamctrl_->destroy (stop_spec, - ACE_TRY_ENV); + this->streamctrl_->destroy (stop_spec TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + // Shut the orb down. - TAO_AV_CORE::instance ()->orb ()->shutdown (1, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->shutdown (1 TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -377,44 +375,44 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AV Stream components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Sender. int result = 0; result = SENDER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result < 0) @@ -423,7 +421,7 @@ main (int argc, -1); // Start sending data. - result = SENDER::instance ()->pace_data (ACE_TRY_ENV); + result = SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } diff --git a/TAO/orbsvcs/tests/AVStreams/Modify_QoS/sender.h b/TAO/orbsvcs/tests/AVStreams/Modify_QoS/sender.h index 9f3b47cd9a8..21ea6e49778 100644 --- a/TAO/orbsvcs/tests/AVStreams/Modify_QoS/sender.h +++ b/TAO/orbsvcs/tests/AVStreams/Modify_QoS/sender.h @@ -5,7 +5,7 @@ * @file sender.h * * $Id$ - * + * * @author Yamuna Krishnamurthy <yamuna@cs.wustl.edu> */ //============================================================================= @@ -28,13 +28,13 @@ class Sender_StreamEndPoint : public TAO_Client_StreamEndPoint TAO_AV_Protocol_Object *object); /// Set protocol object corresponding to the transport protocol /// chosen. - + CORBA::Boolean modify_QoS (AVStreams::streamQoS &new_qos, - const AVStreams::flowSpec &flow_spec, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC((CORBA::SystemException, - AVStreams::noSuchFlow, - AVStreams::QoSRequestFailed )); + const AVStreams::flowSpec &flow_spec + TAO_ENV_ARG_DECL) + ACE_THROW_SPEC((CORBA::SystemException, + AVStreams::noSuchFlow, + AVStreams::QoSRequestFailed )); /// The over-ridden modify_qos method to change the qos of the /// flows specified in the flow spec to that in the new_qos. @@ -64,11 +64,11 @@ public: /// Constructor int init (int argc, - char **argv, - CORBA::Environment&); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); /// Method to initialize the various data components. - int pace_data (CORBA::Environment &); + int pace_data (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); /// Method to pace and send data from a file. void protocol_object (TAO_AV_Protocol_Object *protocol_object); @@ -78,7 +78,7 @@ private: int parse_args (int argc, char **argv); /// Method to parse the command line arguments. - int bind_to_receiver (CORBA::Environment& ACE_TRY_ENV); + int bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL); /// Method that binds the sender to the receiver. SENDER_ENDPOINT_STRATEGY endpoint_strategy_; diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp index 2d8f75ff7a7..0161ba2d659 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast/ftp.cpp @@ -53,10 +53,10 @@ FTP_Client_Callback::handle_timeout (void *) { ACE_DEBUG ((LM_DEBUG,"handle_timeout:End of file\n")); AVStreams::flowSpec stop_spec (1); - //ACE_DECLARE_NEW_CORBA_ENV; - CLIENT::instance ()->streamctrl ()->stop (stop_spec,ACE_TRY_ENV); + //TAO_ENV_DECLARE_NEW_ENV; + CLIENT::instance ()->streamctrl ()->stop (stop_spec TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; -// CLIENT::instance ()->streamctrl ()->destroy (stop_spec,ACE_TRY_ENV); +// CLIENT::instance ()->streamctrl ()->destroy (stop_spec TAO_ENV_ARG_PARAMETER); // ACE_TRY_CHECK; TAO_AV_CORE::instance ()->orb ()->shutdown (0); ACE_TRY_CHECK; @@ -186,7 +186,7 @@ Client::Client (void) int Client::bind_to_server (const char *name) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { @@ -195,13 +195,13 @@ Client::bind_to_server (const char *name) server_mmdevice_name.length (1); server_mmdevice_name [0].id = name; CORBA::Object_var server_mmdevice_obj = - my_naming_client_->resolve (server_mmdevice_name, - ACE_TRY_ENV); + my_naming_client_->resolve (server_mmdevice_name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; this->server_mmdevice_ = - AVStreams::MMDevice::_narrow (server_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (server_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (this->server_mmdevice_.in ())) @@ -252,7 +252,7 @@ Client::init (int argc,char **argv) int Client::run (void) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { char flow_protocol_str [BUFSIZ]; @@ -280,16 +280,16 @@ Client::run (void) flow_spec [0] = entry.entry_to_string (); flow_spec.length (1); - AVStreams::MMDevice_var client_mmdevice - = this->client_mmdevice_._this (ACE_TRY_ENV); + AVStreams::MMDevice_var client_mmdevice + = this->client_mmdevice_._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Boolean result = this->streamctrl_.bind_devs (client_mmdevice.in (), AVStreams::MMDevice::_nil (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (this->bind_to_server ("Server_MMDevice1") == -1) ACE_ERROR_RETURN ((LM_ERROR, @@ -298,8 +298,8 @@ Client::run (void) result = this->streamctrl_.bind_devs (AVStreams::MMDevice::_nil (), this->server_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (this->bind_to_server ("Server_MMDevice2") == -1) ACE_ERROR_RETURN ((LM_ERROR, @@ -308,8 +308,8 @@ Client::run (void) result = this->streamctrl_.bind_devs (AVStreams::MMDevice::_nil (), this->server_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result == 0) @@ -317,13 +317,13 @@ Client::run (void) AVStreams::flowSpec start_spec (1); start_spec.length (1); start_spec [0] = CORBA::string_dup (this->flowname_); - this->streamctrl_.start (start_spec,ACE_TRY_ENV); + this->streamctrl_.start (start_spec TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Schedule a timer for the for the flow handler. //TAO_AV_CORE::instance ()->run (); ACE_Time_Value tv (10000,0); - TAO_AV_CORE::instance ()->orb ()->run (tv, ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (tv TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); @@ -344,21 +344,21 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); TAO_AV_CORE::instance ()->init (orb.in (), - poa.in (), - ACE_TRY_ENV); + poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; int result = 0; diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast/server.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast/server.cpp index 4c5f0ec212d..4fa4582f4b2 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast/server.cpp @@ -65,7 +65,7 @@ int Server::init (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { @@ -94,23 +94,23 @@ Server::init (int argc, CosNaming::Name server_mmdevice_name (1); server_mmdevice_name.length (1); server_mmdevice_name [0].id = CORBA::string_dup ("Server_MMDevice1"); - AVStreams::MMDevice_var mmdevice = this->mmdevice_->_this (ACE_TRY_ENV); + AVStreams::MMDevice_var mmdevice = this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; ACE_TRY_EX (bind) { // Register the video control object with the naming server. this->my_naming_client_->bind (server_mmdevice_name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX (bind); } ACE_CATCH (CosNaming::NamingContext::AlreadyBound,al_ex) { server_mmdevice_name [0].id = CORBA::string_dup ("Server_MMDevice2"); this->my_naming_client_->bind (server_mmdevice_name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_ENDTRY; @@ -129,10 +129,10 @@ Server::init (int argc, int Server::run (void) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { - TAO_AV_CORE::instance ()->orb ()->run (ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -186,20 +186,20 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); TAO_AV_CORE::instance ()->init (orb.in (), - poa.in (), - ACE_TRY_ENV); + poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp index 50247d880d6..d624906a378 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/ftp.cpp @@ -48,10 +48,10 @@ FTP_Client_Callback::handle_timeout (void *) { ACE_DEBUG ((LM_DEBUG,"handle_timeout:End of file\n")); AVStreams::flowSpec stop_spec (1); - //ACE_DECLARE_NEW_CORBA_ENV; - CLIENT::instance ()->streamctrl ()->stop (stop_spec,ACE_TRY_ENV); + //TAO_ENV_DECLARE_NEW_ENV; + CLIENT::instance ()->streamctrl ()->stop (stop_spec TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - // CLIENT::instance ()->streamctrl ()->destroy (stop_spec,ACE_TRY_ENV); + // CLIENT::instance ()->streamctrl ()->destroy (stop_spec TAO_ENV_ARG_PARAMETER); //ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "Just before Orb Shutdown\n")); TAO_AV_CORE::instance ()->orb ()->shutdown (0); @@ -196,7 +196,7 @@ Client::Client (void) int Client::bind_to_server (const char *name) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { @@ -211,13 +211,13 @@ Client::bind_to_server (const char *name) server_mmdevice_name.length (1); server_mmdevice_name [0].id = name; CORBA::Object_var server_mmdevice_obj = - my_naming_client_->resolve (server_mmdevice_name, - ACE_TRY_ENV); + my_naming_client_->resolve (server_mmdevice_name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; this->server_mmdevice_ = - AVStreams::MMDevice::_narrow (server_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (server_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (this->server_mmdevice_.in ())) @@ -241,7 +241,7 @@ Client::init (int argc,char **argv) this->argc_ = argc; this->argv_ = argv; - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { PortableServer::POAManager_var mgr @@ -263,12 +263,12 @@ Client::init (int argc,char **argv) ACE_OS::sprintf (this->flowname_, "Data"); this->fdev_->flowname (this->flowname ()); - AVStreams::MMDevice_var mmdevice = this->client_mmdevice_._this (ACE_TRY_ENV); + AVStreams::MMDevice_var mmdevice = this->client_mmdevice_._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - AVStreams::FDev_var fdev = this->fdev_->_this (ACE_TRY_ENV); + AVStreams::FDev_var fdev = this->fdev_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mmdevice->add_fdev (fdev.in (), - ACE_TRY_ENV); + mmdevice->add_fdev (fdev.in () + TAO_ENV_ARG_PARAMETER); if (this->my_naming_client_.init (TAO_AV_CORE::instance ()->orb ()) != 0) ACE_ERROR_RETURN ((LM_ERROR, @@ -295,7 +295,7 @@ Client::init (int argc,char **argv) int Client::run (void) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { char flow_protocol_str [BUFSIZ]; @@ -316,17 +316,17 @@ Client::run (void) &addr); flow_spec [0] = CORBA::string_dup (entry.entry_to_string ()); flow_spec.length (1); - + AVStreams::MMDevice_var client_mmdevice = - this->client_mmdevice_._this (ACE_TRY_ENV); + this->client_mmdevice_._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Boolean result = this->streamctrl_.bind_devs (client_mmdevice.in (), AVStreams::MMDevice::_nil (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "Suuceessful ONE\n")); if (result == 0) @@ -338,8 +338,8 @@ Client::run (void) result = this->streamctrl_.bind_devs (AVStreams::MMDevice::_nil (), this->server_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "Suuceessful TWO\n")); @@ -354,8 +354,8 @@ Client::run (void) result = this->streamctrl_.bind_devs (AVStreams::MMDevice::_nil (), this->server_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "Suuceessful THREE\n")); if (result == 0) @@ -363,13 +363,13 @@ Client::run (void) AVStreams::flowSpec start_spec (1); start_spec.length (1); start_spec [0] = CORBA::string_dup (this->flowname_); - this->streamctrl_.start (start_spec,ACE_TRY_ENV); + this->streamctrl_.start (start_spec TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Schedule a timer for the for the flow handler. //TAO_AV_CORE::instance ()->run (); ACE_Time_Value tv (10000,0); - TAO_AV_CORE::instance ()->orb ()->run (tv, ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (tv TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); @@ -394,20 +394,20 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); TAO_AV_CORE::instance ()->init (orb.in (), - poa.in (), - ACE_TRY_ENV); + poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp index c639a4897f8..5c1275ac3bd 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.cpp @@ -9,11 +9,11 @@ FTP_Server_FlowEndPoint::FTP_Server_FlowEndPoint (void) protocols.length (2); protocols [0] = CORBA::string_dup ("TCP"); protocols [1] = CORBA::string_dup ("UDP"); - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { - this->set_protocol_restriction (protocols, - ACE_TRY_ENV); + this->set_protocol_restriction (protocols + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -82,14 +82,14 @@ FTP_Server_Callback::handle_end_stream (void) // AVStreams::QoS & the_qos, // CORBA::Boolean_out met_qos, // char *& named_fdev, -// CORBA::Environment &ACE_TRY_ENV) +// TAO_ENV_SINGLE_ARG_DECL) // { // ACE_DEBUG ((LM_DEBUG,"FTP_Server_FDev::make_consumer")); // FTP_Server_FlowEndPoint *endpoint; // ACE_NEW_RETURN (endpoint, // FTP_Server_FlowEndPoint, // 0); -// return endpoint->_this (ACE_TRY_ENV); +// return endpoint->_this (TAO_ENV_SINGLE_ARG_PARAMETER); // ACE_CHECK_RETURN (0); // } @@ -119,7 +119,7 @@ int Server::init (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { @@ -148,12 +148,12 @@ Server::init (int argc, FTP_Server_FDev, -1); this->fdev_->flowname ("Data"); - AVStreams::MMDevice_var mmdevice = this->mmdevice_->_this (ACE_TRY_ENV); + AVStreams::MMDevice_var mmdevice = this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - AVStreams::FDev_var fdev = this->fdev_->_this (ACE_TRY_ENV); + AVStreams::FDev_var fdev = this->fdev_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mmdevice->add_fdev (fdev.in (), - ACE_TRY_ENV); + mmdevice->add_fdev (fdev.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Register the mmdevice with the naming service. @@ -164,16 +164,16 @@ Server::init (int argc, { // Register the video control object with the naming server. this->my_naming_client_->bind (server_mmdevice_name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK_EX (bind); } ACE_CATCH (CosNaming::NamingContext::AlreadyBound,al_ex) { server_mmdevice_name [0].id = CORBA::string_dup ("Server_MMDevice2"); this->my_naming_client_->bind (server_mmdevice_name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_ENDTRY; @@ -192,10 +192,10 @@ Server::init (int argc, int Server::run (void) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { - TAO_AV_CORE::instance ()->orb ()->run (ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -249,20 +249,20 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = PortableServer::POA::_narrow (obj.in ()); TAO_AV_CORE::instance ()->init (orb.in (), - poa.in (), - ACE_TRY_ENV); + poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.h b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.h index 74c5b78db9f..7faf6c5e555 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.h +++ b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/server.h @@ -39,7 +39,7 @@ public: // AVStreams::QoS & the_qos, // CORBA::Boolean_out met_qos, // char *& named_fdev, -// CORBA::Environment &env = CORBA::Environment::default_environment ()); +// TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); // // bridge method for the application to override the consumer object // // creation. Default implementation creates a TAO_FlowConsumer. diff --git a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.cpp index 4106f1c5e07..2219157b301 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.cpp @@ -15,9 +15,9 @@ Receiver_StreamEndPoint::get_callback (const char *flow_name, { Receiver_Callback *callback_; ACE_NEW_RETURN (callback_, - Receiver_Callback, - -1); - + Receiver_Callback, + -1); + // Return the receiver application callback to the AVStreams for // future upcalls. callback = callback_; @@ -28,7 +28,7 @@ Receiver_StreamEndPoint::get_callback (const char *flow_name, int Receiver_StreamEndPoint::set_protocol_object (const char * flowname, - TAO_AV_Protocol_Object *object) + TAO_AV_Protocol_Object *object) { // Set the sender protocol object corresponding to the transport // protocol selected. @@ -42,28 +42,28 @@ Receiver_Callback::Receiver_Callback (void) mb_ (BUFSIZ) { ACE_DEBUG ((LM_DEBUG, - "Receiver_Callback::Receiver_Callback\n")); + "Receiver_Callback::Receiver_Callback\n")); } void Receiver_Callback::flowname (const char* flow_name) { this->flowname_ = flow_name; - + // Make sure we have a valid <output_file> this->output_file_ = ACE_OS::fopen (this->flowname_.c_str (), - "w"); + "w"); if (this->output_file_ == 0) ACE_ERROR ((LM_DEBUG, - "Cannot open output file %s\n", - this->flowname_.c_str ())); - + "Cannot open output file %s\n", + this->flowname_.c_str ())); + else ACE_DEBUG ((LM_DEBUG, - "%s File Opened Successfully\n", - this->flowname_.c_str ())); - - + "%s File Opened Successfully\n", + this->flowname_.c_str ())); + + } int @@ -78,7 +78,7 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, ACE_DEBUG ((LM_DEBUG, "Receiver_Callback::receive_frame for frame %d for flow %s\n", this->frame_count_++, - this->flowname_.c_str ())); + this->flowname_.c_str ())); while (frame != 0) { @@ -96,7 +96,7 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, frame = frame->cont (); } - + return 0; } @@ -135,7 +135,7 @@ Receiver::protocol_object (TAO_AV_Protocol_Object *object) int Receiver::parse_args (int argc, - char **argv) + char **argv) { // Parse command line arguments ACE_Get_Opt opts (argc, argv, "f:r:d"); @@ -164,8 +164,8 @@ Receiver::parse_args (int argc, int Receiver::init (int argc, - char ** argv, - CORBA::Environment &ACE_TRY_ENV) + char ** argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -180,7 +180,7 @@ Receiver::init (int argc, argv); if (result != 0) return result; - + // Register the receiver mmdevice object with the ORB ACE_NEW_RETURN (this->mmdevice_, @@ -192,7 +192,7 @@ Receiver::init (int argc, this->mmdevice_; CORBA::Object_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Register the mmdevice with the naming service. @@ -210,8 +210,8 @@ Receiver::init (int argc, // Register the receiver object with the naming server. this->naming_client_->rebind (name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -234,53 +234,53 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; int result = RECEIVER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + if (result != 0) return result; - + while (endstream != 2) - { - orb->perform_work (ACE_TRY_ENV); - ACE_TRY_CHECK; - } + { + orb->perform_work (TAO_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } // Hack for now.... ACE_OS::sleep (1); - - orb->destroy (ACE_TRY_ENV); + + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.h b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.h index 45d6b6586a4..b15d676d68f 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.h +++ b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/receiver.h @@ -47,11 +47,11 @@ public: int handle_destroy (void); void flowname (const char*); - + private: int frame_count_; // Keeping a count of the incoming frames. - + ACE_Message_Block mb_; // Message block into which data is read from a file and then sent. @@ -96,8 +96,8 @@ public: // Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Initialize data components. void protocol_object (TAO_AV_Protocol_Object *protocol_object); @@ -128,7 +128,7 @@ protected: ACE_CString filename_; // File from which data is read. - + int parse_args (int argc, char **argv); // Method to parse the command line arguments. diff --git a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/run_test.pl index 3f07d66d5c9..6d63232651b 100755 --- a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/run_test.pl +++ b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/run_test.pl @@ -28,7 +28,7 @@ $NS->Spawn (); if (PerlACE::waitforfile_timed ($nsior, 5) == -1) { print STDERR "ERROR: cannot find naming service IOR file\n"; - $NS->Kill (); + $NS->Kill (); exit 1; } diff --git a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp index fbdb0919dbb..52d9ea10836 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.cpp @@ -55,15 +55,15 @@ Sender::shutdown (void) ACE_DECLARE_NEW_CORBA_ENV; // File reading is complete, destroy the stream. AVStreams::flowSpec stop_spec; - this->streamctrl_->destroy (stop_spec, - ACE_TRY_ENV); + this->streamctrl_->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + // Shut the orb down. - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + } int @@ -100,7 +100,7 @@ Sender::parse_args (int argc, // Method to get the object reference of the receiver int -Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) +Sender::bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL) { CosNaming::Name name (1); name.length (1); @@ -109,13 +109,13 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) // Resolve the receiver object reference from the Naming Service CORBA::Object_var receiver_mmdevice_obj = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->receiver_mmdevice_ = - AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (CORBA::is_nil (this->receiver_mmdevice_.in ())) @@ -128,8 +128,8 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) int Sender::init (int argc, - char **argv, - CORBA::Environment &ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -166,9 +166,9 @@ Sender::init (int argc, "File opened successfully\n")); // Resolve the object reference of the receiver from the Naming Service. - result = this->bind_to_receiver (ACE_TRY_ENV); + result = this->bind_to_receiver (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) Error binding to the naming service\n"), @@ -210,7 +210,7 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->streamctrl_, @@ -225,8 +225,8 @@ Sender::init (int argc, this->streamctrl_->bind_devs (mmdevice.in (), this->receiver_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (bind_result == 0) @@ -239,7 +239,7 @@ Sender::init (int argc, // Method to send data at the specified rate int -Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) +Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL) { // The time that should lapse between two consecutive frames sent. ACE_Time_Value inter_frame_time; @@ -316,8 +316,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Run the orb for the wait time so the sender can // continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -325,31 +325,31 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Start timer before sending the frame. elapsed_timer.start (); - ProtocolObject_SetItor end = this->protocol_object_.end (); - for (ProtocolObject_SetItor begin = this->protocol_object_.begin (); - begin != end; ++begin) - { - // Send frame. - int result = - (*begin)->send_frame (&this->mb_); - - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "send failed:%p", - "Sender::pace_data send\n"), - -1); - } - - + ProtocolObject_SetItor end = this->protocol_object_.end (); + for (ProtocolObject_SetItor begin = this->protocol_object_.begin (); + begin != end; ++begin) + { + // Send frame. + int result = + (*begin)->send_frame (&this->mb_); + + if (result < 0) + ACE_ERROR_RETURN ((LM_ERROR, + "send failed:%p", + "Sender::pace_data send\n"), + -1); + } + + ACE_DEBUG ((LM_DEBUG, "Sender::pace_data frame %d was sent succesfully\n", ++this->frame_count_)); - + // Reset the message block. this->mb_.reset (); - + } // end while - + this->shutdown (); } ACE_CATCHANY @@ -372,38 +372,38 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AV Stream components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Sender. int result = 0; result = SENDER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result < 0) @@ -412,7 +412,7 @@ main (int argc, -1); // Start sending data. - result = SENDER::instance ()->pace_data (ACE_TRY_ENV); + result = SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.h b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.h index a95d6827065..50e1c1fb481 100644 --- a/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.h +++ b/TAO/orbsvcs/tests/AVStreams/Multiple_Flows/sender.h @@ -65,11 +65,11 @@ public: // Constructor int init (int argc, - char **argv, - CORBA::Environment&); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Method to initialize the various data components. - int pace_data (CORBA::Environment &); + int pace_data (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); // Method to pace and send data from a file. void protocol_object (TAO_AV_Protocol_Object *protocol_object); @@ -81,7 +81,7 @@ private: int parse_args (int argc, char **argv); // Method to parse the command line arguments. - int bind_to_receiver (CORBA::Environment& ACE_TRY_ENV); + int bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL); // Method that binds the sender to the receiver. SENDER_ENDPOINT_STRATEGY endpoint_strategy_; @@ -119,5 +119,5 @@ private: ProtocolObject_Set protocol_object_; // Protocol object corresponding to the transport protocol selected. - + }; diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp b/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp index 354ea8d2b3a..969f9c8d451 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.cpp @@ -79,9 +79,9 @@ Client::parse_args (int argc, case 'p': this->protocol_ = ACE_OS::strdup (opts.optarg); break; - case 'r': - this->frame_rate_ = ACE_OS::atoi (opts.optarg); - break; + case 'r': + this->frame_rate_ = ACE_OS::atoi (opts.optarg); + break; case 's': this->use_sfp_ = 1; break; @@ -124,14 +124,14 @@ Client::frame_rate (void) // Method to get the object reference of the server int -Client::bind_to_server (CORBA::Environment &ACE_TRY_ENV) +Client::bind_to_server (TAO_ENV_SINGLE_ARG_DECL) { // Initialize the naming services if (my_naming_client_.init (TAO_AV_CORE::instance ()->orb ()) != 0) ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); + " (%P|%t) Unable to initialize " + "the TAO_Naming_Client. \n"), + -1); CosNaming::Name server_mmdevice_name (1); server_mmdevice_name.length (1); @@ -139,27 +139,27 @@ Client::bind_to_server (CORBA::Environment &ACE_TRY_ENV) // Resolve the server object reference from the Naming Service CORBA::Object_var server_mmdevice_obj = - my_naming_client_->resolve (server_mmdevice_name, - ACE_TRY_ENV); + my_naming_client_->resolve (server_mmdevice_name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->server_mmdevice_ = - AVStreams::MMDevice::_narrow (server_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (server_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (CORBA::is_nil (this->server_mmdevice_.in ())) ACE_ERROR_RETURN ((LM_ERROR, - "Could not resolve Server_MMdevice in Naming service <%s>\n"), - -1); + "Could not resolve Server_MMdevice in Naming service <%s>\n"), + -1); return 0; } int Client::init (int argc, - char **argv, - CORBA::Environment& ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { this->argc_ = argc; this->argv_ = argv; @@ -179,15 +179,15 @@ Client::init (int argc, // Open file to read. this->fp_ = ACE_OS::fopen (this->filename_, - "r"); + "r"); if (this->fp_ == 0) ACE_ERROR_RETURN ((LM_DEBUG, - "Cannot open output file %s\n", - this->filename_), - -1); + "Cannot open output file %s\n", + this->filename_), + -1); - result - = this->bind_to_server (ACE_TRY_ENV); + result + = this->bind_to_server (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Resolve the object reference of the server from the Naming Service. @@ -195,15 +195,15 @@ Client::init (int argc, ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) Error binding to the naming service\n"), -1); - + // Create the Flow protocol name char flow_protocol_str [BUFSIZ]; if (this->use_sfp_) ACE_OS::strcpy (flow_protocol_str, - "sfp:1.0"); + "sfp:1.0"); else ACE_OS::strcpy (flow_protocol_str, - ""); + ""); // Initialize the QoS AVStreams::streamQoS_var the_qos (new AVStreams::streamQoS); @@ -213,36 +213,36 @@ Client::init (int argc, // Initialize the flowname ACE_NEW_RETURN (this->flowname_, - char [BUFSIZ], - 0); + char [BUFSIZ], + 0); ACE_OS::sprintf (this->flowname_, - "Data_%s", - this->protocol_); + "Data_%s", + this->protocol_); // Create the forward flow specification to describe the flow. TAO_Forward_FlowSpec_Entry entry (this->flowname_, - "IN", - "USER_DEFINED", - flow_protocol_str, - this->protocol_, - &addr); + "IN", + "USER_DEFINED", + flow_protocol_str, + this->protocol_, + &addr); AVStreams::flowSpec flow_spec (1); flow_spec [0] = CORBA::string_dup (entry.entry_to_string ()); flow_spec.length (1); - AVStreams::MMDevice_var client_mmdevice = - this->client_mmdevice_._this (ACE_TRY_ENV); + AVStreams::MMDevice_var client_mmdevice = + this->client_mmdevice_._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Bind/Connect the client and server MMDevices. CORBA::Boolean bind_result = this->streamctrl_.bind_devs (client_mmdevice.in (), - this->server_mmdevice_.in (), - the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + this->server_mmdevice_.in (), + the_qos.inout (), + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (bind_result == 0) @@ -253,7 +253,7 @@ Client::init (int argc, // Method to send data at the specified rate int -Client::pace_data (CORBA::Environment& ACE_TRY_ENV) +Client::pace_data (TAO_ENV_SINGLE_ARG_DECL) { // Rate at which frames of data need to be sent. @@ -281,45 +281,45 @@ Client::pace_data (CORBA::Environment& ACE_TRY_ENV) // Continue to send data till the file is read to the end. while (1) - { + { // Count the frames sent. - count_++; + count_++; // Read from the file into a message block. - int n = ACE_OS::fread(this->mb.rd_ptr (), - 1, - this->mb.size (), - CLIENT::instance ()->file ()); - - if (n < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "FTP_Client_Flow_Handler::fread end of file\n"), - -1); - - if (n == 0) - { - if (feof (CLIENT::instance ()->file ())) - { + int n = ACE_OS::fread(this->mb.rd_ptr (), + 1, + this->mb.size (), + CLIENT::instance ()->file ()); + + if (n < 0) + ACE_ERROR_RETURN ((LM_ERROR, + "FTP_Client_Flow_Handler::fread end of file\n"), + -1); + + if (n == 0) + { + if (feof (CLIENT::instance ()->file ())) + { // At end of file break the loop and end the client. if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"Handle_Start:End of file\n")); break; } - } + } - this->mb.wr_ptr (n); + this->mb.wr_ptr (n); - if ( this->count_ > 1) - { + if ( this->count_ > 1) + { // Greater than the first frame. // Stop the timer that was started just before the previous frame was sent. - last_frame_sent_time.stop (); + last_frame_sent_time.stop (); // Get the time elapsed after sending the previous frame. - ACE_Time_Value tv; - last_frame_sent_time.elapsed_time (tv); + ACE_Time_Value tv; + last_frame_sent_time.elapsed_time (tv); if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, @@ -327,12 +327,12 @@ Client::pace_data (CORBA::Environment& ACE_TRY_ENV) tv.msec ())); // Check to see if the inter frame time has elapsed. - if (tv < inter_frame_time) - { + if (tv < inter_frame_time) + { // Inter frame time has not elapsed. // Claculate the time to wait before the next frame needs to be sent. - ACE_Time_Value wait_time (inter_frame_time - tv); + ACE_Time_Value wait_time (inter_frame_time - tv); if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, @@ -340,32 +340,32 @@ Client::pace_data (CORBA::Environment& ACE_TRY_ENV) wait_time.msec ())); // run the orb for the wait time so the client can continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - } - } + } + } // Start timer before sending the frame. - last_frame_sent_time.start (); + last_frame_sent_time.start (); // Send frame. int result = this->protocol_object_->send_frame (&this->mb); - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "send failed:%p","FTP_Client_Flow_Handler::send\n"), - -1); + if (result < 0) + ACE_ERROR_RETURN ((LM_ERROR, + "send failed:%p","FTP_Client_Flow_Handler::send\n"), + -1); ACE_DEBUG ((LM_DEBUG,"Client::pace_data buffer sent succesfully\n")); // Reset the mb. this->mb.reset (); - } // end while + } // end while // Since the file is read stop the stream. AVStreams::flowSpec stop_spec (1); - CLIENT::instance ()->streamctrl ()->destroy (stop_spec, - ACE_TRY_ENV); + CLIENT::instance ()->streamctrl ()->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Shut the orb down. @@ -376,7 +376,7 @@ Client::pace_data (CORBA::Environment& ACE_TRY_ENV) ACE_CATCHANY { ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Client::pace_data Failed"); + "Client::pace_data Failed"); return -1; } ACE_ENDTRY; @@ -387,52 +387,52 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; //Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AV STream components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // INitialize the Client. int result = 0; result = CLIENT::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); if (result < 0) ACE_ERROR_RETURN ((LM_ERROR, - "client::init failed\n"),1); + "client::init failed\n"),1); // Start sending data. - result = CLIENT::instance ()->pace_data (ACE_TRY_ENV); + result = CLIENT::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.h b/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.h index 24f43d7664c..386dd169b7f 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.h +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable/ftp.h @@ -33,11 +33,11 @@ class FTP_Client_Callback : public TAO_AV_Callback { // = TITLE // Defines the client applcation callback. - // + // // = DESCRIPTION - // This class can override the methods of - // the TAO_AV_Callback to do application - // specific processing. + // This class can override the methods of + // the TAO_AV_Callback to do application + // specific processing. public: FTP_Client_Callback (void); //Constructor @@ -48,25 +48,25 @@ class FTP_Client_StreamEndPoint : public TAO_Client_StreamEndPoint { // = TITLE // Defines the client stream endpoint. - // + // // = DESCRIPTION - // This class overrides the methods of TAO_ClientStreamendpoint + // This class overrides the methods of TAO_ClientStreamendpoint // so the application can perform its processing during post and pre // connection set up. - + public: FTP_Client_StreamEndPoint (void); //Contructor virtual int get_callback (const char *flowname, TAO_AV_Callback *&callback); - // Create the application client callback and return its handle to the + // Create the application client callback and return its handle to the // AVSTreams for further application callbacks virtual int set_protocol_object (const char *flowname, TAO_AV_Protocol_Object *object); // Set protocol object corresponding to the transport protocol chosen. - + protected: FTP_Client_Callback callback_; // reference to the cllient application callback. @@ -79,7 +79,7 @@ class Client { // = TITLE // Defines the Client Application - // + // // = DESCRIPTION // The actual client program that acts as the ftp client that streams data // to the ftp servers that are waiting for data. @@ -87,15 +87,15 @@ public: Client (void); // Constructor - int init (int argc, - char **argv, - CORBA::Environment&); + int init (int argc, + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Method to initialize the various data components. - + void set_protocol_object (TAO_AV_Protocol_Object *protocol_object); // Set the protocol object corresponding to the transport protocol chosen. - - int pace_data (CORBA::Environment&); + + int pace_data (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); // Method to pace and send data from a file. FILE *file (void); @@ -106,17 +106,17 @@ public: char *flowname (void); // name of the flow set up. - + int frame_rate (void); // The requested frame rate for sending each frame of data read from the file. - + private: int parse_args (int argc, char **argv); // Method to parse the command line arguments. - - int bind_to_server (CORBA::Environment& ACE_TRY_ENV); + + int bind_to_server (TAO_ENV_SINGLE_ARG_DECL); // Method that binds the ftp client to the server - + ENDPOINT_STRATEGY endpoint_strategy_; // The reacfive strategy of the client. @@ -131,7 +131,7 @@ private: int count_; // Number of frames sent. - + int argc_; char **argv_; @@ -152,7 +152,7 @@ private: // Selected protocol - default is UDP char *flowname_; - + int use_sfp_; // If set to 1 then use sfp as the flow carrier protocol. diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable/server.cpp b/TAO/orbsvcs/tests/AVStreams/Pluggable/server.cpp index 5d58b1db246..3a98209ae10 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable/server.cpp @@ -38,12 +38,12 @@ FTP_Server_Callback::receive_frame (ACE_Message_Block *frame, frame->length (), 1, output_file); - + if (result == frame->length ()) ACE_ERROR_RETURN ((LM_ERROR, "FTP_Server_Flow_Handler::fwrite failed\n"), -1); - + frame = frame->cont (); } return 0; @@ -71,8 +71,8 @@ Server::~Server (void) int Server::init (int, - char **, - CORBA::Environment &ACE_TRY_ENV) + char ** + TAO_ENV_ARG_DECL) { int result = this->reactive_strategy_.init (TAO_AV_CORE::instance ()->orb (), @@ -80,7 +80,7 @@ Server::init (int, if (result != 0) return result; - // Register the server mmdevice object with the ORB + // Register the server mmdevice object with the ORB ACE_NEW_RETURN (this->mmdevice_, TAO_MMDevice (&this->reactive_strategy_), -1); @@ -91,7 +91,7 @@ Server::init (int, server_mmdevice_name [0].id = CORBA::string_dup ("Server_MMDevice"); CORBA::Object_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN(-1); // Initialize the naming services @@ -103,8 +103,8 @@ Server::init (int, // Register the server object with the naming server. this->my_naming_client_->rebind (server_mmdevice_name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -140,14 +140,14 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize the ORB first. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; int result = @@ -167,43 +167,43 @@ main (int argc, -1); else ACE_DEBUG ((LM_DEBUG, - "File Opened Successfull\n")); + "File Opened Successfull\n")); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; Server server; result = server.init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + if (result != 0) return result; - - orb->run (ACE_TRY_ENV); + + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable/server.h b/TAO/orbsvcs/tests/AVStreams/Pluggable/server.h index 4f442c7af4e..107e468f4d9 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable/server.h +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable/server.h @@ -28,9 +28,9 @@ class FTP_Server_Callback : public TAO_AV_Callback // Defines a class for the server application callback. // // = DESCRIPTION - // This class overides the methods of the TAO_AV_Callback so the + // This class overides the methods of the TAO_AV_Callback so the // AVStreams can make upcalls to the application. - + public: // Method that is called when there is data to be received from the ftp client. @@ -65,7 +65,7 @@ class Server { // = TITLE // Defines the server application class. - // + // // = DESCRIPOTION // The actual server progarm that acts as the ftp server that receives data // sent by the ftp client. @@ -77,10 +77,10 @@ public: // Deestructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Initialize data components. - + protected: TAO_Naming_Client my_naming_client_; // The Naming Service Client. @@ -88,7 +88,7 @@ protected: TAO_AV_Endpoint_Reactive_Strategy_B <FTP_Server_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> reactive_strategy_; // The endpoint reacxtive strategy. - + TAO_MMDevice *mmdevice_; // The server MMDevice. }; diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.cpp b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.cpp index 1004ea6ffa3..2a6a7dbb84b 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.cpp @@ -6,19 +6,19 @@ //TimeStamp Protocol Object TimeStamp_Protocol_Object::TimeStamp_Protocol_Object (TAO_AV_Callback *callback, - TAO_AV_Transport *transport) + TAO_AV_Transport *transport) :TAO_AV_Protocol_Object (callback,transport) { ACE_DEBUG ((LM_DEBUG, - "TimeStamp_Protocol_Object::TimeStamp_Protocol_Object\n")); + "TimeStamp_Protocol_Object::TimeStamp_Protocol_Object\n")); ACE_NEW (this->frame_, - ACE_Message_Block); + ACE_Message_Block); this->frame_->size (4 * this->transport_->mtu ()); } - -int + +int TimeStamp_Protocol_Object::handle_input (void) { int n = this->transport_->recv (this->frame_->rd_ptr (), @@ -28,11 +28,11 @@ TimeStamp_Protocol_Object::handle_input (void) if (n == -1) ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_UDP_Flow_Handler::handle_input connection closed\n"),-1); this->frame_->wr_ptr (this->frame_->rd_ptr () + n); - + return this->callback_->receive_frame (this->frame_); } -// int +// int // TimeStamp_Protocol_Object::handle_input (void) // { // iovec iov; @@ -40,125 +40,125 @@ TimeStamp_Protocol_Object::handle_input (void) // int n = this->transport_->recv (&iov, iovcnt); // int frame_size = BUFSIZ; - + // int begin = 1; // ACE_Message_Block* prev; // int iov_base = 0; // while (n >= frame_size) // { // ACE_DEBUG ((LM_DEBUG, -// "(%N|%l) Frame Size %d %d\n", -// n, -// frame_size)); +// "(%N|%l) Frame Size %d %d\n", +// n, +// frame_size)); // ACE_Message_Block* mb; // ACE_NEW_RETURN (mb, -// ACE_Message_Block(frame_size), -// -1); +// ACE_Message_Block(frame_size), +// -1); // ACE_OS_String::memmove (mb->rd_ptr (), iov.iov_base, frame_size); // mb->wr_ptr (mb->rd_ptr () + frame_size); // // iov_base += frame_size; - + // n -= frame_size; // if (begin) -// { -// prev = mb; -// this->frame_ = mb; -// begin = 0; -// } -// else -// { -// prev->cont (mb); -// prev = mb; - -// } +// { +// prev = mb; +// this->frame_ = mb; +// begin = 0; // } - +// else +// { +// prev->cont (mb); +// prev = mb; + +// } +// } + // if (n > 0) // if (begin) // { -// ACE_DEBUG ((LM_DEBUG, -// "(%N|%l) Frame Size %d\n", -// n)); -// ACE_OS_String::memmove (this->frame_->rd_ptr (), iov.iov_base, n); -// this->frame_->wr_ptr (this->frame_->rd_ptr () + n); +// ACE_DEBUG ((LM_DEBUG, +// "(%N|%l) Frame Size %d\n", +// n)); +// ACE_OS_String::memmove (this->frame_->rd_ptr (), iov.iov_base, n); +// this->frame_->wr_ptr (this->frame_->rd_ptr () + n); // } -// else +// else // { -// ACE_DEBUG ((LM_DEBUG, -// "(%N|%l) Frame Size %d\n", -// n)); - -// ACE_Message_Block* mb; -// ACE_NEW_RETURN (mb, -// ACE_Message_Block (frame_size), -// -1); - -// ACE_OS_String::memmove (mb->rd_ptr (), iov.iov_base, n); -// mb->wr_ptr (mb->rd_ptr () + n); -// prev->cont (mb); +// ACE_DEBUG ((LM_DEBUG, +// "(%N|%l) Frame Size %d\n", +// n)); + +// ACE_Message_Block* mb; +// ACE_NEW_RETURN (mb, +// ACE_Message_Block (frame_size), +// -1); + +// ACE_OS_String::memmove (mb->rd_ptr (), iov.iov_base, n); +// mb->wr_ptr (mb->rd_ptr () + n); +// prev->cont (mb); // } - + // ACE_DEBUG ((LM_DEBUG, -// "IOVEC SIZE %d %d\n", -// n, -// iov.iov_len)); +// "IOVEC SIZE %d %d\n", +// n, +// iov.iov_len)); // if (n == -1) // ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_TCP_Flow_Handler::handle_input recv failed\n"),-1); // if (n == 0) // ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_TCP_Flow_Handler::handle_input connection closed\n"),-1); - + // return this->callback_->receive_frame (this->frame_); // } - + /// send a data frame. -int +int TimeStamp_Protocol_Object::send_frame (ACE_Message_Block *frame, - TAO_AV_frame_info *) + TAO_AV_frame_info *) { ACE_DEBUG ((LM_DEBUG, - "TimeStamp_Protocol_Object::send_frame\n")); - + "TimeStamp_Protocol_Object::send_frame\n")); + ACE_Message_Block* timestamp; ACE_NEW_RETURN (timestamp, - ACE_Message_Block (BUFSIZ), - -1); + ACE_Message_Block (BUFSIZ), + -1); ACE_hrtime_t now = ACE_OS::gethrtime (); - + ACE_UINT64 usec = now; ACE_UINT32 val_1 = ACE_CU64_TO_CU32 (usec); ACE_DEBUG ((LM_DEBUG, - "Time Stamp %u usecs\n", - val_1)); + "Time Stamp %u usecs\n", + val_1)); ACE_OS_String::memcpy (timestamp->wr_ptr (), &now, sizeof (now)); timestamp->wr_ptr (sizeof (now)); - + frame->cont (timestamp); - + int result = this->transport_->send (frame); if (result < 0) return result; return 0; } - -int + +int TimeStamp_Protocol_Object::send_frame (iovec const* iov, - int iovcnt, - TAO_AV_frame_info *) + int iovcnt, + TAO_AV_frame_info *) { return this->transport_->send (iov,iovcnt); } -int +int TimeStamp_Protocol_Object::send_frame (const char* buf, - size_t len) + size_t len) { int result = this->transport_->send (buf, len, 0); if (result < 0) @@ -167,7 +167,7 @@ TimeStamp_Protocol_Object::send_frame (const char* buf, } /// end the stream. -int +int TimeStamp_Protocol_Object::destroy (void) { this->callback_->handle_destroy (); @@ -187,35 +187,35 @@ int TimeStamp_Protocol_Factory::init (int, char **) { ACE_DEBUG ((LM_DEBUG, - "TimeStamp_Protocol_Factory::init\n")); + "TimeStamp_Protocol_Factory::init\n")); return 0; } -int +int TimeStamp_Protocol_Factory::match_protocol (const char *flow_string) { ACE_DEBUG ((LM_DEBUG, - "TimeStamp_Protocol_Factory::match_protocol\n")); + "TimeStamp_Protocol_Factory::match_protocol\n")); if (ACE_OS::strcasecmp (flow_string,"TS") == 0) return 1; return 0; } -TimeStamp_Protocol_Object* +TimeStamp_Protocol_Object* TimeStamp_Protocol_Factory::make_protocol_object (TAO_FlowSpec_Entry *entry, - TAO_Base_StreamEndPoint *endpoint, - TAO_AV_Flow_Handler *handler, - TAO_AV_Transport *transport) + TAO_Base_StreamEndPoint *endpoint, + TAO_AV_Flow_Handler *handler, + TAO_AV_Transport *transport) { TAO_AV_Callback *callback = 0; endpoint->get_callback (entry->flowname (), callback); - - + + TimeStamp_Protocol_Object *object = 0; ACE_NEW_RETURN (object, TimeStamp_Protocol_Object (callback, - transport), + transport), 0); callback->open (object, handler); diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.h b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.h index 2f7b2fc46be..7ee8b1c4f84 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.h +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/TimeStamp.h @@ -11,28 +11,28 @@ class TAO_AV_Export TimeStamp_Protocol_Object : public TAO_AV_Protocol_Object { public: TimeStamp_Protocol_Object (TAO_AV_Callback *callback, - TAO_AV_Transport *transport); - + TAO_AV_Transport *transport); + virtual int handle_input (void); - + /// send a data frame. virtual int send_frame (ACE_Message_Block *frame, TAO_AV_frame_info *frame_info = 0); - + virtual int send_frame (iovec const* iov, int iovcnt, TAO_AV_frame_info *frame_info = 0); virtual int send_frame (const char*buf, size_t len); - + /// end the stream. virtual int destroy (void); private: /// Pre-allocated memory to receive the data... ACE_Message_Block* frame_; - + }; class TAO_AV_Export TimeStamp_Protocol_Factory : public TAO_AV_Flow_Protocol_Factory @@ -44,15 +44,15 @@ class TAO_AV_Export TimeStamp_Protocol_Factory : public TAO_AV_Flow_Protocol_Fac virtual int init (int argc, char *argv[]); virtual int match_protocol (const char *flow_string); virtual TimeStamp_Protocol_Object* make_protocol_object (TAO_FlowSpec_Entry *entry, - TAO_Base_StreamEndPoint *endpoint, - TAO_AV_Flow_Handler *handler, - TAO_AV_Transport *transport); + TAO_Base_StreamEndPoint *endpoint, + TAO_AV_Flow_Handler *handler, + TAO_AV_Transport *transport); }; ACE_STATIC_SVC_DECLARE (TimeStamp_Protocol_Factory) ACE_FACTORY_DECLARE (TAO_AV, TimeStamp_Protocol_Factory) -#include "ace/post.h" +#include "ace/post.h" #endif /*TIMESTAMP_H*/ diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/receiver.cpp index 706f47e93c6..f5ef0bf7a7b 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/receiver.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/receiver.cpp @@ -46,26 +46,26 @@ Receiver_Callback::receive_frame (ACE_Message_Block *frame, // Write the received data to the file. size_t result = ACE_OS::fwrite (frame->rd_ptr (), - frame_size, - 1, - output_file); - + frame_size, + 1, + output_file); + if (result == frame->length ()) ACE_ERROR_RETURN ((LM_ERROR, - "Receiver_Callback::fwrite failed\n"), - -1); + "Receiver_Callback::fwrite failed\n"), + -1); frame->rd_ptr (frame_size); ACE_hrtime_t stamp; ACE_OS_String::memcpy (&stamp, frame->rd_ptr (), sizeof (stamp)); - + ACE_UINT64 usec = stamp; ACE_UINT32 val_1 = ACE_CU64_TO_CU32 (usec); - + ACE_DEBUG ((LM_DEBUG, - "Time Stamp %u\n", - val_1)); - + "Time Stamp %u\n", + val_1)); + frame->reset (); return 0; } @@ -92,8 +92,8 @@ Receiver::~Receiver (void) int Receiver::init (int, - char **, - CORBA::Environment &ACE_TRY_ENV) + char ** + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -112,7 +112,7 @@ Receiver::init (int, this->mmdevice_; CORBA::Object_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Register the mmdevice with the naming service. @@ -130,8 +130,8 @@ Receiver::init (int, // Register the receiver object with the naming server. this->naming_client_->rebind (name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -177,32 +177,32 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; int result = @@ -228,23 +228,23 @@ main (int argc, Receiver receiver; result = receiver.init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result != 0) return result; - + while (!endstream) - { - orb->perform_work (ACE_TRY_ENV); - ACE_TRY_CHECK; - } + { + orb->perform_work (TAO_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + } // Hack for now.... ACE_OS::sleep (1); - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/run_test.pl index 3f07d66d5c9..6d63232651b 100755 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/run_test.pl +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/run_test.pl @@ -28,7 +28,7 @@ $NS->Spawn (); if (PerlACE::waitforfile_timed ($nsior, 5) == -1) { print STDERR "ERROR: cannot find naming service IOR file\n"; - $NS->Kill (); + $NS->Kill (); exit 1; } diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/sender.cpp index 04d695b79a9..2161de268e9 100644 --- a/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/sender.cpp @@ -82,7 +82,7 @@ Sender::parse_args (int argc, // Method to get the object reference of the receiver int -Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) +Sender::bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL) { CosNaming::Name name (1); name.length (1); @@ -91,13 +91,13 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) // Resolve the receiver object reference from the Naming Service CORBA::Object_var receiver_mmdevice_obj = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->receiver_mmdevice_ = - AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (CORBA::is_nil (this->receiver_mmdevice_.in ())) @@ -110,8 +110,8 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) int Sender::init (int argc, - char **argv, - CORBA::Environment &ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -148,9 +148,9 @@ Sender::init (int argc, "File opened successfully\n")); // Resolve the object reference of the receiver from the Naming Service. - result = this->bind_to_receiver (ACE_TRY_ENV); + result = this->bind_to_receiver (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) Error binding to the naming service\n"), @@ -182,7 +182,7 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->streamctrl_, @@ -197,8 +197,8 @@ Sender::init (int argc, this->streamctrl_->bind_devs (mmdevice.in (), this->receiver_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (bind_result == 0) @@ -211,7 +211,7 @@ Sender::init (int argc, // Method to send data at the specified rate int -Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) +Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL) { // The time that should lapse between two consecutive frames sent. ACE_Time_Value inter_frame_time; @@ -288,8 +288,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Run the orb for the wait time so the sender can // continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -318,13 +318,13 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // File reading is complete, destroy the stream. AVStreams::flowSpec stop_spec; - this->streamctrl_->destroy (stop_spec, - ACE_TRY_ENV); + this->streamctrl_->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Shut the orb down. - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -350,38 +350,38 @@ main (int argc, CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AV Stream components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Sender. int result = 0; result = SENDER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result < 0) @@ -390,7 +390,7 @@ main (int argc, -1); // Start sending data. - result = SENDER::instance ()->pace_data (ACE_TRY_ENV); + result = SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/distributer.cpp b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/distributer.cpp index 3b9ae525d88..e681eed4fc9 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/distributer.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/distributer.cpp @@ -77,8 +77,8 @@ Distributer_Receiver_Callback::handle_destroy (void) // Destroy the receiver stream AVStreams::flowSpec stop_spec; - DISTRIBUTER::instance ()->receiver_streamctrl ()->destroy (stop_spec, - ACE_TRY_ENV); + DISTRIBUTER::instance ()->receiver_streamctrl ()->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // We can close down now. @@ -126,8 +126,8 @@ Distributer::~Distributer (void) void Distributer::bind_to_mmdevice (AVStreams::MMDevice_ptr &mmdevice, - const ACE_CString &mmdevice_name, - CORBA::Environment &ACE_TRY_ENV) + const ACE_CString &mmdevice_name + TAO_ENV_ARG_DECL) { CosNaming::Name name (1); name.length (1); @@ -136,20 +136,20 @@ Distributer::bind_to_mmdevice (AVStreams::MMDevice_ptr &mmdevice, // Resolve the mmdevice object reference from the Naming Service CORBA::Object_var mmdevice_obj = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK; mmdevice = - AVStreams::MMDevice::_narrow (mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } int Distributer::init (int /*argc*/, - char *[] /*argv*/, - CORBA::Environment &ACE_TRY_ENV) + char *[] /*argv*/ + TAO_ENV_ARG_DECL) { // Initialize the naming services int result = @@ -173,15 +173,15 @@ Distributer::init (int /*argc*/, // Bind to the receiver mmdevice ACE_CString mmdevice_name ("Receiver"); this->bind_to_mmdevice (this->receiver_mmdevice_.out (), - mmdevice_name, - ACE_TRY_ENV); + mmdevice_name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Bind to the sender mmdevice mmdevice_name = "Sender"; this->bind_to_mmdevice (this->sender_mmdevice_.out (), - mmdevice_name, - ACE_TRY_ENV); + mmdevice_name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Initialize the QoS @@ -210,7 +210,7 @@ Distributer::init (int /*argc*/, this->distributer_sender_mmdevice_; AVStreams::MMDevice_var distributer_sender_mmdevice = - this->distributer_sender_mmdevice_->_this (ACE_TRY_ENV); + this->distributer_sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->distributer_receiver_mmdevice_, @@ -222,7 +222,7 @@ Distributer::init (int /*argc*/, this->distributer_receiver_mmdevice_; AVStreams::MMDevice_var distributer_receiver_mmdevice = - this->distributer_receiver_mmdevice_->_this (ACE_TRY_ENV); + this->distributer_receiver_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->receiver_streamctrl_, @@ -238,8 +238,8 @@ Distributer::init (int /*argc*/, this->receiver_streamctrl_->bind_devs (distributer_sender_mmdevice.in (), this->receiver_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Create the forward flow specification to describe the flow. @@ -269,8 +269,8 @@ Distributer::init (int /*argc*/, sender_streamctrl->bind_devs (sender_mmdevice_.in (), distributer_receiver_mmdevice.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (res == 0) @@ -301,46 +301,46 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize the ORB first. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Distributer int result = DISTRIBUTER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result != 0) @@ -348,7 +348,7 @@ main (int argc, while (!DISTRIBUTER::instance ()->done ()) { - orb->perform_work (ACE_TRY_ENV); + orb->perform_work (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/distributer.h b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/distributer.h index 061b5154500..8f003e75fd5 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/distributer.h +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/distributer.h @@ -115,13 +115,13 @@ public: // Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Initialize data components. void bind_to_mmdevice (AVStreams::MMDevice_ptr &mmdevice, - const ACE_CString &mmdevice_name, - CORBA::Environment &ACE_TRY_ENV); + const ACE_CString &mmdevice_name + TAO_ENV_ARG_DECL); // Resolve the reference of the mmdevice from the naming service. TAO_StreamCtrl *receiver_streamctrl (void); diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.cpp index 724476074b1..815bf7fb79d 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.cpp @@ -66,8 +66,8 @@ Receiver_Callback::handle_destroy (void) ACE_TRY_NEW_ENV { - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -93,8 +93,8 @@ Receiver::~Receiver (void) int Receiver::init (int, - char **, - CORBA::Environment &ACE_TRY_ENV) + char ** + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -113,7 +113,7 @@ Receiver::init (int, this->mmdevice_; CORBA::Object_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Register the mmdevice with the naming service. @@ -131,8 +131,8 @@ Receiver::init (int, // Register the receiver object with the naming server. this->naming_client_->rebind (name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -169,39 +169,39 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize the ORB first. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; int result = @@ -227,20 +227,20 @@ main (int argc, Receiver receiver; result = receiver.init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result != 0) return result; - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Hack for now.... ACE_OS::sleep (1); - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.h b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.h index f197cbae818..1a5fa37d3a8 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.h +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/receiver.h @@ -83,8 +83,8 @@ public: // Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Initialize data components. protected: diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/sender.cpp index 540eba5f801..777f3b0a4e0 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/sender.cpp @@ -20,8 +20,8 @@ Sender_StreamEndPoint::get_callback (const char *, ACE_TRY_NEW_ENV { CORBA::Any_ptr streamctrl_any = - this->get_property_value ("Related_StreamCtrl", - ACE_TRY_ENV); + this->get_property_value ("Related_StreamCtrl" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; AVStreams::StreamCtrl_ptr streamctrl; @@ -111,8 +111,8 @@ Sender::parse_args (int argc, int Sender::init (int argc, - char **argv, - CORBA::Environment &ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -158,7 +158,7 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN(-1); CosNaming::Name name (1); @@ -168,8 +168,8 @@ Sender::init (int argc, // Register the sender object with the naming server. this->naming_client_->rebind (name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -177,7 +177,7 @@ Sender::init (int argc, // Method to send data at the specified rate int -Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) +Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL) { // The time that should lapse between two consecutive frames sent. ACE_Time_Value inter_frame_time; @@ -254,8 +254,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Run the orb for the wait time so the sender can // continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -291,8 +291,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) { // File reading is complete, destroy the stream. AVStreams::flowSpec stop_spec; - this->streamctrl_->destroy (stop_spec, - ACE_TRY_ENV); + this->streamctrl_->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -310,44 +310,44 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AV Stream components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Sender. int result = 0; result = SENDER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result < 0) @@ -355,7 +355,7 @@ main (int argc, "Sender::init failed\n"), -1); - SENDER::instance ()->pace_data (ACE_TRY_ENV); + SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; ACE_Time_Value tv (20); diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/sender.h b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/sender.h index 58c584efd0f..6619775927b 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/sender.h +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/sender.h @@ -62,11 +62,11 @@ public: // Constructor int init (int argc, - char **argv, - CORBA::Environment&); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Method to initialize the various data components. - int pace_data (CORBA::Environment &); + int pace_data (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); // Method to pace and send data from a file. void protocol_object (TAO_AV_Protocol_Object *protocol_object); diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/receiver.cpp index 724476074b1..815bf7fb79d 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/receiver.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/receiver.cpp @@ -66,8 +66,8 @@ Receiver_Callback::handle_destroy (void) ACE_TRY_NEW_ENV { - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -93,8 +93,8 @@ Receiver::~Receiver (void) int Receiver::init (int, - char **, - CORBA::Environment &ACE_TRY_ENV) + char ** + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -113,7 +113,7 @@ Receiver::init (int, this->mmdevice_; CORBA::Object_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Register the mmdevice with the naming service. @@ -131,8 +131,8 @@ Receiver::init (int, // Register the receiver object with the naming server. this->naming_client_->rebind (name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -169,39 +169,39 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize the ORB first. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; int result = @@ -227,20 +227,20 @@ main (int argc, Receiver receiver; result = receiver.init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result != 0) return result; - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Hack for now.... ACE_OS::sleep (1); - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/receiver.h b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/receiver.h index d117c273e90..507f6ec9ca7 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/receiver.h +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/receiver.h @@ -83,8 +83,8 @@ public: // Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Initialize data components. protected: diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/sender.cpp index 80819189f07..1f82e374339 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/sender.cpp @@ -82,7 +82,7 @@ Sender::parse_args (int argc, // Method to get the object reference of the receiver int -Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) +Sender::bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL) { CosNaming::Name name (1); name.length (1); @@ -91,13 +91,13 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) // Resolve the receiver object reference from the Naming Service CORBA::Object_var receiver_mmdevice_obj = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->receiver_mmdevice_ = - AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (CORBA::is_nil (this->receiver_mmdevice_.in ())) @@ -110,8 +110,8 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) int Sender::init (int argc, - char **argv, - CORBA::Environment &ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -148,9 +148,9 @@ Sender::init (int argc, "File opened successfully\n")); // Resolve the object reference of the receiver from the Naming Service. - result = this->bind_to_receiver (ACE_TRY_ENV); + result = this->bind_to_receiver (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) Error binding to the naming service\n"), @@ -182,7 +182,7 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->streamctrl_, @@ -197,8 +197,8 @@ Sender::init (int argc, this->streamctrl_->bind_devs (mmdevice.in (), this->receiver_mmdevice_.in (), the_qos.inout (), - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (bind_result == 0) @@ -211,7 +211,7 @@ Sender::init (int argc, // Method to send data at the specified rate int -Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) +Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL) { // The time that should lapse between two consecutive frames sent. ACE_Time_Value inter_frame_time; @@ -288,8 +288,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Run the orb for the wait time so the sender can // continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -318,13 +318,13 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // File reading is complete, destroy the stream. AVStreams::flowSpec stop_spec; - this->streamctrl_->destroy (stop_spec, - ACE_TRY_ENV); + this->streamctrl_->destroy (stop_spec + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Shut the orb down. - TAO_AV_CORE::instance ()->orb ()->shutdown (0, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->shutdown (0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -341,44 +341,44 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AV Stream components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Sender. int result = 0; result = SENDER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result < 0) @@ -387,7 +387,7 @@ main (int argc, -1); // Start sending data. - result = SENDER::instance ()->pace_data (ACE_TRY_ENV); + result = SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/sender.h b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/sender.h index 87b07bcb553..aa74b4b3319 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/sender.h +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/sender.h @@ -62,11 +62,11 @@ public: // Constructor int init (int argc, - char **argv, - CORBA::Environment&); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Method to initialize the various data components. - int pace_data (CORBA::Environment &); + int pace_data (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); // Method to pace and send data from a file. void protocol_object (TAO_AV_Protocol_Object *protocol_object); @@ -76,7 +76,7 @@ private: int parse_args (int argc, char **argv); // Method to parse the command line arguments. - int bind_to_receiver (CORBA::Environment& ACE_TRY_ENV); + int bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL); // Method that binds the sender to the receiver. SENDER_ENDPOINT_STRATEGY endpoint_strategy_; diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/receiver.cpp b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/receiver.cpp index 43e706c67f2..da934900655 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/receiver.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/receiver.cpp @@ -74,8 +74,8 @@ Receiver::~Receiver (void) int Receiver::init (int, - char **, - CORBA::Environment &ACE_TRY_ENV) + char ** + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -94,7 +94,7 @@ Receiver::init (int, this->mmdevice_; CORBA::Object_var mmdevice = - this->mmdevice_->_this (ACE_TRY_ENV); + this->mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Register the mmdevice with the naming service. @@ -112,8 +112,8 @@ Receiver::init (int, // Register the receiver object with the naming server. this->naming_client_->rebind (name, - mmdevice.in (), - ACE_TRY_ENV); + mmdevice.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; @@ -150,39 +150,39 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialize the ORB first. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AVStreams components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; int result = @@ -208,20 +208,20 @@ main (int argc, Receiver receiver; result = receiver.init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result != 0) return result; - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Hack for now.... ACE_OS::sleep (1); - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/receiver.h b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/receiver.h index d4e04e5f782..0b617c4d7bc 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/receiver.h +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/receiver.h @@ -80,8 +80,8 @@ public: // Destructor. int init (int argc, - char **argv, - CORBA::Environment &); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Initialize data components. protected: diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/sender.cpp b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/sender.cpp index 33901f05a57..943390dd384 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/sender.cpp +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/sender.cpp @@ -15,16 +15,16 @@ ACE_Time_Value inter_frame_time; CORBA::Boolean Sender_StreamEndPoint::modify_QoS (AVStreams::streamQoS &new_qos, - const AVStreams::flowSpec &the_flows, - CORBA::Environment &ACE_TRY_ENV) + const AVStreams::flowSpec &the_flows + TAO_ENV_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException, - AVStreams::noSuchFlow, - AVStreams::QoSRequestFailed )) + AVStreams::noSuchFlow, + AVStreams::QoSRequestFailed )) { ACE_DEBUG ((LM_DEBUG, - "Sender_StreamEndPoint::modify_QoS\n")); - - int result = this->change_qos (new_qos, the_flows, ACE_TRY_ENV); + "Sender_StreamEndPoint::modify_QoS\n")); + + int result = this->change_qos (new_qos, the_flows TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); if (result != 0) @@ -37,17 +37,17 @@ int Sender_StreamEndPoint::get_callback (const char *, TAO_AV_Callback *&callback) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; // Create and return the sender application callback to AVStreams // for further upcalls. callback = &this->callback_; - + TAO_Negotiator *negotiator; ACE_NEW_RETURN (negotiator, - TAO_Negotiator, - -1); + TAO_Negotiator, + -1); AVStreams::Negotiator_var negotiator_obj = - negotiator->_this (ACE_TRY_ENV); + negotiator->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->set_negotiator (negotiator_obj.in ()); @@ -110,9 +110,9 @@ Sender::parse_args (int argc, case 'd': TAO_debug_level++; break; - case 'a': - this->address_ = opts.optarg; - break; + case 'a': + this->address_ = opts.optarg; + break; default: ACE_DEBUG ((LM_DEBUG, "Unknown Option\n")); return -1; @@ -127,50 +127,50 @@ Sender::fill_qos (AVStreams::streamQoS &qos) peak_bandwidth += 100; ACE_DEBUG ((LM_DEBUG, - "Sender::fill_qos %d\n", - peak_bandwidth)); + "Sender::fill_qos %d\n", + peak_bandwidth)); qos.length (1); qos [0].QoSType = CORBA::string_dup ("Data_Receiver"); - + qos [0].QoSParams.length (10); - + qos [0].QoSParams [0].property_name = CORBA::string_dup ("Service_Type"); qos [0].QoSParams [0].property_value <<= (CORBA::Short) 1;//ACE_SERVICETYPE_CONTROLLEDLOAD; - + qos [0].QoSParams [1].property_name = CORBA::string_dup ("Token_Rate"); qos [0].QoSParams [1].property_value <<= (CORBA::ULong) 9200 ; - + qos [0].QoSParams [2].property_name = CORBA::string_dup ("Token_Bucket_Size"); qos [0].QoSParams [2].property_value <<= (CORBA::ULong) 708; - + qos [0].QoSParams [3].property_name = CORBA::string_dup ("Peak_Bandwidth"); qos [0].QoSParams [3].property_value <<= (CORBA::ULong) peak_bandwidth; - + qos [0].QoSParams [4].property_name = CORBA::string_dup ("Latency"); qos [0].QoSParams [4].property_value <<= (CORBA::ULong) 0; - + qos [0].QoSParams [5].property_name = CORBA::string_dup ("Delay_Variation"); qos [0].QoSParams [5].property_value <<= (CORBA::ULong) 0; - + qos [0].QoSParams [6].property_name = CORBA::string_dup ("Max_SDU_Size"); qos [0].QoSParams [6].property_value <<= (CORBA::ULong) 368; - + qos [0].QoSParams [7].property_name = CORBA::string_dup ("Minimum_Policed_Size"); qos [0].QoSParams [7].property_value <<= (CORBA::ULong) 368; - + qos [0].QoSParams [8].property_name = CORBA::string_dup ("TTL"); qos [0].QoSParams [8].property_value <<= (CORBA::ULong) 25; - + qos [0].QoSParams [9].property_name = CORBA::string_dup ("Priority"); qos [0].QoSParams [9].property_value <<= (CORBA::ULong) 1; - + } // Method to get the object reference of the receiver int -Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) +Sender::bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL) { CosNaming::Name name (1); name.length (1); @@ -179,13 +179,13 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) // Resolve the receiver object reference from the Naming Service CORBA::Object_var receiver_mmdevice_obj = - this->naming_client_->resolve (name, - ACE_TRY_ENV); + this->naming_client_->resolve (name + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); this->receiver_mmdevice_ = - AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in (), - ACE_TRY_ENV); + AVStreams::MMDevice::_narrow (receiver_mmdevice_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (CORBA::is_nil (this->receiver_mmdevice_.in ())) @@ -198,8 +198,8 @@ Sender::bind_to_receiver (CORBA::Environment &ACE_TRY_ENV) int Sender::init (int argc, - char **argv, - CORBA::Environment &ACE_TRY_ENV) + char **argv + TAO_ENV_ARG_DECL) { // Initialize the endpoint strategy with the orb and poa. int result = @@ -236,9 +236,9 @@ Sender::init (int argc, "File opened successfully\n")); // Resolve the object reference of the receiver from the Naming Service. - result = this->bind_to_receiver (ACE_TRY_ENV); + result = this->bind_to_receiver (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) Error binding to the naming service\n"), @@ -269,7 +269,7 @@ Sender::init (int argc, this->sender_mmdevice_; AVStreams::MMDevice_var mmdevice = - this->sender_mmdevice_->_this (ACE_TRY_ENV); + this->sender_mmdevice_->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_NEW_RETURN (this->streamctrl_, @@ -280,7 +280,7 @@ Sender::init (int argc, this->streamctrl_; AVStreams::streamQoS qos; - + //this->fill_qos (qos); // Bind/Connect the sender and receiver MMDevices. @@ -288,8 +288,8 @@ Sender::init (int argc, this->streamctrl_->bind_devs (mmdevice.in (), this->receiver_mmdevice_.in (), qos, - flow_spec, - ACE_TRY_ENV); + flow_spec + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (bind_result == 0) @@ -302,7 +302,7 @@ Sender::init (int argc, // Method to send data at the specified rate int -Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) +Sender::pace_data (TAO_ENV_SINGLE_ARG_DECL) { @@ -323,7 +323,7 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Continue to send data till the file is read to the end. while (1) - { + { // Read from the file into a message block. int n = ACE_OS::fread (this->mb_.wr_ptr (), 1, @@ -378,8 +378,8 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Run the orb for the wait time so the sender can // continue other orb requests. - TAO_AV_CORE::instance ()->orb ()->run (wait_time, - ACE_TRY_ENV); + TAO_AV_CORE::instance ()->orb ()->run (wait_time + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } } @@ -403,28 +403,28 @@ Sender::pace_data (CORBA::Environment &ACE_TRY_ENV) // Reset the message block. this->mb_.reset (); - - if (this->frame_count_ == 25) - { - TAO_Forward_FlowSpec_Entry entry (this->flowname_.c_str (), - "IN", - "USER_DEFINED", - "", - "QoS_UDP", - 0); - AVStreams::flowSpec flow_spec (1); - flow_spec.length (1); - flow_spec [0] = CORBA::string_dup (entry.entry_to_string ()); - - AVStreams::streamQoS qos; - this->fill_qos (qos); - this->streamctrl_->modify_QoS (qos, - flow_spec, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - - } // end while + + if (this->frame_count_ == 25) + { + TAO_Forward_FlowSpec_Entry entry (this->flowname_.c_str (), + "IN", + "USER_DEFINED", + "", + "QoS_UDP", + 0); + AVStreams::flowSpec flow_spec (1); + flow_spec.length (1); + flow_spec [0] = CORBA::string_dup (entry.entry_to_string ()); + + AVStreams::streamQoS qos; + this->fill_qos (qos); + this->streamctrl_->modify_QoS (qos, + flow_spec + TAO_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + + } // end while } ACE_CATCHANY @@ -441,44 +441,44 @@ int main (int argc, char **argv) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA", - ACE_TRY_ENV); + = orb->resolve_initial_references ("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Get the POA_var object from Object_var PortableServer::POA_var root_poa - = PortableServer::POA::_narrow (obj.in (), - ACE_TRY_ENV); + = PortableServer::POA::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var mgr - = root_poa->the_POAManager (ACE_TRY_ENV); + = root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - mgr->activate (ACE_TRY_ENV); + mgr->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the AV Stream components. TAO_AV_CORE::instance ()->init (orb.in (), - root_poa.in (), - ACE_TRY_ENV); + root_poa.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Initialize the Sender. int result = 0; result = SENDER::instance ()->init (argc, - argv, - ACE_TRY_ENV); + argv + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (result < 0) @@ -487,9 +487,9 @@ main (int argc, -1); // Start sending data. - result = SENDER::instance ()->pace_data (ACE_TRY_ENV); + result = SENDER::instance ()->pace_data (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + orb->run (); } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/sender.h b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/sender.h index c05e594af7c..c3875d517a2 100644 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/sender.h +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/sender.h @@ -39,11 +39,11 @@ public: // chosen. CORBA::Boolean modify_QoS (AVStreams::streamQoS &new_qos, - const AVStreams::flowSpec &/* the_flows */, - CORBA::Environment &ACE_TRY_ENV) - ACE_THROW_SPEC(( CORBA::SystemException, - AVStreams::noSuchFlow, - AVStreams::QoSRequestFailed )); + const AVStreams::flowSpec &/* the_flows */ + TAO_ENV_ARG_DECL) + ACE_THROW_SPEC(( CORBA::SystemException, + AVStreams::noSuchFlow, + AVStreams::QoSRequestFailed )); protected: TAO_AV_Callback callback_; // Application callback. @@ -68,11 +68,11 @@ public: // Constructor int init (int argc, - char **argv, - CORBA::Environment&); + char **argv + TAO_ENV_ARG_DECL_NOT_USED); // Method to initialize the various data components. - int pace_data (CORBA::Environment &); + int pace_data (TAO_ENV_SINGLE_ARG_DECL_NOT_USED); // Method to pace and send data from a file. void protocol_object (TAO_AV_Protocol_Object *protocol_object); @@ -85,7 +85,7 @@ private: int parse_args (int argc, char **argv); // Method to parse the command line arguments. - int bind_to_receiver (CORBA::Environment& ACE_TRY_ENV); + int bind_to_receiver (TAO_ENV_SINGLE_ARG_DECL); // Method that binds the sender to the receiver. SENDER_ENDPOINT_STRATEGY endpoint_strategy_; diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.cpp b/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.cpp index 64db7de821c..4f441ad8447 100644 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.cpp +++ b/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.cpp @@ -59,7 +59,7 @@ Trader_Client::init (int argc, char** argv) //ACE_DEBUG ((LM_DEBUG, "Bootstrapping to the trading service")); CORBA::ORB_var orb = this->orb_manager_.orb (); CORBA::Object_var obj = - orb->resolve_initial_references ("TradingService", ACE_TRY_ENV); + orb->resolve_initial_references ("TradingService" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Narrow the lookup interface. |