/*
 *  MICO --- a free CORBA implementation
 *  Copyright (C) 1997-98 Kay Roemer & Arno Puder
 *
 *  This file was automatically generated. DO NOT EDIT!
 */

#if !defined(__RT_CORBA_H__) || defined(MICO_NO_TOPLEVEL_MODULES)
#define __RT_CORBA_H__

#ifndef MICO_NO_TOPLEVEL_MODULES
#include <CORBA.h>
#endif

#ifndef MICO_NO_TOPLEVEL_MODULES
MICO_NAMESPACE_DECL RT_CORBA {
#endif

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_RT_CORBA)


typedef CORBA::Short NativePriority;
typedef CORBA::Short Priority;
MICO_EXPORT_CONST_DECL const CORBA::Short minPriority;
MICO_EXPORT_CONST_DECL const CORBA::Short maxPriority;
typedef CORBA::ULong ThreadpoolId;
struct ThreadpoolLane;
typedef TFixVar<ThreadpoolLane> ThreadpoolLane_var;
typedef ThreadpoolLane_var ThreadpoolLane_out;

struct ThreadpoolLane {
  #ifdef HAVE_TYPEDEF_OVERLOAD
  typedef ThreadpoolLane_var _var_type;
  #endif
  #ifdef HAVE_EXPLICIT_STRUCT_OPS
  ThreadpoolLane();
  ~ThreadpoolLane();
  ThreadpoolLane( const ThreadpoolLane& s );
  ThreadpoolLane& operator=( const ThreadpoolLane& s );
  #endif //HAVE_EXPLICIT_STRUCT_OPS

  Priority lane_priority;
  CORBA::ULong static_threads;
  CORBA::ULong dynamic_threads;
};

typedef SequenceTmpl<ThreadpoolLane,MICO_TID_DEF> ThreadpoolLanes;
#ifdef _WINDOWS
static ThreadpoolLanes _dummy_ThreadpoolLanes;
#endif
typedef TSeqVar<SequenceTmpl<ThreadpoolLane,MICO_TID_DEF> > ThreadpoolLanes_var;
typedef ThreadpoolLanes_var ThreadpoolLanes_out;

MICO_EXPORT_CONST_DECL const CORBA::ULong PRIORITY_MODEL_POLICY_TYPE;
enum PriorityModel {
  CLIENT_PROPAGATED = 0,
  SERVER_DECLARED
};

typedef PriorityModel& PriorityModel_out;

class PriorityModelPolicy;
typedef PriorityModelPolicy *PriorityModelPolicy_ptr;
typedef PriorityModelPolicy_ptr PriorityModelPolicyRef;
typedef ObjVar<PriorityModelPolicy> PriorityModelPolicy_var;
typedef PriorityModelPolicy_var PriorityModelPolicy_out;


// Common definitions for interface PriorityModelPolicy
class PriorityModelPolicy : 
  virtual public ::CORBA::Policy
{
  public:
    virtual ~PriorityModelPolicy();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef PriorityModelPolicy_ptr _ptr_type;
    typedef PriorityModelPolicy_var _var_type;
    #endif

    static PriorityModelPolicy_ptr _narrow( CORBA::Object_ptr obj );
    static PriorityModelPolicy_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static PriorityModelPolicy_ptr _duplicate( PriorityModelPolicy_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static PriorityModelPolicy_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual PriorityModel priority_model() = 0;
    virtual Priority server_priority() = 0;

  protected:
    PriorityModelPolicy() {};
  private:
    PriorityModelPolicy( const PriorityModelPolicy& );
    void operator=( const PriorityModelPolicy& );
};


MICO_EXPORT_CONST_DECL const CORBA::ULong THREADPOOL_POLICY_TYPE;
class ThreadpoolPolicy;
typedef ThreadpoolPolicy *ThreadpoolPolicy_ptr;
typedef ThreadpoolPolicy_ptr ThreadpoolPolicyRef;
typedef ObjVar<ThreadpoolPolicy> ThreadpoolPolicy_var;
typedef ThreadpoolPolicy_var ThreadpoolPolicy_out;


// Common definitions for interface ThreadpoolPolicy
class ThreadpoolPolicy : 
  virtual public ::CORBA::Policy
{
  public:
    virtual ~ThreadpoolPolicy();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef ThreadpoolPolicy_ptr _ptr_type;
    typedef ThreadpoolPolicy_var _var_type;
    #endif

    static ThreadpoolPolicy_ptr _narrow( CORBA::Object_ptr obj );
    static ThreadpoolPolicy_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static ThreadpoolPolicy_ptr _duplicate( ThreadpoolPolicy_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static ThreadpoolPolicy_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual ThreadpoolId threadpool() = 0;

  protected:
    ThreadpoolPolicy() {};
  private:
    ThreadpoolPolicy( const ThreadpoolPolicy& );
    void operator=( const ThreadpoolPolicy& );
};


class Current;
typedef Current *Current_ptr;
typedef Current_ptr CurrentRef;
typedef ObjVar<Current> Current_var;
typedef Current_var Current_out;


// Common definitions for interface Current
class Current : 
  virtual public ::CORBA::Current
{
  public:
    virtual ~Current();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef Current_ptr _ptr_type;
    typedef Current_var _var_type;
    #endif

    static Current_ptr _narrow( CORBA::Object_ptr obj );
    static Current_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static Current_ptr _duplicate( Current_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static Current_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    virtual Priority the_priority() = 0;
    virtual void the_priority( Priority value ) = 0;

  protected:
    Current() {};
  private:
    Current( const Current& );
    void operator=( const Current& );
};

class Mutex;
typedef Mutex *Mutex_ptr;
typedef Mutex_ptr MutexRef;
typedef ObjVar<Mutex> Mutex_var;
#if 0
typedef Mutex_var Mutex_out;


// Common definitions for interface Mutex
class Mutex : 
  virtual public CORBA::Object
{
  public:
    virtual ~Mutex();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef Mutex_ptr _ptr_type;
    typedef Mutex_var _var_type;
    #endif

    static Mutex_ptr _narrow( CORBA::Object_ptr obj );
    static Mutex_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static Mutex_ptr _duplicate( Mutex_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static Mutex_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

  protected:
    Mutex() {};
  private:
    Mutex( const Mutex& );
    void operator=( const Mutex& );
};
#endif

class RTORB;
typedef RTORB *RTORB_ptr;
typedef RTORB_ptr RTORBRef;
typedef ObjVar<RTORB> RTORB_var;
typedef RTORB_var RTORB_out;


// Common definitions for interface RTORB
class RTORB : 
  virtual public CORBA::Object
{
  public:
    virtual ~RTORB();

    #ifdef HAVE_TYPEDEF_OVERLOAD
    typedef RTORB_ptr _ptr_type;
    typedef RTORB_var _var_type;
    #endif

    static RTORB_ptr _narrow( CORBA::Object_ptr obj );
    static RTORB_ptr _narrow( CORBA::AbstractBase_ptr obj );
    static RTORB_ptr _duplicate( RTORB_ptr _obj )
    {
      CORBA::Object::_duplicate (_obj);
      return _obj;
    }

    static RTORB_ptr _nil()
    {
      return 0;
    }

    virtual void *_narrow_helper( const char *repoid );

    struct InvalidThreadpool : public CORBA::UserException {
      #ifdef HAVE_EXPLICIT_STRUCT_OPS
      InvalidThreadpool();
      ~InvalidThreadpool();
      InvalidThreadpool( const InvalidThreadpool& s );
      InvalidThreadpool& operator=( const InvalidThreadpool& s );
      #endif //HAVE_EXPLICIT_STRUCT_OPS


      #ifdef HAVE_STD_EH
      InvalidThreadpool *operator->() { return this; }
      InvalidThreadpool& operator*() { return *this; }
      operator InvalidThreadpool*() { return this; }
      #endif // HAVE_STD_EH

      void _throwit() const;
      const char *_repoid() const;
      void _encode( CORBA::DataEncoder &en ) const;
      void _encode_any( CORBA::Any &a ) const;
      CORBA::Exception *_clone() const;
      static InvalidThreadpool *EXCEPTION_DOWNCAST( CORBA::Exception *ex );
      static const InvalidThreadpool *EXCEPTION_DOWNCAST( const CORBA::Exception *ex );
    };

    #ifdef HAVE_STD_EH
    typedef InvalidThreadpool InvalidThreadpool_catch;
    #else
    typedef ExceptVar<InvalidThreadpool> InvalidThreadpool_var;
    typedef InvalidThreadpool_var InvalidThreadpool_out;
    typedef InvalidThreadpool_var InvalidThreadpool_catch;
    #endif // HAVE_STD_EH

    virtual Mutex_ptr create_mutex() = 0;
    virtual void destroy_mutex( Mutex_ptr the_mutex ) = 0;
    virtual ThreadpoolId create_threadpool( CORBA::ULong stacksize, CORBA::ULong static_threads, CORBA::ULong dynamic_threads, Priority default_priority, CORBA::Boolean allow_request_buffering, CORBA::ULong max_buffered_requests, CORBA::ULong max_request_buffer_size ) = 0;
    virtual ThreadpoolId create_threadpool_with_lanes( CORBA::ULong stacksize, const ThreadpoolLanes& lanes, CORBA::Boolean allow_borrowing, CORBA::Boolean allow_request_buffering, CORBA::ULong max_buffered_requests, CORBA::ULong max_request_buffer_size ) = 0;
    virtual void destroy_threadpool( ThreadpoolId threadpool ) = 0;
    virtual PriorityModelPolicy_ptr create_priority_model_policy( PriorityModel priority_model, Priority server_priority ) = 0;
    virtual ThreadpoolPolicy_ptr create_threadpool_policy( ThreadpoolId threadpool ) = 0;

  protected:
    RTORB() {};
  private:
    RTORB( const RTORB& );
    void operator=( const RTORB& );
};


#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE_RT_CORBA)

#ifndef MICO_NO_TOPLEVEL_MODULES

};
#endif



#ifndef MICO_CONF_NO_POA

#endif // MICO_CONF_NO_POA

#if !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE__GLOBAL)

#endif // !defined(MICO_NO_TOPLEVEL_MODULES) || defined(MICO_MODULE__GLOBAL)


#if !defined(MICO_NO_TOPLEVEL_MODULES) && !defined(MICO_IN_GENERATED_CODE)
#include <mico/template_impl.h>
#endif

#endif
