From e24aafd7d1edc55b7e0011dfdb1fd370a73e2116 Mon Sep 17 00:00:00 2001 From: kirthika Date: Sun, 25 Oct 1998 04:55:46 +0000 Subject: *** empty log message *** --- .../Callback_Quoter/Consumer_Input_Handler.cpp | 416 ++++++--------------- .../Callback_Quoter/Consumer_Input_Handler.h | 98 ++--- .../Callback_Quoter/Consumer_Signal_Handler.cpp | 49 +++ .../Callback_Quoter/Consumer_Signal_Handler.h | 54 +++ TAO/examples/Callback_Quoter/Makefile | 254 ++++++++++++- TAO/examples/Callback_Quoter/consumer.cpp | 4 +- 6 files changed, 492 insertions(+), 383 deletions(-) create mode 100644 TAO/examples/Callback_Quoter/Consumer_Signal_Handler.cpp create mode 100644 TAO/examples/Callback_Quoter/Consumer_Signal_Handler.h diff --git a/TAO/examples/Callback_Quoter/Consumer_Input_Handler.cpp b/TAO/examples/Callback_Quoter/Consumer_Input_Handler.cpp index 3c8f999b5cb..1a9e0c02bfa 100644 --- a/TAO/examples/Callback_Quoter/Consumer_Input_Handler.cpp +++ b/TAO/examples/Callback_Quoter/Consumer_Input_Handler.cpp @@ -18,154 +18,59 @@ #include "Consumer_Input_Handler.h" #include "ace/Read_Buffer.h" -#include "tao/ORB.h" -#include "ace/Get_Opt.h" -#include "ace/Read_Buffer.h" #include "ace/OS.h" -Consumer_Input_Handler::Consumer_Input_Handler () - : ior_ (0), - shutdown_ (0), - stock_name_ ("Unknown"), - threshold_value_ (0), - server_ (), - registered_(0), - unregistered_(0) -{ -} - -Consumer_Input_Handler::~Consumer_Input_Handler (void) -{ - // Make sure to cleanup the STDIN handler. - - if (ACE_Event_Handler::remove_stdin_handler - (TAO_ORB_Core_instance ()->reactor (), - TAO_ORB_Core_instance ()->thr_mgr ()) == -1) - ACE_ERROR ((LM_ERROR, - "%p\n", - "remove_stdin_handler")); - -} - -// Reads the Server factory IOR from a file. - -int -Consumer_Input_Handler::read_ior (char *filename) -{ - // Open the file for reading. - ACE_HANDLE f_handle = ACE_OS::open (filename, 0); - - if (f_handle == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to open %s for writing: %p\n", - filename), - -1); - - ACE_Read_Buffer ior_buffer (f_handle); - char *data = ior_buffer.read (); - - if (data == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to read ior: %p\n"), - -1); - - this->ior_ = ACE_OS::strdup (data); - ior_buffer.alloc ()->free (data); +Consumer_Input_Handler::Consumer_Input_Handler (Consumer_Handler *consumer_handler) + :registered_(0), + unregistered_(0) + { + consumer_handler_ = consumer_handler; - ACE_OS::close (f_handle); - - return 0; -} - -// Parses the command line arguments and returns an error status. + } int -Consumer_Input_Handler::parse_args (void) +Consumer_Input_Handler::handle_input (ACE_HANDLE) { - ACE_Get_Opt get_opts (argc_, argv_, "d:f:xk:xs"); - int c; - int result; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag - TAO_debug_level++; //**** - break; - - case 'k': // ior provide on command line - this->ior_ = ACE_OS::strdup (get_opts.optarg); - break; - - case 'f': // read the IOR from the file. - result = this->read_ior (get_opts.optarg); - if (result < 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to read ior from %s : %p\n", - get_opts.optarg), - -1); - break; - - case 's': // don't use the naming service - this->use_naming_service_ = 0; - break; - - case 'x': - this->shutdown_ = 1; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - " [-f ior-file]" - " [-k ior]" - " [-x]" - " [-s]" - "\n", - this->argv_ [0]), - -1); - } - - // Indicates successful parsing of command line. - return 0; -} - -// this method uses the naming service to obtain the server object refernce. + char buf[BUFSIZ]; -int -Consumer_Input_Handler::via_naming_service (void) -{ TAO_TRY { - // Initialization of the naming service. - if (naming_services_client_.init (orb_.in ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize " - "the TAO_Naming_Client. \n"), - -1); - - CosNaming::Name notifier_ref_name (1); - notifier_ref_name.length (1); - notifier_ref_name[0].id = CORBA::string_dup ("Notifier"); - - CORBA::Object_var notifier_obj = - this->naming_services_client_->resolve (notifier_ref_name, - TAO_TRY_ENV); - TAO_CHECK_ENV; + // The string could read contains \n\0 hence using ACE_OS::read + // which returns the no of bytes read and hence i can manipulate + // and remove the devil from the picture i.e '\n' ! ;) - // The CORBA::Object_var object is downcast to Notifier_var using - // the <_narrow> method. - this->server_ = - Notifier::_narrow (notifier_obj.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; + ssize_t strlen = ACE_OS::read (ACE_STDIN, + buf, + sizeof buf); + if (buf[strlen -1] == '\n') + buf[strlen -1] = '\0'; + + ACE_DEBUG ((LM_DEBUG, + "%s", + buf)); + switch (tolower (buf[0])) + { + case 'r': + { + register_consumer (); + break; + } + case 'u': + { + unregister_consumer (); + break; + } + case 'q': + { + quit_consumer_process (); + break; + } + } } TAO_CATCHANY { - TAO_TRY_ENV.print_exception ("Consumer_Input_Handler::via_naming_service\n"); + TAO_TRY_ENV.print_exception ("Input_Handler::init"); return -1; } TAO_ENDTRY; @@ -173,227 +78,128 @@ Consumer_Input_Handler::via_naming_service (void) return 0; } -// Init function. -int -Consumer_Input_Handler::init (int argc, char **argv) -{ - this->argc_ = argc; - this->argv_ = argv; - // Register our to handle STDIN events, which will - // trigger the method to process these events. +void +Consumer_Input_Handler::register_consumer () +{ - if (ACE_Event_Handler::register_stdin_handler - (this, - TAO_ORB_Core_instance ()->reactor (), - TAO_ORB_Core_instance ()->thr_mgr ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "register_stdin_handler"), - -1); + CORBA::Environment TAO_TRY_ENV; TAO_TRY { - // Retrieve the ORB. - this->orb_ = CORBA::ORB_init (this->argc_, - this->argv_, - 0, - TAO_TRY_ENV); - TAO_CHECK_ENV; + // Get the stockname the consumer is interested in. + char stockname[BUFSIZ]; - // Parse command line and verify parameters. - if (this->parse_args () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "parse_args failed\n"), - -1); + ACE_DEBUG ((LM_DEBUG, + "Stockname?")); - // use the naming service. - if (this->use_naming_service_) - return via_naming_service (); + ssize_t strlen = ACE_OS::read (ACE_STDIN, + stockname, + sizeof stockname); + if (stockname[strlen -1] == '\n') + stockname[strlen -1] = '\0'; - if (this->ior_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "%s: no ior specified\n", - this->argv_[0]), - -1); + this->consumer_handler_->stock_name_ = stockname; - CORBA::Object_var server_object = - this->orb_->string_to_object (this->ior_, - TAO_TRY_ENV); - TAO_CHECK_ENV; + // Get the threshold value. + char needed_stock_value[BUFSIZ]; + ACE_DEBUG ((LM_DEBUG, + "Threshold Stock value?")); - if (CORBA::is_nil (server_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid ior <%s>\n", - this->ior_), - -1); + strlen = ACE_OS::read (ACE_STDIN, + needed_stock_value, + sizeof needed_stock_value); - // The downcasting from CORBA::Object_var to Notifier_var is done - // using the <_narrow> method. - this->server_ = Notifier::_narrow (server_object.in (), - TAO_TRY_ENV); + if (needed_stock_value[strlen -1] == '\n') + needed_stock_value[strlen -1] = '\0'; + this->consumer_handler_->threshold_value_ = + ACE_OS::atoi (needed_stock_value); + + // Register with the server. + this->consumer_handler_->server_->register_callback (this->consumer_handler_->stock_name_, + this->consumer_handler_->threshold_value_, + this->consumer_handler_->consumer_var_.in (), + TAO_TRY_ENV); TAO_CHECK_ENV; + + // Note the registration. + registered_ = 1; + ACE_DEBUG ((LM_DEBUG, + "registeration done!\n")); } + TAO_CATCHANY { - TAO_TRY_ENV.print_exception ("Consumer_Input_Handler::init"); + TAO_TRY_ENV.print_exception ("Consumer_Input_Handler::register_consumer()\n"); return -1; } TAO_ENDTRY; - - return 0; } -int -Consumer_Input_Handler::run (void) + +void +Consumer_Input_Handler::unregister_consumer () { + // Only if the consumer is registered can the + // unregistration take place. + CORBA::Environment TAO_TRY_ENV; TAO_TRY { - ACE_NEW_RETURN (this->consumer_servant_, - Consumer_i (), - -1); - // Set the orb in the consumer_ object. - this->consumer_servant_->orb (this->orb_.in ()); + if (registered_ == 1) + { + this->consumer_handler_->server_->unregister_callback (this->consumer_handler_->consumer_var_.in()); - ACE_DEBUG ((LM_DEBUG, - " Services provided:\n " - " * Registration \n " - " * Unregistration \n " - " * Quit \n ")); - - // Get the consumer stub (i.e consumer object) pointer. - this->consumer_var_ = - this->consumer_servant_->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; + TAO_CHECK_ENV; + + ACE_DEBUG ((LM_DEBUG, + " Consumer Unregistered \n ")); + unregistered_ = 1; + } + else + ACE_DEBUG ((LM_DEBUG, + " Invalid Operation: Consumer not Registered\n")); - // Run the ORB. - this->orb_->run (); } TAO_CATCHANY { - TAO_TRY_ENV.print_exception ("Consumer_Input_Handler::run ()"); + TAO_TRY_ENV.print_exception ("Consumer_Input_Handler::unregister_consumer()"); return -1; } TAO_ENDTRY; - - return 0; } -int -Consumer_Input_Handler::handle_input (ACE_HANDLE) +void +Consumer_Input_Handler::quit_consumer_process () { - char buf[BUFSIZ]; + // Only if the consumer is registered and wants to shut + // down, its necessary to unregister and then shutdown. + + CORBA::Environment TAO_TRY_ENV; TAO_TRY { - // The string could read contains \n\0 hence using ACE_OS::read - // which returns the no of bytes read and hence i can manipulate - // and remove the devil from the picture i.e '\n' ! ;) - - ssize_t strlen = ACE_OS::read (ACE_STDIN, - buf, - sizeof buf); - if (buf[strlen -1] == '\n') - buf[strlen -1] = '\0'; - - ACE_DEBUG ((LM_DEBUG, - "%s", - buf)); - - // @@ Whenever you've got big giant case statements break them - // into separate helper functions. - switch (tolower (buf[0])) + if (unregistered_ != 1 && registered_ == 1) { - case 'r': - { - // Get the stockname the consumer is interested in. - char stockname[BUFSIZ]; + this->consumer_handler_->server_->unregister_callback (this->consumer_handler_->consumer_var_.in ()); + ACE_DEBUG ((LM_DEBUG, + " Consumer Unregistered \n ")); - ACE_DEBUG ((LM_DEBUG, - "Stockname?")); - - strlen = ACE_OS::read (ACE_STDIN, - stockname, - sizeof stockname); - - if (stockname[strlen -1] == '\n') - stockname[strlen -1] = '\0'; - - this->stock_name_ = stockname; - - // Get the threshold value. - char needed_stock_value[BUFSIZ]; - ACE_DEBUG ((LM_DEBUG, - "Threshold Stock value?")); - - strlen = ACE_OS::read (ACE_STDIN, - needed_stock_value, - sizeof needed_stock_value); - - if (needed_stock_value[strlen -1] == '\n') - needed_stock_value[strlen -1] = '\0'; - - this->threshold_value_ = - ACE_OS::atoi (needed_stock_value); + TAO_CHECK_ENV; + } + this->consumer_handler_->consumer_servant_->shutdown (TAO_TRY_ENV); - // Register with the server. - server_->register_callback (this->stock_name_, - this->threshold_value_, - this->consumer_var_.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - // Note the registration. - registered_ = 1; - ACE_DEBUG ((LM_DEBUG, - "registeration done!\n")); - break; - } - case 'u': - { - // Only if the consumer is registered can the - // unregistration take place. - - if (registered_ == 1) - { - this->server_->unregister_callback (this->consumer_var_.in ()); - ACE_DEBUG ((LM_DEBUG, - " Consumer Unregistered \n ")); - unregistered_ = 1; - } - else - ACE_DEBUG ((LM_DEBUG, - " Invalid Operation: Consumer not Registered\n")); - break; - } - case 'q': - { - // Only if the consumer is registered and wants to shut - // down, its necessary to unregister and then shutdown. - - if (unregistered_ != 1 && registered_ == 1) - { - this->server_->unregister_callback (this->consumer_var_.in ()); - ACE_DEBUG ((LM_DEBUG, - " Consumer Unregistered \n ")); - } - this->consumer_servant_->shutdown (TAO_TRY_ENV); - TAO_CHECK_ENV; - break; - } - } } + TAO_CATCHANY { - TAO_TRY_ENV.print_exception ("Input_Handler::init"); + TAO_TRY_ENV.print_exception ("Consumer_Input_Handler::quit_consumer_process()"); return -1; } TAO_ENDTRY; - - return 0; } diff --git a/TAO/examples/Callback_Quoter/Consumer_Input_Handler.h b/TAO/examples/Callback_Quoter/Consumer_Input_Handler.h index 3d74636b0e9..cc5f9120075 100644 --- a/TAO/examples/Callback_Quoter/Consumer_Input_Handler.h +++ b/TAO/examples/Callback_Quoter/Consumer_Input_Handler.h @@ -21,18 +21,20 @@ #ifndef CONSUMER_INPUT_HANDLER_H #define CONSUMER_INPUT_HANDLER_H -#include "ConsumerC.h" -#include "NotifierC.h" -#include "Consumer_i.h" -#include "ace/Read_Buffer.h" +#include +#include +#include +#include "Consumer_Handler.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/TAO.h" -#include "orbsvcs/Naming/Naming_Utils.h" -#include "orbsvcs/CosNamingC.h" +// Creating a class to handle input events. +// Since only inputs need to be handled, only the handle_input +// method is overlaoded. + +class Consumer_Handler; class Consumer_Input_Handler : public ACE_Event_Handler { @@ -45,74 +47,30 @@ class Consumer_Input_Handler : public ACE_Event_Handler // and receives the stock status from the Notifier. public: - // = Initialization and termination methods. - Consumer_Input_Handler (void); - // Constructor. - - ~Consumer_Input_Handler (void); - // Destructor. - int init (int argc, char *argv[]); - // Initialize the client communication with the server. - - int run (void); - // Start the ORB object. + Consumer_Input_Handler (Consumer_Handler *consumer_handler); virtual int handle_input (ACE_HANDLE); // Handle the user input. -private: - int read_ior (char *filename); - // Function to read the server IOR from a file. - - int parse_args (void); - // Parse the command line arguments. Returns 0 on success, -1 on - // error. - - int via_naming_service (void); - // This method initialises the naming service and registers the - // object with the POA. - - int argc_; - // # of arguments on the command line. + void register_consumer (); + // Registration with the notifier. - char **argv_; - // arguments from command line. + void unregister_consumer (); + // Cancelling the registration with the notifier. - char *ior_; - // IOR of the obj ref of the server. + void quit_consumer_process (); + // Ends the consumer process. - int shutdown_; - // Flag for server shutdown. - - CORBA::Environment env_; - // Environment variable. - - TAO_Naming_Client naming_services_client_; - // An instance of the name client used for resolving the factory - // objects. - - int use_naming_service_; - // This variable denotes whether the naming service - // is used or not. - - char *stock_name_; - // the name of the stock the consumer is interested in. - - int threshold_value_; - // the desired price of the stock. - - Notifier_var server_; - // Server object ptr. +private: - CORBA::ORB_var orb_; - // Our orb. + ~Consumer_Input_Handler () + { - Consumer_i *consumer_servant_; - // The consumer object. + } - Callback_Quoter::Consumer_var consumer_var_; - // Pointer to the consumerobject registered with the ORB. + Consumer_Handler *consumer_handler_; + // The Consumer_Handler object. int registered_; // Flag which notes whether the consumer has got registered with the @@ -123,16 +81,16 @@ private: // the Notifier-server. }; -#define REGISTER_STRING "register" -// The string that the user must type to register the consumer with +#define REGISTER 'r' +// The character that the user must type to register the consumer with // the Notifier_server. -#define UNREGISTER_STRING "unregister" -// The string that the user must type to unregister the consumer with +#define UNREGISTER 'u' +// The character that the user must type to unregister the consumer with // the Notifier_server. -#define EXIT_STRING "quit" -// The string the user must type to quit the consumer client +#define EXIT 'q' +// The character the user must type to quit the consumer client // application. #endif /* CONSUMER_INPUT_HANDLER_H */ diff --git a/TAO/examples/Callback_Quoter/Consumer_Signal_Handler.cpp b/TAO/examples/Callback_Quoter/Consumer_Signal_Handler.cpp new file mode 100644 index 00000000000..1132b402f3c --- /dev/null +++ b/TAO/examples/Callback_Quoter/Consumer_Signal_Handler.cpp @@ -0,0 +1,49 @@ +/* -*- C++ -*- */ +// $Id$ + +// =========================================================== +// +// +// = LIBRARY +// TAO/examples/Callback_Quoter +// +// = FILENAME +// Consumer_Input_Handler.cpp +// +// = DESCRIPTION +// Implementation of the Consumer_Signal_Handler class. +// +// = AUTHOR +// Kirthika Parameswaran +// +// =========================================================== + +#include + +Consumer_Signal_Handler:: Consumer_Signal_Handler (Consumer_Handler *consumer_handler) +{ + consumer_handler_ = consumer_handler; +} + +Consumer_Signal_Handler:: ~Consumer_Signal_Handler () +{ +} + +int +Consumer_Signal_Handler::handle_signal (int signum, siginfo_t*, ucontext_t*) +{ + switch (signum) + { + case SIGWINCH: + ACE_DEBUG ((LM_DEBUG, + "Signal received on terminal window change!\n")); + break; + + case SIGINT: + ACE_DEBUG ((LM_DEBUG, + " Exiting on receiving ^C\n")); + break; + } + + return 0; +} diff --git a/TAO/examples/Callback_Quoter/Consumer_Signal_Handler.h b/TAO/examples/Callback_Quoter/Consumer_Signal_Handler.h new file mode 100644 index 00000000000..2e20fede8be --- /dev/null +++ b/TAO/examples/Callback_Quoter/Consumer_Signal_Handler.h @@ -0,0 +1,54 @@ +/* -*- C++ -*- */ +// $Id$ + +// =========================================================== +// +// +// = LIBRARY +// TAO/examples/Callback_Quoter +// +// = FILENAME +// Consumer_Input_Handler.h +// +// = DESCRIPTION +// Definition of the Consumer_Signal_Handler class. +// +// = AUTHOR +// Kirthika Parameswaran +// +// =========================================================== + +#ifndef CONSUMER_SIGNAL_HANDLER_H +#define CONSUMER_SIGNAL_HANDLER_H + +#include +#include +#include +#include "Consumer_Handler.h" + +// Creating a class to handle signal events. +// Since only signals need to be handled, only the handle_signal +// method is overlaoded. + +class Consumer_Handler; + +class Consumer_Signal_Handler : public ACE_Event_Handler +{ +public: + + Consumer_Signal_Handler (Consumer_Handler *consumer_handler); + // The consumer_handler refernce will be used to access + // the servant methods. + + virtual int handle_signal (int signum, siginfo_t*, ucontext_t*); + // This method takes action on an signal event. +private: + + ~Consumer_Signal_Handler (); + + Consumer_Handler *consumer_handler_; + +}; + + +#endif /* CONSUMER_SIGNAL_HANDLER_H */ diff --git a/TAO/examples/Callback_Quoter/Makefile b/TAO/examples/Callback_Quoter/Makefile index 19e4737c97c..0e5700ae176 100644 --- a/TAO/examples/Callback_Quoter/Makefile +++ b/TAO/examples/Callback_Quoter/Makefile @@ -24,7 +24,10 @@ PROG_SRCS = \ Notifier_Input_Handler.cpp \ Notifier_i.cpp \ Consumer_i.cpp \ - Consumer_Input_Handler.cpp + Consumer_Input_Handler.cpp \ + Consumer_Signal_Handler.cpp \ + Consumer_Handler.cpp + SRC = $(IDL_SRC) $(PROG_SRCS) @@ -32,6 +35,8 @@ CONSUMER_CLT_OBJS = \ NotifierC.o \ NotifierS.o \ Consumer_Input_Handler.o \ + Consumer_Signal_Handler.o \ + Consumer_Handler.o \ consumer.o\ ConsumerC.o\ ConsumerS.o \ @@ -217,6 +222,9 @@ realclean: clean $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ $(ACE_ROOT)/ace/Message_Queue_T.i \ @@ -455,6 +463,9 @@ realclean: clean $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ $(ACE_ROOT)/ace/Message_Queue_T.i \ @@ -693,6 +704,9 @@ realclean: clean $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ $(ACE_ROOT)/ace/Message_Queue_T.i \ @@ -930,6 +944,9 @@ realclean: clean $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ $(ACE_ROOT)/ace/Message_Queue_T.i \ @@ -1053,7 +1070,7 @@ realclean: clean $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ $(TAO_ROOT)/tao/DynAny_i.h \ ConsumerC.i ConsumerS_T.h ConsumerS_T.i ConsumerS_T.cpp ConsumerS.i -.obj/consumer.o .obj/consumer.so .shobj/consumer.o .shobj/consumer.so: consumer.cpp Consumer_Input_Handler.h ConsumerC.h \ +.obj/consumer.o .obj/consumer.so .shobj/consumer.o .shobj/consumer.so: consumer.cpp Consumer_Handler.h ConsumerC.h \ $(TAO_ROOT)/tao/corba.h \ $(TAO_ROOT)/tao/orbconf.h \ $(ACE_ROOT)/ace/OS.h \ @@ -1166,6 +1183,9 @@ realclean: clean $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ $(ACE_ROOT)/ace/Message_Queue_T.i \ @@ -1309,7 +1329,8 @@ realclean: clean $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h + $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ + Consumer_Input_Handler.h Consumer_Signal_Handler.h .obj/supplier.o .obj/supplier.so .shobj/supplier.o .shobj/supplier.so: supplier.cpp Supplier_i.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ $(TAO_ROOT)/tao/corba.h \ @@ -1424,6 +1445,9 @@ realclean: clean $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ $(ACE_ROOT)/ace/Message_Queue_T.i \ @@ -1679,6 +1703,9 @@ realclean: clean $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ $(ACE_ROOT)/ace/Message_Queue_T.i \ @@ -1931,6 +1958,9 @@ realclean: clean $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ $(ACE_ROOT)/ace/Message_Queue_T.i \ @@ -2188,6 +2218,9 @@ realclean: clean $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ $(ACE_ROOT)/ace/Message_Queue_T.i \ @@ -2444,6 +2477,9 @@ realclean: clean $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ $(ACE_ROOT)/ace/Message_Queue_T.i \ @@ -2683,6 +2719,9 @@ realclean: clean $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ $(ACE_ROOT)/ace/Message_Queue_T.i \ @@ -2808,8 +2847,8 @@ realclean: clean ConsumerC.i ConsumerS_T.h ConsumerS_T.i ConsumerS_T.cpp ConsumerS.i \ NotifierS.h NotifierC.h NotifierC.i NotifierS_T.h NotifierS_T.i \ NotifierS_T.cpp NotifierS.i -.obj/Consumer_Input_Handler.o .obj/Consumer_Input_Handler.so .shobj/Consumer_Input_Handler.o .shobj/Consumer_Input_Handler.so: Consumer_Input_Handler.cpp \ - Consumer_Input_Handler.h ConsumerC.h \ +.obj/Consumer_Handler.o .obj/Consumer_Handler.so .shobj/Consumer_Handler.o .shobj/Consumer_Handler.so: Consumer_Handler.cpp Consumer_Handler.h \ + ConsumerC.h \ $(TAO_ROOT)/tao/corba.h \ $(TAO_ROOT)/tao/orbconf.h \ $(ACE_ROOT)/ace/OS.h \ @@ -2922,6 +2961,9 @@ realclean: clean $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ $(ACE_ROOT)/ace/Message_Queue_T.i \ @@ -3065,6 +3107,206 @@ realclean: clean $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h + $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ + Consumer_Input_Handler.h Consumer_Signal_Handler.h +.obj/Consumer_Input_Handler.o .obj/Consumer_Input_Handler.so .shobj/Consumer_Input_Handler.o .shobj/Consumer_Input_Handler.so: Consumer_Input_Handler.cpp \ + Consumer_Input_Handler.h Consumer_Handler.h ConsumerC.h \ + $(TAO_ROOT)/tao/corba.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/Get_Opt.h \ + $(ACE_ROOT)/ace/Get_Opt.i \ + $(ACE_ROOT)/ace/SOCK_Stream.h \ + $(ACE_ROOT)/ace/SOCK_IO.h \ + $(ACE_ROOT)/ace/SOCK.h \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/IPC_SAP.h \ + $(ACE_ROOT)/ace/IPC_SAP.i \ + $(ACE_ROOT)/ace/SOCK.i \ + $(ACE_ROOT)/ace/SOCK_IO.i \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK_Stream.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ + $(ACE_ROOT)/ace/Service_Config.h \ + $(ACE_ROOT)/ace/Service_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.i \ + $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/Time_Value.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.i \ + $(ACE_ROOT)/ace/SOCK_Connector.h \ + $(ACE_ROOT)/ace/SOCK_Connector.i \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Synch_Options.h \ + $(ACE_ROOT)/ace/Synch_Options.i \ + $(ACE_ROOT)/ace/Thread_Manager.h \ + $(ACE_ROOT)/ace/Thread_Manager.i \ + $(ACE_ROOT)/ace/Strategies_T.i \ + $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ + $(ACE_ROOT)/ace/Service_Types.h \ + $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.h \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue_T.h \ + $(ACE_ROOT)/ace/Message_Queue_T.i \ + $(ACE_ROOT)/ace/Message_Queue_T.cpp \ + $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Connector.h \ + $(ACE_ROOT)/ace/Map_Manager.h \ + $(ACE_ROOT)/ace/Map_Manager.i \ + $(ACE_ROOT)/ace/Map_Manager.cpp \ + $(ACE_ROOT)/ace/Svc_Handler.h \ + $(ACE_ROOT)/ace/Task.h \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.h \ + $(ACE_ROOT)/ace/Task_T.i \ + $(ACE_ROOT)/ace/Task_T.cpp \ + $(ACE_ROOT)/ace/Module.h \ + $(ACE_ROOT)/ace/Module.i \ + $(ACE_ROOT)/ace/Module.cpp \ + $(ACE_ROOT)/ace/Stream_Modules.h \ + $(ACE_ROOT)/ace/Stream_Modules.i \ + $(ACE_ROOT)/ace/Stream_Modules.cpp \ + $(ACE_ROOT)/ace/Svc_Handler.i \ + $(ACE_ROOT)/ace/Svc_Handler.cpp \ + $(ACE_ROOT)/ace/Dynamic.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(ACE_ROOT)/ace/Dynamic.i \ + $(ACE_ROOT)/ace/Connector.i \ + $(ACE_ROOT)/ace/Connector.cpp \ + $(ACE_ROOT)/ace/Acceptor.h \ + $(ACE_ROOT)/ace/Acceptor.i \ + $(ACE_ROOT)/ace/Acceptor.cpp \ + $(TAO_ROOT)/tao/Align.h \ + $(TAO_ROOT)/tao/Environment.h \ + $(TAO_ROOT)/tao/Environment.i \ + $(TAO_ROOT)/tao/ORB.h \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/Object_KeyC.h \ + $(TAO_ROOT)/tao/Object_KeyC.i \ + $(TAO_ROOT)/tao/Union.h \ + $(TAO_ROOT)/tao/ORB.i \ + $(TAO_ROOT)/tao/try_macros.h \ + $(TAO_ROOT)/tao/Exception.h \ + $(TAO_ROOT)/tao/Exception.i \ + $(TAO_ROOT)/tao/Any.h \ + $(TAO_ROOT)/tao/Any.i \ + $(TAO_ROOT)/tao/NVList.h \ + $(TAO_ROOT)/tao/NVList.i \ + $(TAO_ROOT)/tao/Principal.h \ + $(TAO_ROOT)/tao/Principal.i \ + $(TAO_ROOT)/tao/Request.h \ + $(TAO_ROOT)/tao/Request.i \ + $(TAO_ROOT)/tao/Stub.h \ + $(TAO_ROOT)/tao/Stub.i \ + $(TAO_ROOT)/tao/Object.h \ + $(TAO_ROOT)/tao/Object.i \ + $(TAO_ROOT)/tao/varout.h \ + $(TAO_ROOT)/tao/varout.i \ + $(TAO_ROOT)/tao/varout.cpp \ + $(TAO_ROOT)/tao/Typecode.h \ + $(TAO_ROOT)/tao/Typecode.i \ + $(TAO_ROOT)/tao/Marshal.h \ + $(TAO_ROOT)/tao/Marshal.i \ + $(TAO_ROOT)/tao/singletons.h \ + $(TAO_ROOT)/tao/CDR.h \ + $(TAO_ROOT)/tao/CDR.i \ + $(TAO_ROOT)/tao/PolicyC.h \ + $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/CurrentC.h \ + $(TAO_ROOT)/tao/CurrentC.i \ + $(TAO_ROOT)/tao/POA.h \ + $(TAO_ROOT)/tao/POAC.h \ + $(TAO_ROOT)/tao/POAC.i \ + $(TAO_ROOT)/tao/Servant_Base.h \ + $(TAO_ROOT)/tao/POAS.h \ + $(TAO_ROOT)/tao/POA_CORBA.h \ + $(TAO_ROOT)/tao/DynAnyC.h \ + $(TAO_ROOT)/tao/DynAnyC.i \ + $(TAO_ROOT)/tao/POAS.i \ + $(TAO_ROOT)/tao/Object_Table.h \ + $(TAO_ROOT)/tao/Object_Table.i \ + $(TAO_ROOT)/tao/POA.i \ + $(TAO_ROOT)/tao/poa_macros.h \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ + $(TAO_ROOT)/tao/Connect.h \ + $(TAO_ROOT)/tao/Connect.i \ + $(TAO_ROOT)/tao/ORB_Core.h \ + $(TAO_ROOT)/tao/ORB_Core.i \ + $(ACE_ROOT)/ace/Dynamic_Service.h \ + $(ACE_ROOT)/ace/Dynamic_Service.cpp \ + $(TAO_ROOT)/tao/Operation_Table.h \ + $(TAO_ROOT)/tao/debug.h \ + $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ + $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ + $(TAO_ROOT)/tao/default_client.h \ + $(TAO_ROOT)/tao/default_client.i \ + $(TAO_ROOT)/tao/default_server.h \ + $(TAO_ROOT)/tao/ORB_Strategies_T.h \ + $(TAO_ROOT)/tao/ORB_Strategies_T.i \ + $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ + $(TAO_ROOT)/tao/default_server.i \ + $(TAO_ROOT)/tao/IIOP_Object.h \ + $(TAO_ROOT)/tao/IIOP_Object.i \ + $(TAO_ROOT)/tao/IIOP_ORB.h \ + $(TAO_ROOT)/tao/IIOP_ORB.i \ + $(TAO_ROOT)/tao/IIOP_Interpreter.h \ + $(TAO_ROOT)/tao/GIOP.h \ + $(TAO_ROOT)/tao/GIOP.i \ + $(TAO_ROOT)/tao/Invocation.h \ + $(TAO_ROOT)/tao/Invocation.i \ + $(TAO_ROOT)/tao/Server_Request.h \ + $(TAO_ROOT)/tao/Server_Request.i \ + $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ + $(TAO_ROOT)/tao/DynAny_i.h \ + ConsumerC.i NotifierC.h NotifierC.i Consumer_i.h ConsumerS.h \ + ConsumerS_T.h ConsumerS_T.i ConsumerS_T.cpp ConsumerS.i NotifierS.h \ + NotifierS_T.h NotifierS_T.i NotifierS_T.cpp NotifierS.i \ + $(ACE_ROOT)/ace/Read_Buffer.h \ + $(ACE_ROOT)/ace/Read_Buffer.i \ + $(TAO_ROOT)/tao/TAO.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ + $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ + $(ACE_ROOT)/ace/SOCK_Dgram.h \ + $(ACE_ROOT)/ace/SOCK_Dgram.i \ + $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ + Consumer_Signal_Handler.h +.obj/Consumer_Signal_Handler.o .obj/Consumer_Signal_Handler.so .shobj/Consumer_Signal_Handler.o .shobj/Consumer_Signal_Handler.so: Consumer_Signal_Handler.cpp # IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/examples/Callback_Quoter/consumer.cpp b/TAO/examples/Callback_Quoter/consumer.cpp index f8d8c4e8037..9060eb9ec1d 100644 --- a/TAO/examples/Callback_Quoter/consumer.cpp +++ b/TAO/examples/Callback_Quoter/consumer.cpp @@ -1,13 +1,13 @@ // $Id$ -#include "Consumer_Input_Handler.h" +#include "Consumer_Handler.h" // This function runs the Callback Quoter Consumer application. int main (int argc, char **argv) { - Consumer_Input_Handler consumer; + Consumer_Handler consumer; ACE_DEBUG ((LM_DEBUG, "\n\t***Consumer***\n\n")); -- cgit v1.2.1