diff options
Diffstat (limited to 'TAO/examples/Simple/chat')
-rw-r--r-- | TAO/examples/Simple/chat/Broadcaster.idl | 34 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Broadcaster_i.cpp | 185 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Broadcaster_i.h | 96 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Client_i.cpp | 249 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Client_i.h | 93 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Makefile | 117 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/README | 70 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Receiver.idl | 15 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Receiver_i.cpp | 50 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Receiver_i.h | 57 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Server.h | 18 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Server_i.cpp | 118 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/Server_i.h | 67 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/chat.dsw | 41 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/client.cpp | 42 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/client.dsp | 235 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/server.cpp | 56 | ||||
-rw-r--r-- | TAO/examples/Simple/chat/server.dsp | 239 |
18 files changed, 0 insertions, 1782 deletions
diff --git a/TAO/examples/Simple/chat/Broadcaster.idl b/TAO/examples/Simple/chat/Broadcaster.idl deleted file mode 100644 index fe1d52325e3..00000000000 --- a/TAO/examples/Simple/chat/Broadcaster.idl +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "Receiver.idl" - -interface Broadcaster -{ - // = TITLE - // This interface is to be implemented by the simple chat server. - // It broadcasts messages received from one registered client to - // all its registered clients. - - exception CannotAdd - { - string reason_; - }; - - exception CannotRemove - { - string reason_; - }; - - void add (in Receiver receiver, in string nickname) - raises (CannotAdd); - // Registers a Receiver with the chat server. A registered client - // must call un_register before it goes away. - - void remove (in Receiver receiver) - raises (CannotRemove); - // Unregisters a Receiver. - - void say (in Receiver receiver, in string text); - // Say something to all registered clients. -}; diff --git a/TAO/examples/Simple/chat/Broadcaster_i.cpp b/TAO/examples/Simple/chat/Broadcaster_i.cpp deleted file mode 100644 index 3a9480da0ec..00000000000 --- a/TAO/examples/Simple/chat/Broadcaster_i.cpp +++ /dev/null @@ -1,185 +0,0 @@ -// $Id$ - -// =========================================================== -// -// = LIBRARY -// TAO/tests/Simple/chat -// -// = FILENAME -// Broadcaster_i.cpp -// -// = DESCRIPTION -// Implementation of the Broadcaster_i class. This class is the servant -// object for the chat server. -// -// = AUTHOR -// Pradeep Gore <pradeep@cs.wustl.edu> -// -// =========================================================== - -#include "Broadcaster_i.h" - -int -Broadcaster_i::Receiver_Data::operator == (const Broadcaster_i::Receiver_Data &receiver_data) const -{ - // The <_is_equivalent> function checks if the _var and _ptr objects - // are the same. NOTE: this call might not behave well on other - // ORBs since <_is_equivalent> isn't guaranteed to differentiate - // object references. - return this->receiver_->_is_equivalent (receiver_data.receiver_.in ()) - && this->nickname_ == receiver_data.nickname_; -} - -Broadcaster_i::Broadcaster_i (void) -{ - // No-op -} - -Broadcaster_i::~Broadcaster_i (void) -{ - // No-op -} - -void -Broadcaster_i::add (Receiver_ptr receiver, - const char *nickname, - CORBA::Environment &TAO_TRY_ENV) -{ - Broadcaster_i::Receiver_Data receiver_data; - - // Store the client information. - receiver_data.receiver_ = Receiver::_duplicate (receiver); - receiver_data.nickname_ = nickname; - - // Insert the Receiver reference to the set - if (receiver_set_.insert (receiver_data) == -1) - TAO_TRY_ENV.exception (new Broadcaster::CannotAdd - ("failed to add to the receiver set\n")); - - // Tell everyone which person just joined the chat. - ACE_CString broadcast_string = - ACE_CString ("**** ") - + ACE_CString (nickname) - + ACE_CString (" has joined the chat ****\n"); - - TAO_TRY - { - this->broadcast (broadcast_string.fast_rep (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Broadcaster_i::add\t\n"); - } - TAO_ENDTRY; -} - -void -Broadcaster_i::remove (Receiver_ptr receiver, - CORBA::Environment &TAO_TRY_ENV) -{ - Broadcaster_i::Receiver_Data receiver_data_to_remove; - - // Go through the list of <Receiver_Data> to find which registered client - // wants to be removed. - for (RECEIVER_SET_ITERATOR iter = this->receiver_set_.begin (); - iter != this->receiver_set_.end (); - iter++) - { - // The <_is_equivalent> function checks if the _var and _ptr objects - // are the same. NOTE: this call might not behave well on other - // ORBs since <_is_equivalent> isn't guaranteed to differentiate - // object references. - if ((*iter).receiver_.in ()->_is_equivalent (receiver) == 1) - { - receiver_data_to_remove = *iter; - break; - } - } - - // Remove the reference from our list. - if (this->receiver_set_.remove (receiver_data_to_remove) == -1) - TAO_TRY_ENV.exception(new Broadcaster::CannotRemove - ("failed to remove from receiver set\n")); - - // Tell everyone, which person left the chat. - ACE_CString broadcast_string = "**** " - + receiver_data_to_remove.nickname_ - + " left the chat" - + " ****\n"; - - this->broadcast (broadcast_string.fast_rep (), - TAO_TRY_ENV); -} - -void -Broadcaster_i::say (Receiver_ptr receiver, - const char *text, - CORBA::Environment &T) -{ - TAO_TRY - { - ACE_CString sender_nickname ("Sender Unknown"); - - // Find the nickname for this receiver. - - for (RECEIVER_SET_ITERATOR iter = this->receiver_set_.begin (); - iter != this->receiver_set_.end (); - iter++) - { - // The <_is_equivalent> function checks if the _var and - // _ptr objects are the same. NOTE: this call might not - // behave well on other ORBs since <_is_equivalent> isn't - // guaranteed to differentiate object references. - if ((*iter).receiver_.in ()->_is_equivalent (receiver) == 1) - sender_nickname = (*iter).nickname_; - } - - // Broadcast the message to all registered clients - ACE_CString broadcast_string ("[" + sender_nickname + "] " + text); - - this->broadcast (broadcast_string.fast_rep (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Broadcaster_i::say\t\n"); - } - TAO_ENDTRY; -} - -void -Broadcaster_i::broadcast (const char *text, - CORBA::Environment &) -{ - // Broadcast the message to all registered clients. - - for (RECEIVER_SET_ITERATOR iter = this->receiver_set_.begin (); - iter != this->receiver_set_.end (); - iter++) - { - TAO_TRY - { - (*iter).receiver_->message (text, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Failed to send a message\n"); - } - TAO_ENDTRY; - } -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Unbounded_Set<Broadcaster_i::Receiver_Data>; -template class ACE_Unbounded_Set_Iterator<Broadcaster_i::Receiver_Data>; -template class ACE_Node<Broadcaster_i::Receiver_Data>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Unbounded_Set<Broadcaster_i::Receiver_Data> -#pragma instantiate ACE_Unbounded_Set_Iterator<Broadcaster_i::Receiver_Data> -#pragma instantiate ACE_Node<Broadcaster_i::Receiver_Data> -#endif /* ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA */ diff --git a/TAO/examples/Simple/chat/Broadcaster_i.h b/TAO/examples/Simple/chat/Broadcaster_i.h deleted file mode 100644 index 2b4958ef096..00000000000 --- a/TAO/examples/Simple/chat/Broadcaster_i.h +++ /dev/null @@ -1,96 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// =========================================================== -// -// = LIBRARY -// TAO/tests/Simple/chat -// -// = FILENAME -// Broadcaster_i.h -// -// = DESCRIPTION -// Defines the implementation header for the Broadcaster interface. -// -// = AUTHOR -// Pradeep Gore <pradeep@cs.wustl.edu> -// -// =========================================================== - -#ifndef BROADCASTER_I_H -#define BROADCASTER_I_H - -#include "BroadcasterS.h" -#include "ReceiverC.h" -#include "tao/TAO.h" -#include "ace/Containers.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/SString.h" - -class Broadcaster_i : public POA_Broadcaster -{ - // = TITLE - // The implementation of the Broadcaster class, which is the - // servant object for the chat server. -public: - // = Initialization and termination methods. - Broadcaster_i (void); - // Constructor. - - ~Broadcaster_i (void); - // Destructor. - - virtual void add (Receiver_ptr receiver, - const char *nickname, - CORBA::Environment &TAO_TRY_ENV); - // Saves receiver references in a list. - - virtual void remove (Receiver_ptr receiver, - CORBA::Environment &TAO_TRY_ENV); - // Removes receiver references from the list. - - virtual void say (Receiver_ptr receiver, - const char *text, - CORBA::Environment &TAO_TRY_ENV); - // Called by Broadcaster clients to send messages. - -public: - TAO_ORB_Manager orb_manager_; - // The ORB manager. - - void broadcast (const char* text, - CORBA::Environment &TAO_TRY_ENV); - // Broadcasts the text to all registered clients. - - class Receiver_Data - { - // = TITLE - // Per-client info. - // - // = DESCRIPTION - // Saves the Receiver_var and user nickname. - public: - int operator == (const Receiver_Data &receiver_data) const; - // The == op required by the ACE_Unbounded set. - - Receiver_var receiver_; - // Stores the receiver reference. - - ACE_CString nickname_; - // Stores the client nickname. - }; - - typedef ACE_Unbounded_Set<Receiver_Data> - RECEIVER_SET; - typedef ACE_Unbounded_Set_Iterator<Receiver_Data> - RECEIVER_SET_ITERATOR; - - RECEIVER_SET receiver_set_; - // Set of registered clients. -}; - -#endif /* BROADCASTER_I_H */ diff --git a/TAO/examples/Simple/chat/Client_i.cpp b/TAO/examples/Simple/chat/Client_i.cpp deleted file mode 100644 index a8bb90c667e..00000000000 --- a/TAO/examples/Simple/chat/Client_i.cpp +++ /dev/null @@ -1,249 +0,0 @@ -// $Id$ - -// =========================================================== -// -// -// = LIBRARY -// TAO/tests/Simple/chat -// -// = FILENAME -// Client_i.cpp -// -// = DESCRIPTION -// Implementation of the Client_i class. -// -// = AUTHOR -// Pradeep Gore <pradeep@cs.wustl.edu> -// -// =========================================================== - -#include "Client_i.h" -#include "ace/Read_Buffer.h" -#include "tao/ORB.h" -#include "ace/Get_Opt.h" - -Client_i::Client_i () - : ior_file_name_ ("chat.ior"), - nickname_ ("noname") -{ -} - -Client_i::~Client_i (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")); -} - -int -Client_i::parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "n:f:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'n': // get the users nickname - this->nickname_ = get_opts.optarg; - break; - - case 'f': // get the file name to write to - this->ior_file_name_ = get_opts.optarg; - break; - - default: // display help for use of the serve - case '?': // display help for use of the server. - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-n <your_nick_name>]" - " [-f <ior_input_file>]" - "\n", - argv [0]), - -1); - } - - ACE_DEBUG ((LM_DEBUG, - "\nusing nickname = %s, filename = %s\n", - this->nickname_, - this->ior_file_name_)); - return 0; -} - -int -Client_i::init (int argc, char *argv[]) -{ - // Check if the command line arguments are ok. - if (this->parse_args (argc, argv) == -1) - return -1; - - CORBA::Environment TAO_TRY_ENV; - - TAO_TRY - { - // Retrieve the ORB. - this->orb_ = CORBA::ORB_init (argc, - argv, - 0, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // set the orb in the receiver_i_ object. - this->receiver_i_.orb (this->orb_.in ()); - - // read the ior from file - if (this->read_ior (this->ior_file_name_) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "could not read the ior from the file: <%s>\n", - this->ior_file_name_), - -1); - - CORBA::Object_var server_object = - this->orb_->string_to_object (this->ior_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (server_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid ior <%s>\n", - this->ior_), - -1); - - this->server_ = Broadcaster::_narrow (server_object.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("client_i::init\n"); - return -1; - } - TAO_ENDTRY; - - // Register our <Input_Handler> to handle STDIN events, which will - // trigger the <handle_input> method to process these events. - - 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); - return 0; -} - -int -Client_i::run (void) -{ - ACE_DEBUG ((LM_DEBUG, - "\n============= Simple Chat =================\n" - "========== type 'quit' to exit ===========\n")); - - CORBA::Environment TAO_TRY_ENV; - - TAO_TRY - { - this->receiver_var_ = - this->receiver_i_._this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Register ourselves with the server. - server_->add (this->receiver_var_.in (), - this->nickname_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Run the ORB. - this->orb_->run (); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Client_i::run ()"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -int -Client_i::handle_input (ACE_HANDLE) -{ - char buf[BUFSIZ]; - - if (ACE_OS::fgets (buf, BUFSIZ, stdin) == 0) - return 0; - - CORBA::Environment TAO_TRY_ENV; - - TAO_TRY - { - // Check if the user wants to quit. - if (ACE_OS::strncmp (buf, - QUIT_STRING, - ACE_OS::strlen (QUIT_STRING)) == 0) - { - // Remove ourselves from the server. - this->server_->remove (this->receiver_var_.in ()); - this->receiver_i_.shutdown (TAO_TRY_ENV); - - TAO_CHECK_ENV; - return 0; - } - - // Call the server function <say> to pass the string typed by - // the server. - this->server_->say (this->receiver_var_.in (), - buf, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Input_Handler::init"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -int -Client_i::read_ior (const 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, - "invalid handle"), - -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); - - ACE_OS::close (f_handle); - - if (this->ior_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "failed to read ior from file\n", - ""), - -1); - return 0; -} diff --git a/TAO/examples/Simple/chat/Client_i.h b/TAO/examples/Simple/chat/Client_i.h deleted file mode 100644 index bbbd82d289e..00000000000 --- a/TAO/examples/Simple/chat/Client_i.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// =========================================================== -// -// -// = LIBRARY -// TAO/tests/Simple/chat -// -// = FILENAME -// Client_i.h -// -// = DESCRIPTION -// Definition of the Chat Client class, Client_i. -// -// = AUTHOR -// Pradeep Gore <pradeep@cs.wustl.edu> -// -// =========================================================== - -#ifndef CLIENT_I_H -#define CLIENT_I_H - -#include "Receiver_i.h" -#include "BroadcasterC.h" -#include "ace/Read_Buffer.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/TAO.h" - -class Client_i : public ACE_Event_Handler -{ - // = TITLE - // Chat Client class. - // - // = DESCRIPTION - // Connects to the Chat server and registers the Receiver_i - // object with the chat server. It also takes in user chat - // messages and sends them to the server. -public: - // = Initialization and termination methods. - Client_i (void); - // Constructor. - - ~Client_i (void); - // Destructor. - - int init (int argc, char *argv[]); - // Initialize the client communication with the server. - - int run (void); - // Start the ORB object. - - virtual int handle_input (ACE_HANDLE); - // Handle the user input. - - private: - int parse_args (int argc, char *argv[]); - // Parse the command line arguments. - // Returns 0 on success, -1 on error. - - int read_ior (const char *filename); - // Function to read the server ior from a file. - - char *ior_; - // IOR of the obj ref of the server. - - const char* ior_file_name_; - // The filename that stores the ior of the server - - const char* nickname_; - // Nickname of the user chatting. - - Broadcaster_var server_; - // Server object ptr. - - CORBA::ORB_var orb_; - // Our orb. - - Receiver_i receiver_i_; - // The receiver object. - - Receiver_var receiver_var_; - // Pointer to the receiver object registered with the ORB. -}; - -#define QUIT_STRING "quit" -// The string that the user must type to quit the chat. - -#endif /* CLIENT_I_H */ diff --git a/TAO/examples/Simple/chat/Makefile b/TAO/examples/Simple/chat/Makefile deleted file mode 100644 index 5e3c351fdbb..00000000000 --- a/TAO/examples/Simple/chat/Makefile +++ /dev/null @@ -1,117 +0,0 @@ -# $Id$ -# -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif # ! TAO_ROOT - -LDLIBS = -lTAO - -IDL_SRC = ReceiverC.cpp ReceiverS.cpp BroadcasterC.cpp BroadcasterS.cpp - -PROG_SRCS = \ - Receiver_i.cpp \ - Broadcaster_i.cpp \ - client.cpp \ - server.cpp - - -SRC = $(IDL_SRC) $(PROG_SRCS) - -SIMPLE_CLT_OBJS = \ - ReceiverS.o \ - ReceiverC.o \ - BroadcasterC.o \ - BroadcasterS.o \ - Receiver_i.o \ - Client_i.o \ - client.o - -SIMPLE_SVR_OBJS = \ - ReceiverS.o \ - ReceiverC.o \ - BroadcasterC.o \ - BroadcasterS.o \ - Broadcaster_i.o \ - Server_i.o \ - server.o - -BIN = server \ - client -BUILD = $(BIN) -VLDLIBS = $(LDLIBS:%=%$(VAR)) -VBIN = $(BIN:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -LDFLAGS += -L$(TAO_ROOT)/tao -CPPFLAGS += - -.PRECIOUS: ReceiverC.cpp ReceiverC.i ReceiverC.h -.PRECIOUS: ReceiverS.cpp ReceiverS.i ReceiverS.h -.PRECIOUS: ReceiverS_T.cpp ReceiverS_T.i ReceiverS_T.h -.PRECIOUS: BroadcasterC.cpp BroadcasterC.i BroadcasterC.h -.PRECIOUS: BroadcasterS.cpp BroadcasterS.i BroadcasterS.h -.PRECIOUS: BroadcasterS_T.cpp BroadcasterS_T.i BroadcasterS_T.h - -server: $(addprefix $(VDIR),$(SIMPLE_SVR_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -client: $(addprefix $(VDIR),$(SIMPLE_CLT_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -realclean: clean - -/bin/rm -rf ReceiverC.* ReceiverS.* ReceiverS_T.* BroadcasterC.* BroadcasterS.* BroadcasterS_T.* - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/ReceiverC.o .obj/ReceiverC.so .shobj/ReceiverC.o .shobj/ReceiverC.so: ReceiverC.cpp ReceiverC.h ReceiverC.i ReceiverS.h \ - ReceiverS_T.h ReceiverS_T.i ReceiverS_T.cpp ReceiverS.i -.obj/ReceiverS.o .obj/ReceiverS.so .shobj/ReceiverS.o .shobj/ReceiverS.so: ReceiverS.cpp ReceiverS.h ReceiverC.h ReceiverC.i \ - ReceiverS_T.h ReceiverS_T.i ReceiverS_T.cpp ReceiverS.i -.obj/BroadcasterC.o .obj/BroadcasterC.so .shobj/BroadcasterC.o .shobj/BroadcasterC.so: BroadcasterC.cpp BroadcasterC.h ReceiverC.h \ - ReceiverC.i BroadcasterC.i BroadcasterS.h ReceiverS.h ReceiverS_T.h \ - ReceiverS_T.i ReceiverS_T.cpp ReceiverS.i BroadcasterS_T.h \ - BroadcasterS_T.i BroadcasterS_T.cpp BroadcasterS.i -.obj/BroadcasterS.o .obj/BroadcasterS.so .shobj/BroadcasterS.o .shobj/BroadcasterS.so: BroadcasterS.cpp BroadcasterS.h ReceiverS.h \ - ReceiverC.h ReceiverC.i ReceiverS_T.h ReceiverS_T.i ReceiverS_T.cpp \ - ReceiverS.i BroadcasterC.h BroadcasterC.i BroadcasterS_T.h \ - BroadcasterS_T.i BroadcasterS_T.cpp BroadcasterS.i -.obj/Receiver_i.o .obj/Receiver_i.so .shobj/Receiver_i.o .shobj/Receiver_i.so: Receiver_i.cpp Receiver_i.h ReceiverS.h ReceiverC.h \ - ReceiverC.i ReceiverS_T.h ReceiverS_T.i ReceiverS_T.cpp ReceiverS.i -.obj/Broadcaster_i.o .obj/Broadcaster_i.so .shobj/Broadcaster_i.o .shobj/Broadcaster_i.so: Broadcaster_i.cpp Broadcaster_i.h BroadcasterS.h \ - ReceiverS.h ReceiverC.h ReceiverC.i ReceiverS_T.h ReceiverS_T.i \ - ReceiverS_T.cpp ReceiverS.i BroadcasterC.h BroadcasterC.i \ - BroadcasterS_T.h BroadcasterS_T.i BroadcasterS_T.cpp BroadcasterS.i \ - $(TAO_ROOT)/tao/TAO.h -.obj/client.o .obj/client.so .shobj/client.o .shobj/client.so: client.cpp Client_i.h Receiver_i.h ReceiverS.h ReceiverC.h \ - ReceiverC.i ReceiverS_T.h ReceiverS_T.i ReceiverS_T.cpp ReceiverS.i \ - BroadcasterC.h BroadcasterC.i \ - $(ACE_ROOT)/ace/Read_Buffer.h \ - $(ACE_ROOT)/ace/Read_Buffer.i \ - $(TAO_ROOT)/tao/TAO.h -.obj/server.o .obj/server.so .shobj/server.o .shobj/server.so: server.cpp Server_i.h Broadcaster_i.h BroadcasterS.h \ - ReceiverS.h ReceiverC.h ReceiverC.i ReceiverS_T.h ReceiverS_T.i \ - ReceiverS_T.cpp ReceiverS.i BroadcasterC.h BroadcasterC.i \ - BroadcasterS_T.h BroadcasterS_T.i BroadcasterS_T.cpp BroadcasterS.i \ - $(TAO_ROOT)/tao/TAO.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/examples/Simple/chat/README b/TAO/examples/Simple/chat/README deleted file mode 100644 index 4b7e530706a..00000000000 --- a/TAO/examples/Simple/chat/README +++ /dev/null @@ -1,70 +0,0 @@ -$Id$ - -This is a simple chat application that uses the TAO CORBA ORB. -It consists of a client and server programs. - -The server broadcasts messages from one client to all the clients registered with it. - -The client(s) register with a running server. It has a very simple user interface that accepts strings from the user and sends it across to the server. -The client code also demonstrates the use of the ACE_Event_Handlerclass to accept user input events. - -server: -------- - -server [-o <ior_output_file>] - -Options: -------- --o Outputs the server ior to the file specified. - -On successfull initialization, the server displays a message that it is running and waits for clients to register with it. - -if the [-o <ior_output_file>] option is not specified on the command line then the the server will write the IOR of the server CORBA object to a default file - "chat.ior". - -client: -------- - -client [-n <your_nick_name> -f <ior_input_file>] - -Options: -------- --n The nickname that the chat user wants to use. --f Reads the server ior from the file - -The nickname specified by the user is displayed by the chat server to all the clients. -To quit the chat, type "quit". - -if the [-f <ior_input_file>] option is not specified on the command line then the client will attempt to read the IOR of the server CORBA object from the default file - "chat.ior". - -VxWorks -------- -On VxWorks, it's easiest to run the client without any command -line options. That way, its stdin can be captured: - - -> ld < server - value = 400826292 = 0x17e41fb4 - -> spa main - value = 0 = 0x0 - Running chat server... - -> ld < client - value = 399329360 = 0x17cd4850 - -> main - - using defaults. nickname = noname, filename = chat.ior - - ============= Simple Chat ================= - ========== type 'quit' to exit =========== - : **** noname has joined the chat **** - - hello - : [noname] hello - - goodbye - : [noname] goodbye - - quit - value = 0 = 0x0 - -NOTE: if you built your VxWorks executables with g++, replace "main" -with "ace_main" above. See ACE-INSTALL.html for an explanation of why -ACE renames "main" to "ace_main" with g++ on VxWorks. diff --git a/TAO/examples/Simple/chat/Receiver.idl b/TAO/examples/Simple/chat/Receiver.idl deleted file mode 100644 index 90ea6570071..00000000000 --- a/TAO/examples/Simple/chat/Receiver.idl +++ /dev/null @@ -1,15 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -interface Receiver -{ - // = TITLE - // The Receiver interface is implemented by the simple chat - // clients.The interface functions are called by the chat server. - - void message (in string msg); - // Displays the message in the client application. - - oneway void shutdown (); - // Called by the chat server before it goes away. -}; diff --git a/TAO/examples/Simple/chat/Receiver_i.cpp b/TAO/examples/Simple/chat/Receiver_i.cpp deleted file mode 100644 index baebf861cc1..00000000000 --- a/TAO/examples/Simple/chat/Receiver_i.cpp +++ /dev/null @@ -1,50 +0,0 @@ -// $Id$ - -// =========================================================== -// -// = LIBRARY -// TAO/tests/Simple/chat -// -// = FILENAME -// Receiver_i.cpp -// -// = DESCRIPTION -// Implements the Receiver_i class, which is used by the chat client. -// -// = AUTHOR -// Pradeep Gore <pradeep@cs.wustl.edu> -// -// =========================================================== - -#include "Receiver_i.h" - -Receiver_i::Receiver_i (void) - : orb_ (0) -{ -} - -Receiver_i::~Receiver_i (void) -{ -} - -void -Receiver_i::message (const char *msg, - CORBA::Environment &) -{ - ACE_DEBUG ((LM_DEBUG, - ": %s\n", - msg)); -} - -void -Receiver_i::shutdown (CORBA::Environment &) -{ - // Instruct the ORB to shutdown. - this->orb_->shutdown (); -} - -void -Receiver_i::orb (CORBA::ORB_ptr o) -{ - this->orb_ = CORBA::ORB::_duplicate (o); -} diff --git a/TAO/examples/Simple/chat/Receiver_i.h b/TAO/examples/Simple/chat/Receiver_i.h deleted file mode 100644 index c0ec2f98fc2..00000000000 --- a/TAO/examples/Simple/chat/Receiver_i.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// =========================================================== -// -// = LIBRARY -// TAO/tests/Simple/chat -// -// = FILENAME -// Receiver_i.h -// -// = DESCRIPTION -// Defines the implementation header for the Receiver interface. -// -// = AUTHOR -// Pradeep Gore <pradeep@cs.wustl.edu> -// -// =========================================================== - -#ifndef RECEIVER_I_H -#define RECEIVER_I_H - -#include "ReceiverS.h" - -class Receiver_i : public POA_Receiver -{ - // = TITLE - // Receiver object implementation - // - // = DESCRIPTION - // This class has methods that are called by the chat server. -public: - // = Initialization and termination methods. - Receiver_i (void); - // Constructor. - - ~Receiver_i (void); - // Destructor. - - virtual void message (const char *msg, - CORBA::Environment &TAO_TRY_ENV); - // Receives a message string. - - virtual void shutdown (CORBA::Environment &TAO_TRY_ENV); - // Called when the chat server is going away. The client - // implementation should shutdown the chat client in response to - // this. - - void orb (CORBA::ORB_ptr o); - // Set the ORB pointer. - -private: - CORBA::ORB_var orb_; - // ORB pointer. -}; - -#endif /* RECEIVER_I_H */ diff --git a/TAO/examples/Simple/chat/Server.h b/TAO/examples/Simple/chat/Server.h deleted file mode 100644 index 4d47a8bf73d..00000000000 --- a/TAO/examples/Simple/chat/Server.h +++ /dev/null @@ -1,18 +0,0 @@ -// $Id$ - -// =========================================================== -// -// -// = LIBRARY -// TAO/tests/Simple/chat -// -// = FILENAME -// Server.h -// -// = DESCRIPTION -// Definition of the Server class for the chat. -// -// = AUTHOR -// Pradeep Gore <pradeep@cs.wustl.edu> -// -// =========================================================== diff --git a/TAO/examples/Simple/chat/Server_i.cpp b/TAO/examples/Simple/chat/Server_i.cpp deleted file mode 100644 index b5e4baa2a71..00000000000 --- a/TAO/examples/Simple/chat/Server_i.cpp +++ /dev/null @@ -1,118 +0,0 @@ -// $Id$ - -// =========================================================== -// -// -// = LIBRARY -// TAO/tests/Simple/chat -// -// = FILENAME -// Server_i.cpp -// -// = DESCRIPTION -// Implementation of the Chat Server_i class. -// -// = AUTHOR -// Pradeep Gore <pradeep@cs.wustl.edu> -// -// =========================================================== - -#include "Server_i.h" -#include "ace/Get_Opt.h" - -Server_i::Server_i () - : ior_file_name_ ("chat.ior") -{ - // No Op. -} - -Server_i::~Server_i (void) -{ - // NO Op. -} - -int -Server_i::parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "o:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'o': // get the file name to write to - this->ior_file_name_ = get_opts.optarg; - break; - - case '?': // display help for use of the server. - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-o] <ior_output_file>" - "\n", - argv [0]), - -1); - } - - return 0; -} - -int -Server_i::init (int argc, - char *argv[], - CORBA::Environment &env) -{ - // Parse the command line options. - if (this-> parse_args(argc, argv) == -1) - return -1; - - if (this->orb_manager_.init (argc, - argv, - env) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "orb manager init failed\n"), - -1); - TAO_CHECK_ENV_RETURN (env, - -1); - CORBA::ORB_var orb = this->orb_manager_.orb (); - - // Activate the servant. - CORBA::String_var str = - this->orb_manager_.activate (&this->broadcaster_i_, - env); - // Write the IOR to a file. - this->write_IOR (str.in ()); - return 0; -} - -int -Server_i::run (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "Running chat server...\n")); - - // Run the main event loop for the ORB. - if (this->orb_manager_.run (env) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Server_i::run"), - -1); - return 0; -} - -int -Server_i::write_IOR(const char* ior) -{ - FILE* ior_output_file_ = - ACE_OS::fopen (this->ior_file_name_, "w"); - - if (ior_output_file_) - { - ACE_OS::fprintf (ior_output_file_, - "%s", - ior); - ACE_OS::fclose (ior_output_file_); - } - - return 0; -} diff --git a/TAO/examples/Simple/chat/Server_i.h b/TAO/examples/Simple/chat/Server_i.h deleted file mode 100644 index dca164d5ba6..00000000000 --- a/TAO/examples/Simple/chat/Server_i.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// =========================================================== -// -// -// = LIBRARY -// TAO/tests/Simple/chat -// -// = FILENAME -// Server_i.h -// -// = DESCRIPTION -// Definition of the Chat Server_i class. -// -// = AUTHOR -// Pradeep Gore <pradeep@cs.wustl.edu> -// -// =========================================================== - -#ifndef SERVER_I_H -#define SERVER_I_H - -#include "Broadcaster_i.h" -#include "tao/TAO.h" - -class Server_i -{ - // = TITLE - // The class defines the server for the chat. It sets up the Orb - // manager and registers the Broadcaster servant object. - -public: - // = Initialization and termination methods. - Server_i (void); - // Constructor. - - ~Server_i (void); - // Destructor. - - int init (int argc, - char *argv[], - CORBA::Environment &env); - // Initialize the server. - - int run (CORBA::Environment &env); - // Run the ORB. - -private: - int parse_args (int argc, char *argv[]); - // Parses the command line arguments. - - int write_IOR (const char *ior); - // Writes the server ior to a file, for the clients to pick up - // later. - - char *ior_file_name_; - // The file name to save the ior to. - - TAO_ORB_Manager orb_manager_; - // The tao orb manager object. - - Broadcaster_i broadcaster_i_; - // The servant object registered with the orb. -}; - -#endif /* SERVER_I_H */ diff --git a/TAO/examples/Simple/chat/chat.dsw b/TAO/examples/Simple/chat/chat.dsw deleted file mode 100644 index 92aad316600..00000000000 --- a/TAO/examples/Simple/chat/chat.dsw +++ /dev/null @@ -1,41 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Simple Chat Client"=".\client.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "Simple Chat Server"=".\server.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/examples/Simple/chat/client.cpp b/TAO/examples/Simple/chat/client.cpp deleted file mode 100644 index fb6f17aff2f..00000000000 --- a/TAO/examples/Simple/chat/client.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// $Id$ - -// =========================================================== -// -// = LIBRARY -// TAO/tests/Simple/chat -// -// = FILENAME -// client.cpp -// -// = DESCRIPTION -// The Chat client program entry point. -// -// = AUTHOR -// Pradeep Gore <pradeep@cs.wustl.edu> -// -// =========================================================== - -#include "Client_i.h" - -int -main (int argc, char *argv[]) -{ - TAO_TRY - { - Client_i client_i; - - if (client_i.init (argc, argv) == -1 - || client_i.run () == -1) - return -1; - - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("client::main\t\n"); - return -1; - } - TAO_ENDTRY; - - return 0; -} diff --git a/TAO/examples/Simple/chat/client.dsp b/TAO/examples/Simple/chat/client.dsp deleted file mode 100644 index 7c7ea16c6cd..00000000000 --- a/TAO/examples/Simple/chat/client.dsp +++ /dev/null @@ -1,235 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Simple Chat Client" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Simple Chat Client - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Simple Chat Client.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Simple Chat Client.mak"\
- CFG="Simple Chat Client - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Simple Chat Client - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "Simple Chat Client - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Simple Chat Client - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib TAO.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "Simple Chat Client - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Simple Chat Client - Win32 Release"
-# Name "Simple Chat Client - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\BroadcasterC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\BroadcasterS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\client.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Client_i.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Receiver_i.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReceiverC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReceiverS.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\BroadcasterC.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\BroadcasterS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Client_i.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Receiver_i.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReceiverC.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReceiverS.h
-# End Source File
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Receiver.idl
-
-!IF "$(CFG)" == "Simple Chat Client - Win32 Release"
-
-USERDEP__RECEI="..\..\..\..\bin\Release\tao_idl.exe"
-# Begin Custom Build - Invoking TAO_IDL Compiler
-InputPath=.\Receiver.idl
-InputName=Receiver
-
-BuildCmds= \
- tao_idl $(InputName).idl
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "Simple Chat Client - Win32 Debug"
-
-USERDEP__RECEI="..\..\..\..\bin\tao_idl.exe"
-# Begin Custom Build - Invoking TAO_IDL Compiler
-InputPath=.\Receiver.idl
-InputName=Receiver
-
-BuildCmds= \
- tao_idl $(InputName).idl
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/examples/Simple/chat/server.cpp b/TAO/examples/Simple/chat/server.cpp deleted file mode 100644 index 65cb736e0c7..00000000000 --- a/TAO/examples/Simple/chat/server.cpp +++ /dev/null @@ -1,56 +0,0 @@ -// $Id$ - -// =========================================================== -// -// -// = LIBRARY -// TAO/tests/Simple/chat -// -// = FILENAME -// server.cpp -// -// = DESCRIPTION -// Entry point for the chat server. -// -// = AUTHOR -// Pradeep Gore <pradeep@cs.wustl.edu> -// -// =========================================================== - -#include "Server_i.h" - -int -main (int argc, char *argv[]) -{ - CORBA::Environment TAO_TRY_ENV; - - TAO_TRY - { - Server_i server_i; - - if (server_i.init (argc, argv, TAO_TRY_ENV) != 0) - { - TAO_CHECK_ENV; - - ACE_ERROR_RETURN ((LM_ERROR, - "\n error in init.\n"), - 1); - } - if (server_i.run (TAO_TRY_ENV) != 0) - { - TAO_CHECK_ENV; - - ACE_ERROR_RETURN ((LM_ERROR, - "\n error in run.\n"), - 1); - } - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("server::main\t\n"); - return 1; - } - TAO_ENDTRY; - - return 0; -} diff --git a/TAO/examples/Simple/chat/server.dsp b/TAO/examples/Simple/chat/server.dsp deleted file mode 100644 index 49760e417dd..00000000000 --- a/TAO/examples/Simple/chat/server.dsp +++ /dev/null @@ -1,239 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Simple Chat Server" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Simple Chat Server - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Simple Chat Server.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Simple Chat Server.mak"\
- CFG="Simple Chat Server - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Simple Chat Server - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "Simple Chat Server - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Simple Chat Server - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib TAO.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ELSEIF "$(CFG)" == "Simple Chat Server - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Simple Chat Server - Win32 Release"
-# Name "Simple Chat Server - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Broadcaster_i.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\BroadcasterC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\BroadcasterS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReceiverC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReceiverS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\server.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Server_i.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Broadcaster_i.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\BroadcasterC.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\BroadcasterS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReceiverC.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReceiverS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Server.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Server_i.h
-# End Source File
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Broadcaster.idl
-
-!IF "$(CFG)" == "Simple Chat Server - Win32 Release"
-
-USERDEP__BROAD="..\..\..\..\bin\Release\tao_idl.exe"
-# Begin Custom Build - Invoking TAO_IDL Compiler
-InputPath=.\Broadcaster.idl
-InputName=Broadcaster
-
-BuildCmds= \
- tao_idl $(InputName).idl
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "Simple Chat Server - Win32 Debug"
-
-USERDEP__BROAD="..\..\..\..\bin\tao_idl.exe"
-# Begin Custom Build - Invoking TAO_IDL Compiler
-InputPath=.\Broadcaster.idl
-InputName=Broadcaster
-
-BuildCmds= \
- tao_idl $(InputName).idl
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
|