Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / RTCORBA / RTCORBA.pidl
blob1a4f3aa751a95c4d284cbfbc6d73114f578a83c6
1 /**
2  * @file RTCORBA.pidl
3  *
4  * @brief Pre-compiled IDL source for the RTCORBA module.
5  *
6  * The RTCORBA module specified in CORBA v2.4.2 Chapter 24 (February,
7  * 2001).
8  *
9  * Changes to the original OMG idl:
10  *
11  *     1.  Two TAO-specific interfaces, UnixDomainProtocolProperties
12  *         and SharedMemoryProtocolProperties, have been added to allow
13  *         configuration of TAO's UIOP and SHMEM pluggable protocols
14  *         through RTCORBA Protocol Policies.
15  *     2.  TAO-specific support for named mutexes has been added.
16  *     3.  Added RT_ORB::create_tcp_protocol_properties which seems
17  *         to come and go from the formal specification, but is needed.
18  */
20 #ifndef _RT_CORBA_IDL_
21 #define _RT_CORBA_IDL_
23 #include "tao/IOP.pidl"
24 #include "tao/TimeBase.pidl"
25 #include "tao/Policy.pidl"
26 #include "tao/RTCORBA/RT_ProtocolProperties.pidl"
28 #pragma prefix "omg.org"
30 module RTCORBA
32   // Priorities.
33   typedef short NativePriority;
34   typedef short Priority;
35   const Priority minPriority = 0;
36   const Priority maxPriority = 32767;
38   native PriorityMapping;
39   native PriorityTransform;
41   typedef long NetworkPriority;
42   native NetworkPriorityMapping;
44   // Threadpool types.
45   typedef unsigned long ThreadpoolId;
47   struct ThreadpoolLane
48   {
49     Priority lane_priority;
50     unsigned long static_threads;
51     unsigned long dynamic_threads;
52   };
53   typedef sequence <ThreadpoolLane> ThreadpoolLanes;
55   // RT Policies.
57   // Priority Model Policy.
58   const CORBA::PolicyType PRIORITY_MODEL_POLICY_TYPE = 40;
59   enum PriorityModel
60   {
61     CLIENT_PROPAGATED,
62     SERVER_DECLARED
63   };
65   local interface PriorityModelPolicy : CORBA::Policy
66   {
67       readonly attribute PriorityModel priority_model;
68       readonly attribute Priority server_priority;
69   };
71   // Threadpool Policy.
72   const CORBA::PolicyType THREADPOOL_POLICY_TYPE = 41;
73   local interface ThreadpoolPolicy : CORBA::Policy
74   {
75       readonly attribute ThreadpoolId threadpool;
76   };
78   struct Protocol
79   {
80       IOP::ProfileId protocol_type;
81       ProtocolProperties orb_protocol_properties;
82       ProtocolProperties transport_protocol_properties;
83   };
85   typedef sequence <Protocol> ProtocolList;
87   // Server Protocol Policy
88   const CORBA::PolicyType SERVER_PROTOCOL_POLICY_TYPE = 42;
90   // Locality constrained interface
91   local interface ServerProtocolPolicy : CORBA::Policy
92   {
93     readonly attribute ProtocolList protocols;
94   };
96   // Client Protocol Policy
97   const CORBA::PolicyType CLIENT_PROTOCOL_POLICY_TYPE = 43;
99   // Locality constrained interface
100   local interface ClientProtocolPolicy : CORBA::Policy
101   {
102     readonly attribute ProtocolList protocols;
103   };
105   // Private Connection Policy
106   const CORBA::PolicyType PRIVATE_CONNECTION_POLICY_TYPE = 44;
108   // Locality constrained interface
109   local interface PrivateConnectionPolicy : CORBA::Policy {};
111   local interface TCPProtocolProperties : ProtocolProperties
112   {
113     attribute long send_buffer_size;
114     attribute long recv_buffer_size;
115     attribute boolean keep_alive;
116     attribute boolean dont_route;
117     attribute boolean no_delay;
118     attribute boolean enable_network_priority;
119   };
121   local interface GIOPProtocolProperties : ProtocolProperties {};
123   // Properties for TAO-specific protocols (these protocols &
124   // interfaces are not specified by the OMG).
126   // Communication over Unix Domain Sockets (Local IPC).
127   local interface UnixDomainProtocolProperties : ProtocolProperties
128   {
129     attribute long send_buffer_size;
130     attribute long recv_buffer_size;
131   };
133   // Communication over Shared Memory.
134   local interface SharedMemoryProtocolProperties : ProtocolProperties
135   {
136     attribute long send_buffer_size;
137     attribute long recv_buffer_size;
138     attribute boolean keep_alive;
139     attribute boolean dont_route;
140     attribute boolean no_delay;
141     attribute long preallocate_buffer_size;
142     attribute string mmap_filename;
143     attribute string mmap_lockname;
144   };
146   local interface UserDatagramProtocolProperties : ProtocolProperties
147   {
148     attribute long send_buffer_size;
149     attribute long recv_buffer_size;
150     attribute boolean enable_network_priority;
151   };
153   local interface StreamControlProtocolProperties : ProtocolProperties
154   {
155     attribute long send_buffer_size;
156     attribute long recv_buffer_size;
157     attribute boolean keep_alive;
158     attribute boolean dont_route;
159     attribute boolean no_delay;
160     attribute boolean enable_network_priority;
161   };
163   // End of TAO-specific interfaces.
165   // PriorityBandedConnectionPolicy.
166   struct PriorityBand
167   {
168     Priority low;
169     Priority high;
170   };
171   typedef sequence <PriorityBand> PriorityBands;
173   const CORBA::PolicyType PRIORITY_BANDED_CONNECTION_POLICY_TYPE = 45;
174   local interface PriorityBandedConnectionPolicy : CORBA::Policy
175   {
176     readonly attribute PriorityBands priority_bands;
177   };
179   // RT Current.
180   local interface Current : CORBA::Current
181   {
182     attribute Priority the_priority;
183   };
185   // Mutex.
186   local interface Mutex
187   {
188       void lock ();
189       void unlock ();
190       /// if max_wait = 0 then return immediately
191       boolean try_lock (in TimeBase::TimeT max_wait);
192   };
194   // RTORB.
195   local interface RTORB
196   {
197     // Mutex creation/destruction.
198     Mutex create_mutex ();
199     void destroy_mutex (in Mutex the_mutex);
201     // TAO specific
202     // Named Mutex creation/opening
203     exception MutexNotFound {};
204     Mutex create_named_mutex (in string name,
205                               out boolean created_flag);
206     Mutex open_named_mutex (in string name)
207       raises (MutexNotFound);
209     // End TAO specific
211     TCPProtocolProperties create_tcp_protocol_properties(
212                                                      in long send_buffer_size,
213                                                      in long recv_buffer_size,
214                                                      in boolean keep_alive,
215                                                      in boolean dont_route,
216                                                      in boolean no_delay,
217                                                      in boolean enable_network_priority);
219     UnixDomainProtocolProperties create_unix_domain_protocol_properties(
220                                                      in long send_buffer_size,
221                                                      in long recv_buffer_size);
223     SharedMemoryProtocolProperties create_shared_memory_protocol_properties(
224                                                      in long send_buffer_size,
225                                                      in long recv_buffer_size,
226                                                      in boolean keep_alive,
227                                                      in boolean dont_route,
228                                                      in boolean no_delay,
229                                                      in long preallocate_buffer_size,
230                                                      in string mmap_filename,
231                                                      in string mmap_lockname);
233     UserDatagramProtocolProperties create_user_datagram_protocol_properties(
234                                                      in long send_buffer_size,
235                                                      in long recv_buffer_size,
236                                                      in boolean enable_network_priority);
238     StreamControlProtocolProperties create_stream_control_protocol_properties(
239                                                      in long send_buffer_size,
240                                                      in long recv_buffer_size,
241                                                      in boolean keep_alive,
242                                                      in boolean dont_route,
243                                                      in boolean no_delay,
244                                                      in boolean enable_network_priority);
246     // Threadpool creation/destruction.
247     exception InvalidThreadpool {};
249     ThreadpoolId create_threadpool (in unsigned long stacksize,
250                                     in unsigned long static_threads,
251                                     in unsigned long dynamic_threads,
252                                     in Priority default_priority,
253                                     in boolean allow_request_buffering,
254                                     in unsigned long max_buffered_requests,
255                                     in unsigned long max_request_buffer_size);
257     ThreadpoolId create_threadpool_with_lanes (in unsigned long stacksize,
258                                                in ThreadpoolLanes lanes,
259                                                in boolean allow_borrowing,
260                                                in boolean allow_request_buffering,
261                                                in unsigned long max_buffered_requests,
262                                                in unsigned long max_request_buffer_size);
264     void destroy_threadpool (in ThreadpoolId threadpool)
265       raises (InvalidThreadpool);
267     // RT Policies creation.
268     PriorityModelPolicy create_priority_model_policy (in PriorityModel priority_model,
269                                                       in Priority server_priority);
271     ThreadpoolPolicy create_threadpool_policy (in ThreadpoolId threadpool);
273     PriorityBandedConnectionPolicy
274       create_priority_banded_connection_policy (in PriorityBands priority_bands);
277     ServerProtocolPolicy create_server_protocol_policy (in ProtocolList protocols);
279     ClientProtocolPolicy create_client_protocol_policy (in ProtocolList protocols);
281     PrivateConnectionPolicy create_private_connection_policy ();
282   };
285 #endif /* _RT_CORBA_IDL_ */