1 #ifndef __trading_idl__
2 #define __trading_idl__
4 #pragma prefix "omg.org"
8 // forward references to our interfaces
15 interface OfferIterator;
16 interface OfferIdIterator;
18 // type definitions used in more than one interface
20 typedef string Istring;
21 typedef Object TypeRepository;
23 typedef Istring PropertyName;
24 typedef sequence<PropertyName> PropertyNameSeq;
25 typedef any PropertyValue;
30 typedef sequence<Property> PropertySeq;
34 PropertySeq properties;
36 typedef sequence<Offer> OfferSeq;
38 typedef string OfferId;
39 typedef sequence<OfferId> OfferIdSeq;
41 typedef Istring ServiceTypeName; // similar structure to IR::Identifier
43 typedef Istring Constraint;
51 typedef Istring LinkName;
52 typedef sequence<LinkName> LinkNameSeq;
53 typedef LinkNameSeq TraderName;
55 typedef string PolicyName; // policy names restricted to Latin1
56 typedef sequence<PolicyName> PolicyNameSeq;
57 typedef any PolicyValue;
62 typedef sequence<Policy> PolicySeq;
64 // exceptions used in more than one interface
66 exception UnknownMaxLeft {};
68 exception NotImplemented {};
70 exception IllegalServiceType {
74 exception UnknownServiceType {
78 exception IllegalPropertyName {
82 exception DuplicatePropertyName {
85 exception PropertyTypeMismatch {
90 exception MissingMandatoryProperty {
95 exception ReadonlyDynamicProperty {
100 exception IllegalConstraint {
104 exception InvalidLookupRef {
108 exception IllegalOfferId {
112 exception UnknownOfferId {
116 exception DuplicatePolicyName {
122 interface TraderComponents {
124 readonly attribute Lookup lookup_if;
125 readonly attribute Register register_if;
126 readonly attribute Link link_if;
127 readonly attribute Proxy proxy_if;
128 readonly attribute Admin admin_if;
131 interface SupportAttributes {
133 readonly attribute boolean supports_modifiable_properties;
134 readonly attribute boolean supports_dynamic_properties;
135 readonly attribute boolean supports_proxy_offers;
136 readonly attribute TypeRepository type_repos;
139 interface ImportAttributes {
141 readonly attribute unsigned long def_search_card;
142 readonly attribute unsigned long max_search_card;
143 readonly attribute unsigned long def_match_card;
144 readonly attribute unsigned long max_match_card;
145 readonly attribute unsigned long def_return_card;
146 readonly attribute unsigned long max_return_card;
147 readonly attribute unsigned long max_list;
148 readonly attribute unsigned long def_hop_count;
149 readonly attribute unsigned long max_hop_count;
150 readonly attribute FollowOption def_follow_policy;
151 readonly attribute FollowOption max_follow_policy;
154 interface LinkAttributes {
156 readonly attribute FollowOption max_link_follow_policy;
159 interface Lookup:TraderComponents,SupportAttributes,ImportAttributes {
161 typedef Istring Preference;
163 enum HowManyProps { none, some, all };
165 union SpecifiedProps switch ( HowManyProps ) {
166 case some: PropertyNameSeq prop_names;
169 exception IllegalPreference {
173 exception IllegalPolicyName {
177 exception PolicyTypeMismatch {
181 exception InvalidPolicyValue {
186 in ServiceTypeName type,
187 in Constraint constr,
189 in PolicySeq policies,
190 in SpecifiedProps desired_props,
191 in unsigned long how_many,
193 out OfferIterator offer_itr,
194 out PolicyNameSeq limits_applied
204 DuplicatePropertyName,
209 interface Register : TraderComponents, SupportAttributes {
213 ServiceTypeName type;
214 PropertySeq properties;
217 exception InvalidObjectRef {
221 exception UnknownPropertyName {
225 exception InterfaceTypeMismatch {
226 ServiceTypeName type;
230 exception ProxyOfferId {
234 exception MandatoryProperty {
235 ServiceTypeName type;
239 exception ReadonlyProperty {
240 ServiceTypeName type;
244 exception NoMatchingOffers {
248 exception IllegalTraderName {
252 exception UnknownTraderName {
256 exception RegisterNotSupported {
262 in ServiceTypeName type,
263 in PropertySeq properties
268 InterfaceTypeMismatch,
269 IllegalPropertyName, // e.g. prop_name = "<foo-bar"
270 PropertyTypeMismatch,
271 ReadonlyDynamicProperty,
272 MissingMandatoryProperty,
273 DuplicatePropertyName
294 in PropertyNameSeq del_list,
295 in PropertySeq modify_list
303 PropertyTypeMismatch,
304 ReadonlyDynamicProperty,
307 DuplicatePropertyName
310 void withdraw_using_constraint (
311 in ServiceTypeName type,
329 interface Link : TraderComponents, SupportAttributes, LinkAttributes {
334 FollowOption def_pass_on_follow_rule;
335 FollowOption limiting_follow_rule;
338 exception IllegalLinkName {
342 exception UnknownLinkName {
346 exception DuplicateLinkName {
349 exception DefaultFollowTooPermissive {
350 FollowOption def_pass_on_follow_rule;
351 FollowOption limiting_follow_rule;
354 exception LimitingFollowTooPermissive {
355 FollowOption limiting_follow_rule;
356 FollowOption max_link_follow_policy;
362 in FollowOption def_pass_on_follow_rule,
363 in FollowOption limiting_follow_rule
367 InvalidLookupRef, // e.g. nil
368 DefaultFollowTooPermissive,
369 LimitingFollowTooPermissive
379 LinkInfo describe_link (
386 LinkNameSeq list_links ( );
390 in FollowOption def_pass_on_follow_rule,
391 in FollowOption limiting_follow_rule
395 DefaultFollowTooPermissive,
396 LimitingFollowTooPermissive
400 interface Proxy : TraderComponents, SupportAttributes {
402 typedef Istring ConstraintRecipe;
405 ServiceTypeName type;
407 PropertySeq properties;
408 boolean if_match_all;
409 ConstraintRecipe recipe;
410 PolicySeq policies_to_pass_on;
413 exception IllegalRecipe {
414 ConstraintRecipe recipe;
417 exception NotProxyOfferId {
421 OfferId export_proxy (
423 in ServiceTypeName type,
424 in PropertySeq properties,
425 in boolean if_match_all,
426 in ConstraintRecipe recipe,
427 in PolicySeq policies_to_pass_on
431 InvalidLookupRef, // e.g. nil
433 PropertyTypeMismatch,
434 ReadonlyDynamicProperty,
435 MissingMandatoryProperty,
437 DuplicatePropertyName,
441 void withdraw_proxy (
449 ProxyInfo describe_proxy (
458 interface Admin : TraderComponents, SupportAttributes, ImportAttributes,
461 typedef sequence<octet> OctetSeq;
463 readonly attribute OctetSeq request_id_stem;
465 unsigned long set_def_search_card (in unsigned long value);
466 unsigned long set_max_search_card (in unsigned long value);
468 unsigned long set_def_match_card (in unsigned long value);
469 unsigned long set_max_match_card (in unsigned long value);
471 unsigned long set_def_return_card (in unsigned long value);
472 unsigned long set_max_return_card (in unsigned long value);
474 unsigned long set_max_list (in unsigned long value);
476 boolean set_supports_modifiable_properties (in boolean value);
477 boolean set_supports_dynamic_properties (in boolean value);
478 boolean set_supports_proxy_offers (in boolean value);
480 unsigned long set_def_hop_count (in unsigned long value);
481 unsigned long set_max_hop_count (in unsigned long value);
483 FollowOption set_def_follow_policy (in FollowOption policy);
484 FollowOption set_max_follow_policy (in FollowOption policy);
486 FollowOption set_max_link_follow_policy (in FollowOption policy);
488 TypeRepository set_type_repos (in TypeRepository repository);
490 OctetSeq set_request_id_stem (in OctetSeq stem);
493 in unsigned long how_many,
495 out OfferIdIterator id_itr
501 in unsigned long how_many,
503 out OfferIdIterator id_itr
509 interface OfferIterator {
511 unsigned long max_left (
524 interface OfferIdIterator {
525 unsigned long max_left (
538 typedef sequence<string> StringList;
539 typedef sequence<long> LongList;
540 typedef sequence<float> FloatList;
542 }; /* end module CosTrading */