// -*- c++ -*-

#include <mico/ir.idl>

#pragma prefix "omg.org"

module CORBA {

  typedef unsigned long PolicyType;

  interface Policy {
    readonly attribute PolicyType policy_type;
    Policy copy ();
    void destroy ();
  };

  typedef sequence<Policy> PolicyList;

  enum SetOverrideType {
      SET_OVERRIDE,
      ADD_OVERIDE
  };
  
  interface DomainManager {
    Policy get_domain_policy (in PolicyType policy_type);
    void set_domain_policy (in Policy policy);
    DomainManager copy ();
  };

  const PolicyType SecConstruction = 11;

  interface ConstructionPolicy : Policy {
    void make_domain_manager (in CORBA::InterfaceDef object_type,
			      in boolean constr_policy);
    boolean constr_policy (in Object object);
  };

  typedef sequence<DomainManager> DomainManagerList;

  typedef short PolicyErrorCode;
  const PolicyErrorCode BAD_POLICY = 0;
  const PolicyErrorCode UNSUPPORTED_POLICY = 1;
  const PolicyErrorCode BAD_POLICY_TYPE = 2;
  const PolicyErrorCode BAD_POLICY_VALUE = 3;
  const PolicyErrorCode UNSUPPORTED_POLICY_VALUE = 4;

  exception PolicyError {
      PolicyErrorCode reason;
  };
};

