3 //=============================================================================
5 * @file Codeset_Manager.h
7 * Interface for the TAO CodeSet Manager.
9 * @author Mahesh Vedantam <mahesh@ociweb.com>
11 //=============================================================================
13 #ifndef TAO_CODESET_MANAGER_H
14 #define TAO_CODESET_MANAGER_H
16 #include /**/ "ace/pre.h"
18 #include /**/ "tao/TAO_Export.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "tao/CONV_FRAMEC.h"
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
27 class ACE_WChar_Codeset_Translator
;
28 ACE_END_VERSIONED_NAMESPACE_DECL
30 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
34 class TAO_Operation_Details
;
36 class TAO_ServerRequest
;
37 class TAO_Tagged_Components
;
38 class TAO_Codeset_Translator_Base
;
39 class TAO_Codeset_Descriptor_Base
;
42 // ****************************************************************
45 * @class TAO_Codeset_Manager
47 * @brief The encapsulation of logic for codeset negotiation
49 * The Codeset Manager is owned by the ORB_Core, initialized through Resource
50 * Factory configuration options. The codeset manager participates in profile
51 * creation by servers and connection establishment by clients. The involvement
52 * is necessary to supply a codeset component to the profile including for both
53 * chars and wide chars the native code set and any conversion code sets for
54 * which translators are available. The codeset manager is also responsible for
55 * determining the transmission codesets based an the local and remote codeset
56 * information. The transmission codesets are communicated via a service
57 * context attached to the first request sent on the new connection.
59 class TAO_Export TAO_Codeset_Manager
65 virtual ~TAO_Codeset_Manager (void);
67 /// Called by an object of TAO_Acceptor to set NCS and CCS values for
68 /// Char/Wchar in to the Object Reference.
69 virtual void set_codeset (TAO_Tagged_Components
&) const = 0;
71 /// Called from an object of "TAO_GIOP_Invocation" to set TCS on the
73 virtual void set_tcs (TAO_Profile
&theProfile
, TAO_Transport
&) = 0;
75 /// Called from an Object of TAO_Messaging for every request at server side
76 /// to process service context and set TCS for Char/WChar
77 virtual void process_service_context (TAO_ServerRequest
&) = 0;
79 /// Called by a client object to generate service context
80 /// at this time Transport has the TCS for Char and WChar
81 virtual void generate_service_context (TAO_Operation_Details
&, TAO_Transport
& ) = 0;
83 virtual TAO_Codeset_Translator_Base
* get_char_trans (CONV_FRAME::CodeSetId tcs
) = 0;
85 virtual TAO_Codeset_Translator_Base
* get_wchar_trans (CONV_FRAME::CodeSetId tcs
) = 0;
87 virtual void open (TAO_ORB_Core
& core
) = 0;
89 virtual TAO_Codeset_Descriptor_Base
*char_codeset_descriptor (void) = 0;
90 virtual TAO_Codeset_Descriptor_Base
*wchar_codeset_descriptor (void) = 0;
92 virtual void get_ncs (CONV_FRAME::CodeSetId
&ncsc
,
93 CONV_FRAME::CodeSetId
&ncsw
) = 0;
96 TAO_END_VERSIONED_NAMESPACE_DECL
98 #include /**/ "ace/post.h"
100 #endif /* TAO_CODESET_MANAGER_H */