Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / RTCORBA / RT_Protocols_Hooks.h
blob6bd681e035f6448743eb31c71d6d91a85b10919a
1 // -*- C++ -*-
3 // ===================================================================
4 /**
5 * @file RT_Protocols_Hooks.h
7 * @author Priyanka Gontla <pgontla@ece.uci.edu>
8 */
9 // ===================================================================
11 #ifndef TAO_RT_PROTOCOLS_HOOKS_H
12 #define TAO_RT_PROTOCOLS_HOOKS_H
14 #include /**/ "ace/pre.h"
16 #include "tao/orbconf.h"
18 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
20 #include "tao/RTCORBA/rtcorba_export.h"
21 #include "tao/RTCORBA/Priority_Mapping_Manager.h"
22 #include "tao/RTCORBA/Network_Priority_Mapping_Manager.h"
24 #include "tao/Protocols_Hooks.h"
26 #include "ace/Service_Config.h"
28 #if !defined (ACE_LACKS_PRAGMA_ONCE)
29 # pragma once
30 #endif /* ACE_LACKS_PRAGMA_ONCE */
32 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
34 class TAO_RTCORBA_Export TAO_RT_Protocols_Hooks : public TAO_Protocols_Hooks
36 public:
37 /// Constructor
38 TAO_RT_Protocols_Hooks ();
40 /// Destructor
41 virtual ~TAO_RT_Protocols_Hooks ();
43 /// Initialize the protocols hooks instance.
44 void init_hooks (TAO_ORB_Core *orb_core);
46 CORBA::Boolean set_client_network_priority (IOP::ProfileId protocol_tag,
47 TAO_Stub *stub);
49 CORBA::Boolean set_server_network_priority (IOP::ProfileId protocol_tag,
50 CORBA::Policy *policy);
52 void server_protocol_properties_at_orb_level (TAO_IIOP_Protocol_Properties &protocol_properties);
54 void client_protocol_properties_at_orb_level (TAO_IIOP_Protocol_Properties &protocol_properties);
56 void server_protocol_properties_at_orb_level (TAO_UIOP_Protocol_Properties &protocol_properties);
58 void client_protocol_properties_at_orb_level (TAO_UIOP_Protocol_Properties &protocol_properties);
60 void server_protocol_properties_at_orb_level (TAO_SHMIOP_Protocol_Properties &protocol_properties);
62 void client_protocol_properties_at_orb_level (TAO_SHMIOP_Protocol_Properties &protocol_properties);
64 void server_protocol_properties_at_orb_level (TAO_DIOP_Protocol_Properties &protocol_properties);
66 void client_protocol_properties_at_orb_level (TAO_DIOP_Protocol_Properties &protocol_properties);
68 void server_protocol_properties_at_orb_level (TAO_SCIOP_Protocol_Properties &protocol_properties);
70 void client_protocol_properties_at_orb_level (TAO_SCIOP_Protocol_Properties &protocol_properties);
72 CORBA::Long get_dscp_codepoint ();
74 void get_selector_hook (CORBA::Policy *model_policy,
75 CORBA::Boolean
76 &is_client_propagated,
77 CORBA::Short &server_priority);
79 void get_selector_bands_policy_hook (CORBA::Policy *bands_policy,
80 CORBA::Short priority,
81 CORBA::Short &min_priority,
82 CORBA::Short &max_priority,
83 bool &in_range);
85 /**
86 * Accessor and modifier to the current thread priority, used to
87 * implement the RTCORBA::Current interface, but it is faster for
88 * some critical components.
90 //@{
91 int get_thread_CORBA_priority (CORBA::Short &priority);
93 int get_thread_native_priority (CORBA::Short &);
95 int get_thread_CORBA_and_native_priority (CORBA::Short &, CORBA::Short &);
97 int get_thread_implicit_CORBA_priority (CORBA::Short&);
99 int set_thread_CORBA_priority (CORBA::Short);
101 int restore_thread_CORBA_and_native_priority (CORBA::Short, CORBA::Short);
102 //@}
104 protected:
105 int set_thread_native_priority (CORBA::Short);
107 RTCORBA::ProtocolProperties_ptr server_protocol_properties (IOP::ProfileId protocol_tag,
108 CORBA::Policy_ptr policy);
110 RTCORBA::ProtocolProperties_ptr client_protocol_properties (IOP::ProfileId protocol_tag,
111 CORBA::Policy_ptr policy);
113 RTCORBA::ProtocolProperties_ptr server_protocol_properties_at_orb_level (IOP::ProfileId protocol_tag);
115 RTCORBA::ProtocolProperties_ptr client_protocol_properties_at_orb_level (IOP::ProfileId protocol_tag);
117 RTCORBA::ProtocolProperties_ptr client_protocol_properties_at_object_level (IOP::ProfileId protocol_tag,
118 TAO_Stub *stub);
120 void extract_protocol_properties (TAO_IIOP_Protocol_Properties &to,
121 RTCORBA::ProtocolProperties_ptr from);
123 void extract_protocol_properties (TAO_UIOP_Protocol_Properties &to,
124 RTCORBA::ProtocolProperties_ptr from);
126 void extract_protocol_properties (TAO_SHMIOP_Protocol_Properties &to,
127 RTCORBA::ProtocolProperties_ptr from);
129 void extract_protocol_properties (TAO_DIOP_Protocol_Properties &to,
130 RTCORBA::ProtocolProperties_ptr from);
132 void extract_protocol_properties (TAO_SCIOP_Protocol_Properties &to,
133 RTCORBA::ProtocolProperties_ptr from);
135 CORBA::Boolean set_network_priority (IOP::ProfileId protocol_tag,
136 RTCORBA::ProtocolProperties_ptr protocol_properties);
138 protected:
139 TAO_ORB_Core *orb_core_;
141 // Save a reference to the priority mapping manager.
142 TAO_Priority_Mapping_Manager_var mapping_manager_;
143 TAO_Network_Priority_Mapping_Manager_var network_mapping_manager_;
145 RTCORBA::Current_var current_;
148 ACE_STATIC_SVC_DECLARE_EXPORT (TAO_RTCORBA, TAO_RT_Protocols_Hooks)
149 ACE_FACTORY_DECLARE (TAO_RTCORBA, TAO_RT_Protocols_Hooks)
151 TAO_END_VERSIONED_NAMESPACE_DECL
154 #endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */
156 #include /**/ "ace/post.h"
157 #endif /* TAO_RT_PROTOCOLS_HOOKS_H */