//File: RTCORBA.idl
#ifndef _RT_CORBA_IDL_
#define _RT_CORBA_IDL_
#include <orb.idl>
#include <IOP.idl>
#include <TimeBase.idl>
#pragma prefix "omg.org"
// IDL

// Most of this file is commented out at the moment; we're only using
// this for a few definitions that are needed in ETF.idl.

module RTCORBA
{

//   typedef short NativePriority;
//   typedef short Priority;
//   const Priority minPriority = 0;
//   const Priority maxPriority = 32767;

  typedef short NativePriority;
  typedef short Priority;
  const Priority minPriority = 0;
  const Priority maxPriority = 32767;

//   native PriorityMapping;
//   native PriorityTransform;
//   // Threadpool types
//   typedef unsigned long ThreadpoolId;
//   struct ThreadpoolLane {
//     Priority lane_priority;
//     unsigned long static_threads;
//     unsigned long dynamic_threads;
//   };
//   typedef sequence <ThreadpoolLane> ThreadpoolLanes;
   // Priority Model Policy
   const CORBA::PolicyType PRIORITY_MODEL_POLICY_TYPE = 40;
   enum PriorityModel
   {
     CLIENT_PROPAGATED,
     SERVER_DECLARED
   };
//   local interface PriorityModelPolicy : CORBA::Policy {
//     readonly attribute PriorityModel priority_model;
//     readonly attribute Priority server_priority;
//   };
//   // Threadpool Policy
//   const CORBA::PolicyType THREADPOOL_POLICY_TYPE = 41;
//   local interface ThreadpoolPolicy : CORBA::Policy {
//     readonly attribute ThreadpoolId threadpool;
//   };

  local interface ProtocolProperties {};

   struct Protocol {
     IOP::ProfileId protocol_type;
     ProtocolProperties orb_protocol_properties;
     ProtocolProperties transport_protocol_properties;
   };
   typedef sequence <Protocol> ProtocolList;
//   // Server Protocol Policy
//   const CORBA::PolicyType SERVER_PROTOCOL_POLICY_TYPE = 42;
//   local interface ServerProtocolPolicy : CORBA::Policy {
//     readonly attribute ProtocolList protocols;
//   };
   // Client Protocol Policy
   const CORBA::PolicyType CLIENT_PROTOCOL_POLICY_TYPE = 43;
   local interface ClientProtocolPolicy : CORBA::Policy {
     readonly attribute ProtocolList protocols;
   };
//   // Private Connection Policy
//   const CORBA::PolicyType
//   PRIVATE_CONNECTION_POLICY_TYPE = 44;
//   local interface PrivateConnectionPolicy : CORBA::Policy {};

  local interface TCPProtocolProperties : ProtocolProperties
  {
    attribute long send_buffer_size;
    attribute long recv_buffer_size;
    attribute boolean keep_alive;
    attribute boolean dont_route;
    attribute boolean no_delay;
  };

//   struct PriorityBand {
//     Priority low;
//     Priority high;
//   };
//   typedef sequence <PriorityBand> PriorityBands;
   // PriorityBandedConnectionPolicy
   const CORBA::PolicyType PRIORITY_BANDED_CONNECTION_POLICY_TYPE = 45;
//   local interface PriorityBandedConnectionPolicy : CORBA::Policy {
//     readonly attribute PriorityBands priority_bands;
//   };

//   local interface Current : CORBA::Current {
//     attribute Priority the_priority;
//   };
//   local interface Mutex {
//     void lock( );
//     void unlock( );
//     boolean try_lock ( in TimeBase::TimeT max_wait );
//     // if max_wait = 0 then return immediately
//   };
   local interface RTORB
   {
//     Mutex create_mutex( );
//     void destroy_mutex( in Mutex the_mutex );
//     exception InvalidThreadpool {};
//     ThreadpoolId create_threadpool
//     (
//      in unsigned long stacksize,
//      in unsigned long static_threads,
//      in unsigned long dynamic_threads,
//      in Priority default_priority,
//      in boolean allow_request_buffering,
//      in unsigned long max_buffered_requests,
//      in unsigned long max_request_buffer_size
//      );
//     ThreadpoolId create_threadpool_with_lanes
//     (
//      in unsigned long stacksize,
//      in ThreadpoolLanes lanes,
//      in boolean allow_borrowing
//      in boolean allow_request_buffering,
//      in unsigned long max_buffered_requests,
//      in unsigned long max_request_buffer_size
//      );
//     void destroy_threadpool ( in ThreadpoolId threadpool )
//       raises (InvalidThreadpool);
//     PriorityModelPolicy create_priority_model_policy
//     (
//      in PriorityModel priority_model,
//      in Priority server_priority
//     );
//     ThreadpoolPolicy create_threadpool_policy
//     (
//      in ThreadpoolId threadpool
//      );

//     PriorityBandedConnectionPolicy
//     create_priority_banded_connection_policy
//     (
//      in PriorityBands priority_bands
//      );
//     ServerProtocolPolicy create_server_protocol_policy
//     (
//      in ProtocolList protocols
//      );

      ClientProtocolPolicy create_client_protocol_policy
      (
          in ProtocolList protocols
      );

//     PrivateConnectionPolicy create_private_connection_policy ();
//     TCPProtocolProperties create_tcp_protocol_properties
//     (
//      in long send_buffer_size,
//      in long recv_buffer_size,
//      in boolean keep_alive,
//      in boolean dont_route,
//      in boolean no_delay
//      );
  };
}; // End module RTCORBA
#endif // _RT_CORBA_IDL_
