00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TAO_TRADING_REPOS_IDL
00017 #define TAO_TRADING_REPOS_IDL
00018
00019 #include <orb.idl>
00020 #include "CosTrading.idl"
00021
00022 #pragma prefix "omg.org"
00023
00024
00025
00026 module CosTradingRepos
00027 {
00028 interface ServiceTypeRepository
00029 {
00030
00031 typedef sequence<CosTrading::ServiceTypeName> ServiceTypeNameSeq;
00032 enum PropertyMode {
00033 PROP_NORMAL, PROP_READONLY,
00034 PROP_MANDATORY, PROP_MANDATORY_READONLY
00035 };
00036 struct PropStruct
00037 {
00038 CosTrading::PropertyName name;
00039 CORBA::TypeCode value_type;
00040 PropertyMode mode;
00041 };
00042 typedef sequence<PropStruct> PropStructSeq;
00043
00044 typedef CosTrading::Istring Identifier;
00045
00046 struct IncarnationNumber
00047 {
00048 unsigned long high;
00049 unsigned long low;
00050 };
00051
00052 struct TypeStruct
00053 {
00054 Identifier if_name;
00055 PropStructSeq props;
00056 ServiceTypeNameSeq super_types;
00057 boolean masked;
00058 IncarnationNumber incarnation;
00059 };
00060
00061 enum ListOption { all, since };
00062 union SpecifiedServiceTypes switch ( ListOption ) {
00063 case all: boolean all_;
00064 case since: IncarnationNumber incarnation;
00065 };
00066
00067
00068 exception ServiceTypeExists {
00069 CosTrading::ServiceTypeName name;
00070 };
00071
00072 exception InterfaceTypeMismatch {
00073 CosTrading::ServiceTypeName base_service;
00074 Identifier base_if;
00075 CosTrading::ServiceTypeName derived_service;
00076 Identifier derived_if;
00077 };
00078
00079 exception HasSubTypes {
00080 CosTrading::ServiceTypeName the_type;
00081 CosTrading::ServiceTypeName sub_type;
00082 };
00083
00084 exception AlreadyMasked {
00085 CosTrading::ServiceTypeName name;
00086 };
00087
00088 exception NotMasked {
00089 CosTrading::ServiceTypeName name;
00090 };
00091
00092 exception ValueTypeRedefinition {
00093 CosTrading::ServiceTypeName type_1;
00094 PropStruct definition_1;
00095 CosTrading::ServiceTypeName type_2;
00096 PropStruct definition_2;
00097 };
00098
00099 exception DuplicateServiceTypeName {
00100 CosTrading::ServiceTypeName name;
00101 };
00102
00103
00104 readonly attribute IncarnationNumber incarnation;
00105
00106
00107 IncarnationNumber add_type (in CosTrading::ServiceTypeName name,
00108 in Identifier if_name,
00109 in PropStructSeq props,
00110 in ServiceTypeNameSeq super_types)
00111 raises (CosTrading::IllegalServiceType,
00112 ServiceTypeExists,
00113 InterfaceTypeMismatch,
00114 CosTrading::IllegalPropertyName,
00115 CosTrading::DuplicatePropertyName,
00116 ValueTypeRedefinition,
00117 CosTrading::UnknownServiceType,
00118 DuplicateServiceTypeName);
00119
00120 void remove_type (in CosTrading::ServiceTypeName name)
00121 raises (CosTrading::IllegalServiceType,
00122 CosTrading::UnknownServiceType,
00123 HasSubTypes);
00124
00125 ServiceTypeNameSeq list_types (in SpecifiedServiceTypes which_types);
00126
00127 TypeStruct describe_type (in CosTrading::ServiceTypeName name)
00128 raises (CosTrading::IllegalServiceType,
00129 CosTrading::UnknownServiceType);
00130
00131 TypeStruct fully_describe_type (in CosTrading::ServiceTypeName name)
00132 raises (CosTrading::IllegalServiceType,
00133 CosTrading::UnknownServiceType);
00134
00135 void mask_type (in CosTrading::ServiceTypeName name)
00136 raises (CosTrading::IllegalServiceType,
00137 CosTrading::UnknownServiceType,
00138 AlreadyMasked);
00139
00140 void unmask_type (in CosTrading::ServiceTypeName name)
00141 raises (CosTrading::IllegalServiceType,
00142 CosTrading::UnknownServiceType,
00143 NotMasked);
00144 };
00145 };
00146
00147 module CosTradingSequences
00148 {
00149 typedef sequence<short> ShortSeq;
00150 typedef sequence<unsigned short> UShortSeq;
00151 typedef sequence<long> LongSeq;
00152 typedef sequence<unsigned long> ULongSeq;
00153 typedef sequence<boolean> BooleanSeq;
00154 typedef sequence<float> FloatSeq;
00155 typedef sequence<double> DoubleSeq;
00156 typedef sequence<string> StringSeq;
00157 };
00158
00159 #endif