summaryrefslogtreecommitdiff
path: root/TAO/tao/Policy.pidl
blob: 72356bd03005c102fb2780d1ad4a3ace0268916d (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/**
 * @file Policy.pidl
 *
 * $Id$
 *
 * @brief Pre-compiled IDL source for the CORBA::Policy related
 * classes.
 *
 * This file is used to generate the code in PolicyC.{h,inl,cpp}.
 * Also, skeleton code for the only non local Policy interface is
 * generated from this pidl file and then the declaration code is
 * moved to tao/PortableServer/PolicyS.{h,inl,cpp}
 *
 *   The steps to regenerate the code are as follows:
 *
 *   1. Run the tao_idl compiler on the patched pidl file.  The
 *   command used for this is:
 *
 *     tao_idl.exe
 *        -o orig -Gp -Gd -Ge 1 -GT -GA -Ssi
 *          -Wb,stub_export_macro=TAO_Export
 *          -Wb,stub_export_include="tao/TAO_Export.h"
 *          -Wb,skel_export_macro=TAO_PortableServer_Export
 *          -Wb,skel_export_include=portableserver_export.h
 *          -Wb,pre_include="ace/pre.h"
 *          -Wb,post_include="ace/post.h"
 *          Policy.pidl
 *
 *   2. Then patch the generated code using patches in
 *      diff/Policy.diff. To patch  the generated code in
 *      PortableServer look for diffs in PortableServer/diffs
 *      directory.
 *
 *   Note: The diffs were generated with these commands:
 *
 *   for i in PolicyC.{h,i,cpp}; do
 *     diff -wBbu orig/$i $i;
 *   done > diffs/Policy.diff
 *   for i in Policy{S,S_T}.{h,i,cpp}; do
 *     diff -wBbu orig/$i PortableServer/$i;
 *   done >> diffs/Policy.diff
 */

#ifndef TAO_CORBA_POLICY_PIDL
#define TAO_CORBA_POLICY_PIDL

#include <UShortSeq.pidl>
#include <Current.pidl>
#include <Policy_Forward.pidl>

#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
  {
    UShortSeq indices;
  };

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

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

  local interface PolicyCurrent : PolicyManager, Current
  {
  };

};

#pragma prefix ""

#endif /* TAO_CORBA_POLICY_PIDL */