00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TAO_TRADING_IDL
00017 #define TAO_TRADING_IDL
00018
00019 #pragma prefix "omg.org"
00020
00021 module CosTrading
00022 {
00023
00024
00025 interface Lookup;
00026 interface Register;
00027 interface Link;
00028 interface Proxy;
00029 interface Admin;
00030 interface OfferIterator;
00031 interface OfferIdIterator;
00032
00033
00034 typedef string Istring;
00035 typedef Object TypeRepository;
00036
00037 typedef Istring PropertyName;
00038 typedef sequence<PropertyName> PropertyNameSeq;
00039 typedef any PropertyValue;
00040
00041 struct Property
00042 {
00043 PropertyName name;
00044 PropertyValue value;
00045 };
00046 typedef sequence<Property> PropertySeq;
00047
00048 struct Offer
00049 {
00050 Object reference;
00051 PropertySeq properties;
00052 };
00053 typedef sequence<Offer> OfferSeq;
00054
00055 typedef string OfferId;
00056 typedef sequence<OfferId> OfferIdSeq;
00057
00058 typedef Istring ServiceTypeName;
00059
00060 typedef Istring Constraint;
00061
00062 enum FollowOption
00063 {
00064 local_only,
00065 if_no_local,
00066 always
00067 };
00068
00069 typedef Istring LinkName;
00070 typedef sequence<LinkName> LinkNameSeq;
00071 typedef LinkNameSeq TraderName;
00072
00073 typedef string PolicyName;
00074 typedef sequence<PolicyName> PolicyNameSeq;
00075 typedef any PolicyValue;
00076
00077 struct Policy
00078 {
00079 PolicyName name;
00080 PolicyValue value;
00081 };
00082 typedef sequence<Policy> PolicySeq;
00083
00084
00085
00086 exception UnknownMaxLeft {};
00087
00088 exception NotImplemented {};
00089
00090 exception IllegalServiceType
00091 {
00092 ServiceTypeName type;
00093 };
00094
00095 exception UnknownServiceType
00096 {
00097 ServiceTypeName type;
00098 };
00099
00100 exception IllegalPropertyName
00101 {
00102 PropertyName name;
00103 };
00104
00105 exception DuplicatePropertyName
00106 {
00107 PropertyName name;
00108 };
00109
00110 exception PropertyTypeMismatch
00111 {
00112 ServiceTypeName type;
00113 Property prop;
00114 };
00115
00116 exception MissingMandatoryProperty
00117 {
00118 ServiceTypeName type;
00119 PropertyName name;
00120 };
00121
00122 exception ReadonlyDynamicProperty
00123 {
00124 ServiceTypeName type;
00125 PropertyName name;
00126 };
00127
00128 exception IllegalConstraint
00129 {
00130 Constraint constr;
00131 };
00132
00133 exception InvalidLookupRef
00134 {
00135 Lookup target;
00136 };
00137
00138 exception IllegalOfferId
00139 {
00140 OfferId id;
00141 };
00142
00143 exception UnknownOfferId
00144 {
00145 OfferId id;
00146 };
00147
00148 exception DuplicatePolicyName
00149 {
00150 PolicyName name;
00151 };
00152
00153
00154
00155 interface TraderComponents
00156 {
00157 readonly attribute Lookup lookup_if;
00158 readonly attribute Register register_if;
00159 readonly attribute Link link_if;
00160 readonly attribute Proxy proxy_if;
00161 readonly attribute Admin admin_if;
00162 };
00163
00164 interface SupportAttributes
00165 {
00166 readonly attribute boolean supports_modifiable_properties;
00167 readonly attribute boolean supports_dynamic_properties;
00168 readonly attribute boolean supports_proxy_offers;
00169 readonly attribute TypeRepository type_repos;
00170 };
00171
00172 interface ImportAttributes
00173 {
00174 readonly attribute unsigned long def_search_card;
00175 readonly attribute unsigned long max_search_card;
00176 readonly attribute unsigned long def_match_card;
00177 readonly attribute unsigned long max_match_card;
00178 readonly attribute unsigned long def_return_card;
00179 readonly attribute unsigned long max_return_card;
00180 readonly attribute unsigned long max_list;
00181 readonly attribute unsigned long def_hop_count;
00182 readonly attribute unsigned long max_hop_count;
00183 readonly attribute FollowOption def_follow_policy;
00184 readonly attribute FollowOption max_follow_policy;
00185 };
00186
00187 interface LinkAttributes
00188 {
00189 readonly attribute FollowOption max_link_follow_policy;
00190 };
00191
00192 interface Lookup:TraderComponents,SupportAttributes,ImportAttributes
00193 {
00194 typedef Istring Preference;
00195
00196 enum HowManyProps { none, some, all };
00197
00198 union SpecifiedProps switch ( HowManyProps )
00199 {
00200 case some: PropertyNameSeq prop_names;
00201 };
00202
00203 exception IllegalPreference {
00204 Preference pref;
00205 };
00206
00207 exception IllegalPolicyName {
00208 PolicyName name;
00209 };
00210
00211 exception PolicyTypeMismatch {
00212 Policy the_policy;
00213 };
00214
00215 exception InvalidPolicyValue {
00216 Policy the_policy;
00217 };
00218
00219 void query (in ServiceTypeName type,
00220 in Constraint constr,
00221 in Preference pref,
00222 in PolicySeq policies,
00223 in SpecifiedProps desired_props,
00224 in unsigned long how_many,
00225 out OfferSeq offers,
00226 out OfferIterator offer_itr,
00227 out PolicyNameSeq limits_applied)
00228 raises (IllegalServiceType,
00229 UnknownServiceType,
00230 IllegalConstraint,
00231 IllegalPreference,
00232 IllegalPolicyName,
00233 PolicyTypeMismatch,
00234 InvalidPolicyValue,
00235 IllegalPropertyName,
00236 DuplicatePropertyName,
00237 DuplicatePolicyName);
00238 };
00239
00240 interface Register : TraderComponents, SupportAttributes
00241 {
00242 struct OfferInfo
00243 {
00244 Object reference;
00245 ServiceTypeName type;
00246 PropertySeq properties;
00247 };
00248
00249 exception InvalidObjectRef {
00250 Object ref;
00251 };
00252
00253 exception UnknownPropertyName {
00254 PropertyName name;
00255 };
00256
00257 exception InterfaceTypeMismatch {
00258 ServiceTypeName type;
00259 Object reference;
00260 };
00261
00262 exception ProxyOfferId {
00263 OfferId id;
00264 };
00265
00266 exception MandatoryProperty {
00267 ServiceTypeName type;
00268 PropertyName name;
00269 };
00270
00271 exception ReadonlyProperty {
00272 ServiceTypeName type;
00273 PropertyName name;
00274 };
00275
00276 exception NoMatchingOffers {
00277 Constraint constr;
00278 };
00279
00280 exception IllegalTraderName {
00281 TraderName name;
00282 };
00283
00284 exception UnknownTraderName {
00285 TraderName name;
00286 };
00287
00288 exception RegisterNotSupported {
00289 TraderName name;
00290 };
00291
00292 OfferId export (in Object reference,
00293 in ServiceTypeName type,
00294 in PropertySeq properties)
00295 raises (InvalidObjectRef,
00296 IllegalServiceType,
00297 UnknownServiceType,
00298 InterfaceTypeMismatch,
00299 IllegalPropertyName,
00300 PropertyTypeMismatch,
00301 ReadonlyDynamicProperty,
00302 MissingMandatoryProperty,
00303 DuplicatePropertyName);
00304
00305 void withdraw (in OfferId id)
00306 raises (IllegalOfferId,
00307 UnknownOfferId,
00308 ProxyOfferId);
00309
00310 OfferInfo describe (in OfferId id)
00311 raises (IllegalOfferId,
00312 UnknownOfferId,
00313 ProxyOfferId);
00314
00315 void modify (in OfferId id,
00316 in PropertyNameSeq del_list,
00317 in PropertySeq modify_list)
00318 raises (NotImplemented,
00319 IllegalOfferId,
00320 UnknownOfferId,
00321 ProxyOfferId,
00322 IllegalPropertyName,
00323 UnknownPropertyName,
00324 PropertyTypeMismatch,
00325 ReadonlyDynamicProperty,
00326 MandatoryProperty,
00327 ReadonlyProperty,
00328 DuplicatePropertyName);
00329
00330 void withdraw_using_constraint (in ServiceTypeName type,
00331 in Constraint constr)
00332 raises (IllegalServiceType,
00333 UnknownServiceType,
00334 IllegalConstraint,
00335 NoMatchingOffers);
00336
00337 Register resolve (in TraderName name)
00338 raises (IllegalTraderName,
00339 UnknownTraderName,
00340 RegisterNotSupported);
00341 };
00342
00343 interface Link : TraderComponents, SupportAttributes, LinkAttributes
00344 {
00345 struct LinkInfo
00346 {
00347 Lookup target;
00348 Register target_reg;
00349 FollowOption def_pass_on_follow_rule;
00350 FollowOption limiting_follow_rule;
00351 };
00352
00353 exception IllegalLinkName {
00354 LinkName name;
00355 };
00356
00357 exception UnknownLinkName {
00358 LinkName name;
00359 };
00360
00361 exception DuplicateLinkName {
00362 LinkName name;
00363 };
00364
00365 exception DefaultFollowTooPermissive {
00366 FollowOption def_pass_on_follow_rule;
00367 FollowOption limiting_follow_rule;
00368 };
00369
00370 exception LimitingFollowTooPermissive {
00371 FollowOption limiting_follow_rule;
00372 FollowOption max_link_follow_policy;
00373 };
00374
00375 void add_link (in LinkName name,
00376 in Lookup target,
00377 in FollowOption def_pass_on_follow_rule,
00378 in FollowOption limiting_follow_rule)
00379 raises (IllegalLinkName,
00380 DuplicateLinkName,
00381 InvalidLookupRef,
00382 DefaultFollowTooPermissive,
00383 LimitingFollowTooPermissive);
00384
00385 void remove_link (in LinkName name)
00386 raises (IllegalLinkName,
00387 UnknownLinkName);
00388
00389 LinkInfo describe_link (in LinkName name)
00390 raises (IllegalLinkName,
00391 UnknownLinkName);
00392
00393 LinkNameSeq list_links ( );
00394
00395 void modify_link (in LinkName name,
00396 in FollowOption def_pass_on_follow_rule,
00397 in FollowOption limiting_follow_rule)
00398 raises (IllegalLinkName,
00399 UnknownLinkName,
00400 DefaultFollowTooPermissive,
00401 LimitingFollowTooPermissive);
00402 };
00403
00404 interface Proxy : TraderComponents, SupportAttributes
00405 {
00406 typedef Istring ConstraintRecipe;
00407
00408 struct ProxyInfo
00409 {
00410 ServiceTypeName type;
00411 Lookup target;
00412 PropertySeq properties;
00413 boolean if_match_all;
00414 ConstraintRecipe recipe;
00415 PolicySeq policies_to_pass_on;
00416 };
00417
00418 exception IllegalRecipe {
00419 ConstraintRecipe recipe;
00420 };
00421
00422 exception NotProxyOfferId {
00423 OfferId id;
00424 };
00425
00426 OfferId export_proxy (in Lookup target,
00427 in ServiceTypeName type,
00428 in PropertySeq properties,
00429 in boolean if_match_all,
00430 in ConstraintRecipe recipe,
00431 in PolicySeq policies_to_pass_on)
00432 raises (IllegalServiceType,
00433 UnknownServiceType,
00434 InvalidLookupRef,
00435 IllegalPropertyName,
00436 PropertyTypeMismatch,
00437 ReadonlyDynamicProperty,
00438 MissingMandatoryProperty,
00439 IllegalRecipe,
00440 DuplicatePropertyName,
00441 DuplicatePolicyName);
00442
00443 void withdraw_proxy (in OfferId id)
00444 raises (IllegalOfferId,
00445 UnknownOfferId,
00446 NotProxyOfferId);
00447
00448 ProxyInfo describe_proxy (in OfferId id)
00449 raises (IllegalOfferId,
00450 UnknownOfferId,
00451 NotProxyOfferId);
00452 };
00453
00454 interface Admin : TraderComponents, SupportAttributes, ImportAttributes, LinkAttributes
00455 {
00456 typedef sequence<octet> OctetSeq;
00457
00458 readonly attribute OctetSeq request_id_stem;
00459
00460 unsigned long set_def_search_card (in unsigned long value);
00461 unsigned long set_max_search_card (in unsigned long value);
00462
00463 unsigned long set_def_match_card (in unsigned long value);
00464 unsigned long set_max_match_card (in unsigned long value);
00465
00466 unsigned long set_def_return_card (in unsigned long value);
00467 unsigned long set_max_return_card (in unsigned long value);
00468
00469 unsigned long set_max_list (in unsigned long value);
00470
00471 boolean set_supports_modifiable_properties (in boolean value);
00472 boolean set_supports_dynamic_properties (in boolean value);
00473 boolean set_supports_proxy_offers (in boolean value);
00474
00475 unsigned long set_def_hop_count (in unsigned long value);
00476 unsigned long set_max_hop_count (in unsigned long value);
00477
00478 FollowOption set_def_follow_policy (in FollowOption policy);
00479 FollowOption set_max_follow_policy (in FollowOption policy);
00480
00481 FollowOption set_max_link_follow_policy (in FollowOption policy);
00482
00483 TypeRepository set_type_repos (in TypeRepository repository);
00484
00485 OctetSeq set_request_id_stem (in OctetSeq stem);
00486
00487 void list_offers (in unsigned long how_many,
00488 out OfferIdSeq ids,
00489 out OfferIdIterator id_itr)
00490 raises (NotImplemented);
00491
00492 void list_proxies (in unsigned long how_many,
00493 out OfferIdSeq ids,
00494 out OfferIdIterator id_itr)
00495 raises (NotImplemented);
00496 };
00497
00498 interface OfferIterator
00499 {
00500 unsigned long max_left ()
00501 raises (UnknownMaxLeft);
00502
00503 boolean next_n (in unsigned long n,
00504 out OfferSeq offers);
00505
00506 void destroy ();
00507 };
00508
00509 interface OfferIdIterator
00510 {
00511 unsigned long max_left ()
00512 raises (UnknownMaxLeft);
00513
00514 boolean next_n (in unsigned long n,
00515 out OfferIdSeq ids);
00516
00517 void destroy ();
00518 };
00519
00520 };
00521
00522 #endif