summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/CosTradingRepos.idl
blob: 7738492a32e2813908da657d3a8e81851f0e64f9 (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/* -*- C++ -*- */

//=============================================================================
/**
 *  @file   CosTradingRepos.idl
 *
 * Trader  Service v1.0 described in CORBAservices: Common Object
 * Services Specification, chapter 16 OMG IDL for Trading Function
 * Module, p 16-74
 */
//=============================================================================


#ifndef TAO_TRADING_REPOS_IDL
#define TAO_TRADING_REPOS_IDL

#include <orb.idl>
#include "CosTrading.idl"

#pragma prefix "omg.org"

// OMG IDL for Service Type Repository Module, p 16-89

module CosTradingRepos
{
  interface ServiceTypeRepository
    {
      // local types
      typedef sequence<CosTrading::ServiceTypeName> ServiceTypeNameSeq;
      enum PropertyMode {
        PROP_NORMAL, PROP_READONLY,
        PROP_MANDATORY, PROP_MANDATORY_READONLY
      };
      struct PropStruct
      {
        CosTrading::PropertyName name;
        CORBA::TypeCode value_type;
        PropertyMode mode;
      };
      typedef sequence<PropStruct> PropStructSeq;

      typedef CosTrading::Istring Identifier;  // IR::Identifier

      struct IncarnationNumber
      {
        unsigned long high;
        unsigned long low;
      };

      struct TypeStruct
      {
        Identifier if_name;
        PropStructSeq props;
        ServiceTypeNameSeq super_types;
        boolean masked;
        IncarnationNumber incarnation;
      };

      enum ListOption { all, since };
      union SpecifiedServiceTypes switch ( ListOption ) {
      case all: boolean all_;
      case since: IncarnationNumber incarnation;
      };

      // local exceptions
      exception ServiceTypeExists {
        CosTrading::ServiceTypeName name;
      };

      exception InterfaceTypeMismatch {
        CosTrading::ServiceTypeName base_service;
        Identifier base_if;
        CosTrading::ServiceTypeName derived_service;
        Identifier derived_if;
      };

      exception HasSubTypes {
        CosTrading::ServiceTypeName the_type;
        CosTrading::ServiceTypeName sub_type;
      };

      exception AlreadyMasked {
        CosTrading::ServiceTypeName name;
      };

      exception NotMasked {
        CosTrading::ServiceTypeName name;
      };

      exception ValueTypeRedefinition {
        CosTrading::ServiceTypeName type_1;
        PropStruct definition_1;
        CosTrading::ServiceTypeName type_2;
        PropStruct definition_2;
      };

      exception DuplicateServiceTypeName {
        CosTrading::ServiceTypeName name;
      };

      // attributes
      readonly attribute IncarnationNumber incarnation;

      // operation signatures
      IncarnationNumber add_type (in CosTrading::ServiceTypeName name,
                                  in Identifier if_name,
                                  in PropStructSeq props,
                                  in ServiceTypeNameSeq super_types)
        raises (CosTrading::IllegalServiceType,
                ServiceTypeExists,
                InterfaceTypeMismatch,
                CosTrading::IllegalPropertyName,
                CosTrading::DuplicatePropertyName,
                ValueTypeRedefinition,
                CosTrading::UnknownServiceType,
                DuplicateServiceTypeName);

      void remove_type (in CosTrading::ServiceTypeName name)
        raises (CosTrading::IllegalServiceType,
                CosTrading::UnknownServiceType,
                HasSubTypes);

      ServiceTypeNameSeq list_types (in SpecifiedServiceTypes which_types);

      TypeStruct describe_type (in CosTrading::ServiceTypeName name)
        raises (CosTrading::IllegalServiceType,
                CosTrading::UnknownServiceType);

      TypeStruct fully_describe_type (in CosTrading::ServiceTypeName name)
        raises (CosTrading::IllegalServiceType,
                CosTrading::UnknownServiceType);

      void mask_type (in CosTrading::ServiceTypeName name)
        raises (CosTrading::IllegalServiceType,
                CosTrading::UnknownServiceType,
                AlreadyMasked);

      void unmask_type (in CosTrading::ServiceTypeName name)
        raises (CosTrading::IllegalServiceType,
                CosTrading::UnknownServiceType,
                NotMasked);
    };
}; /* end module CosTradingRepos */

module CosTradingSequences
{
  typedef sequence<short> ShortSeq;
  typedef sequence<unsigned short> UShortSeq;
  typedef sequence<long> LongSeq;
  typedef sequence<unsigned long> ULongSeq;
  typedef sequence<boolean> BooleanSeq;
  typedef sequence<float> FloatSeq;
  typedef sequence<double> DoubleSeq;
  typedef sequence<string> StringSeq;
};

#endif /* TAO_TRADING_REPOS_IDL */