summaryrefslogtreecommitdiff
path: root/TAO/tao/Policy.pidl
blob: 903629276988a3e026adf99ee2d8ba203d25a33f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//
// $Id$
//
// ================================================================
//
// = LIBRARY
//   TAO
//
// = FILENAME
//   Policy.pidl
//
// = DESCRIPTION
//   This file was used to generate the code in Policy{C,S,S_T}.{h,i,cpp}
//   The code is then hand-crafted to compile it inside the ORB, avoid
//   cyclic dependencies and enforce the locality constraints on
//   certain objects.
//
// ================================================================


#pragma prefix "omg.org"

module CORBA
{
  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;
  };

  exception InvalidPolicies
  {
    sequence<unsigned short> indices;
  };

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

  typedef sequence<Policy> PolicyList;

  typedef sequence<PolicyType> PolicyTypeSeq;

  enum SetOverrideType
  {
    SET_OVERRIDE,
    ADD_OVERRIDE
  };

  interface PolicyManager
  {
    PolicyList get_policy_overrides (in PolicyTypeSeq ts);
    void set_policy_overrides (
             in PolicyList policies,
             in SetOverrideType set_add)
        raises (InvalidPolicies);
  };

  interface Current
  {
  };

  interface PolicyCurrent : PolicyManager, Current
  {
  };

};