00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /* 00005 * @file Codeset_Manager.h 00006 * 00007 * $Id: Codeset_Manager.h 74014 2006-08-14 13:52:22Z johnnyw $ 00008 * 00009 * Interface for the TAO CodeSet Manager. 00010 * 00011 * @author Mahesh Vedantam <mahesh@ociweb.com> 00012 */ 00013 //============================================================================= 00014 00015 #ifndef TAO_CODESET_MANAGER_H 00016 #define TAO_CODESET_MANAGER_H 00017 00018 #include /**/ "ace/pre.h" 00019 00020 #include /**/ "tao/TAO_Export.h" 00021 00022 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00023 # pragma once 00024 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00025 00026 #include "tao/CONV_FRAMEC.h" 00027 00028 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00029 class ACE_WChar_Codeset_Translator; 00030 ACE_END_VERSIONED_NAMESPACE_DECL 00031 00032 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00033 00034 class TAO_Profile; 00035 class TAO_Transport; 00036 class TAO_Operation_Details; 00037 00038 class TAO_ServerRequest; 00039 class TAO_Tagged_Components; 00040 class TAO_Codeset_Translator_Base; 00041 class TAO_Codeset_Descriptor_Base; 00042 00043 00044 // **************************************************************** 00045 00046 /** 00047 * @class TAO_Codeset_Manager 00048 * 00049 * @brief The encapsulation of logic for codeset negotiation 00050 * 00051 * The Codeset Manager is owned by the ORB_Core, initialized through Resource 00052 * Factory configuration options. The codeset manager participates in profile 00053 * creation by servers and connection establishment by clients. The involvement 00054 * is necessary to supply a codeset component to the profile including for both 00055 * chars and wide chars the native code set and any conversion code sets for 00056 * which translators are available. The codeset manager is also responsible for 00057 * determining the transmission codesets based an the local and remote codeset 00058 * information. The transmission codesets are communicated via a service 00059 * context attached to the first request sent on the new connection. 00060 * 00061 */ 00062 class TAO_Export TAO_Codeset_Manager 00063 { 00064 00065 public: 00066 00067 /// Destructor. 00068 virtual ~TAO_Codeset_Manager (void); 00069 00070 /// Called by an object of TAO_Acceptor to set NCS and CCS values for 00071 /// Char/Wchar in to the Object Reference. 00072 virtual void set_codeset (TAO_Tagged_Components& ) const = 0; 00073 00074 /// Called from an object of "TAO_GIOP_Invocation" to set TCS on the 00075 /// Transport 00076 virtual void set_tcs (TAO_Profile &theProfile, TAO_Transport &) = 0; 00077 00078 /// Called from an Object of TAO_Messaging for every request at server side 00079 /// to process service context and set TCS for Char/WChar 00080 virtual void process_service_context (TAO_ServerRequest &) = 0; 00081 00082 /// Called by a client object to generate service context 00083 /// at this time Transport has the TCS for Char and WChar 00084 virtual void generate_service_context (TAO_Operation_Details&, TAO_Transport & ) = 0; 00085 00086 virtual TAO_Codeset_Translator_Base * get_char_trans (CONV_FRAME::CodeSetId tcs) = 0; 00087 00088 virtual TAO_Codeset_Translator_Base * get_wchar_trans (CONV_FRAME::CodeSetId tcs) = 0; 00089 00090 virtual void open (void) = 0; 00091 00092 virtual TAO_Codeset_Descriptor_Base *char_codeset_descriptor (void) = 0; 00093 virtual TAO_Codeset_Descriptor_Base *wchar_codeset_descriptor (void) = 0; 00094 00095 virtual void get_ncs (CONV_FRAME::CodeSetId &ncsc, 00096 CONV_FRAME::CodeSetId &ncsw) = 0; 00097 }; 00098 00099 TAO_END_VERSIONED_NAMESPACE_DECL 00100 00101 #include /**/ "ace/post.h" 00102 00103 #endif /* TAO_CODESET_MANAGER_H */