// **********************************************************************
//
// Copyright (c) 1999
// Object Oriented Concepts, Inc.
// Billerica, MA, USA
//
// All Rights Reserved
//
// **********************************************************************

#ifndef POLICY_MANAGER_IDL
#define POLICY_MANAGER_IDL

#include <Policy.idl>
#include <Current.idl>

#pragma prefix "omg.org"

module CORBA
{

typedef short PolicyErrorCode;

const PolicyErrorCode BAD_POLICY = 0;
const PolicyErrorCode UNSUPPORTED_POLICY = 1;
const PolicyErrorCode BAD_TYPE = 2;
const PolicyErrorCode BAD_VALUE = 4;
const PolicyErrorCode UNSUPPORTED_VALUE = 3;

exception PolicyError
{
    PolicyErrorCode reason;
};

interface PolicyManager
{
    exception InvalidPolicies
    {
        sequence <unsigned short> indices;
    };
    
    Policy get_policy_override(in PolicyType t);
    PolicyList get_specific_policy_overrides(in PolicyTypeSeq ts);
    PolicyList get_all_policy_overrides();
    
    void add_policy_overrides(in PolicyList policies)
        raises (InvalidPolicies);
    void remove_policy_overrides(in PolicyTypeSeq ts);
    void replace_all_policy_overrides(in PolicyList policies)
        raises(InvalidPolicies);
};

}; // End module CORBA

#endif
