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 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547
|
//File: CosTrading.idl
//Part of the Trading Object Service
#ifndef _COS_TRADING_IDL_
#define _COS_TRADING_IDL_
// omniORB specific pragmas to insert extra includes into the stub header.
#pragma hh #include "COS_sysdep.h"
#pragma prefix "omg.org"
module CosTrading {
// forward references to our interfaces
interface Lookup;
interface Register;
interface Link;
interface Proxy;
interface Admin;
interface OfferIterator;
interface OfferIdIterator;
// type definitions used in more than one interface
typedef string Istring;
typedef Object TypeRepository;
typedef Istring PropertyName;
typedef sequence<PropertyName> PropertyNameSeq;
typedef any PropertyValue;
struct Property {
PropertyName name;
PropertyValue value;
};
typedef sequence<Property> PropertySeq;
struct Offer {
Object reference;
PropertySeq properties;
};
typedef sequence<Offer> OfferSeq;
typedef string OfferId;
typedef sequence<OfferId> OfferIdSeq;
typedef Istring ServiceTypeName; // similar structure to IR::Identifier
typedef Istring Constraint;
enum FollowOption {
local_only,
if_no_local,
always
};
typedef Istring LinkName;
typedef sequence<LinkName> LinkNameSeq;
typedef LinkNameSeq TraderName;
typedef string PolicyName; // policy names restricted to Latin1
typedef sequence<PolicyName> PolicyNameSeq;
typedef any PolicyValue;
struct Policy {
PolicyName name;
PolicyValue value;
};
typedef sequence<Policy> PolicySeq;
// exceptions used in more than one interface
exception UnknownMaxLeft {};
exception NotImplemented {};
exception IllegalServiceType {
ServiceTypeName type;
};
exception UnknownServiceType {
ServiceTypeName type;
};
exception IllegalPropertyName {
PropertyName name;
};
exception DuplicatePropertyName {
PropertyName name;
};
exception PropertyTypeMismatch {
ServiceTypeName type;
Property prop;
};
exception MissingMandatoryProperty {
ServiceTypeName type;
PropertyName name;
};
exception ReadonlyDynamicProperty {
ServiceTypeName type;
PropertyName name;
};
exception IllegalConstraint {
Constraint constr;
};
exception InvalidLookupRef {
Lookup target;
};
exception IllegalOfferId {
OfferId id;
};
exception UnknownOfferId {
OfferId id;
};
exception DuplicatePolicyName {
PolicyName name;
};
// the interfaces
interface TraderComponents {
readonly attribute Lookup lookup_if;
readonly attribute Register register_if;
readonly attribute Link link_if;
readonly attribute Proxy proxy_if;
readonly attribute Admin admin_if;
};
interface SupportAttributes {
readonly attribute boolean supports_modifiable_properties;
readonly attribute boolean supports_dynamic_properties;
readonly attribute boolean supports_proxy_offers;
readonly attribute TypeRepository type_repos;
};
interface ImportAttributes {
readonly attribute unsigned long def_search_card;
readonly attribute unsigned long max_search_card;
readonly attribute unsigned long def_match_card;
readonly attribute unsigned long max_match_card;
readonly attribute unsigned long def_return_card;
readonly attribute unsigned long max_return_card;
readonly attribute unsigned long max_list;
readonly attribute unsigned long def_hop_count;
readonly attribute unsigned long max_hop_count;
readonly attribute FollowOption def_follow_policy;
readonly attribute FollowOption max_follow_policy;
};
interface LinkAttributes {
readonly attribute FollowOption max_link_follow_policy;
};
interface Lookup:TraderComponents,SupportAttributes,ImportAttributes {
typedef Istring Preference;
enum HowManyProps { none, some, all };
union SpecifiedProps switch ( HowManyProps ) {
case some: PropertyNameSeq prop_names;
};
exception IllegalPreference {
Preference pref;
};
exception IllegalPolicyName {
PolicyName name;
};
exception PolicyTypeMismatch {
Policy the_policy;
};
exception InvalidPolicyValue {
Policy the_policy;
};
void query (
in ServiceTypeName type,
in Constraint constr,
in Preference pref,
in PolicySeq policies,
in SpecifiedProps desired_props,
in unsigned long how_many,
out OfferSeq offers,
out OfferIterator offer_itr,
out PolicyNameSeq limits_applied
) raises (
IllegalServiceType,
UnknownServiceType,
IllegalConstraint,
IllegalPreference,
IllegalPolicyName,
PolicyTypeMismatch,
InvalidPolicyValue,
IllegalPropertyName,
DuplicatePropertyName,
DuplicatePolicyName
);
};
interface Register : TraderComponents, SupportAttributes {
struct OfferInfo {
Object reference;
ServiceTypeName type;
PropertySeq properties;
};
exception InvalidObjectRef {
Object ref;
};
exception UnknownPropertyName {
PropertyName name;
};
exception InterfaceTypeMismatch {
ServiceTypeName type;
Object reference;
};
exception ProxyOfferId {
OfferId id;
};
exception MandatoryProperty {
ServiceTypeName type;
PropertyName name;
};
exception ReadonlyProperty {
ServiceTypeName type;
PropertyName name;
};
exception NoMatchingOffers {
Constraint constr;
};
exception IllegalTraderName {
TraderName name;
};
exception UnknownTraderName {
TraderName name;
};
exception RegisterNotSupported {
TraderName name;
};
OfferId export (
in Object reference,
in ServiceTypeName type,
in PropertySeq properties
) raises (
InvalidObjectRef,
IllegalServiceType,
UnknownServiceType,
InterfaceTypeMismatch,
IllegalPropertyName, // e.g. prop_name = "<foo-bar"
PropertyTypeMismatch,
ReadonlyDynamicProperty,
MissingMandatoryProperty,
DuplicatePropertyName
);
void withdraw (
in OfferId id
) raises (
IllegalOfferId,
UnknownOfferId,
ProxyOfferId
);
OfferInfo describe (
in OfferId id
) raises (
IllegalOfferId,
UnknownOfferId,
ProxyOfferId
);
void modify (
in OfferId id,
in PropertyNameSeq del_list,
in PropertySeq modify_list
) raises (
NotImplemented,
IllegalOfferId,
UnknownOfferId,
ProxyOfferId,
IllegalPropertyName,
UnknownPropertyName,
PropertyTypeMismatch,
ReadonlyDynamicProperty,
MandatoryProperty,
ReadonlyProperty,
DuplicatePropertyName
);
void withdraw_using_constraint (
in ServiceTypeName type,
in Constraint constr
) raises (
IllegalServiceType,
UnknownServiceType,
IllegalConstraint,
NoMatchingOffers
);
Register resolve (
in TraderName name
) raises (
IllegalTraderName,
UnknownTraderName,
RegisterNotSupported
);
};
interface Link : TraderComponents, SupportAttributes, LinkAttributes {
struct LinkInfo {
Lookup target;
Register target_reg;
FollowOption def_pass_on_follow_rule;
FollowOption limiting_follow_rule;
};
exception IllegalLinkName {
LinkName name;
};
exception UnknownLinkName {
LinkName name;
};
exception DuplicateLinkName {
LinkName name;
};
exception DefaultFollowTooPermissive {
FollowOption def_pass_on_follow_rule;
FollowOption limiting_follow_rule;
};
exception LimitingFollowTooPermissive {
FollowOption limiting_follow_rule;
FollowOption max_link_follow_policy;
};
void add_link (
in LinkName name,
in Lookup target,
in FollowOption def_pass_on_follow_rule,
in FollowOption limiting_follow_rule
) raises (
IllegalLinkName,
DuplicateLinkName,
InvalidLookupRef, // e.g. nil
DefaultFollowTooPermissive,
LimitingFollowTooPermissive
);
void remove_link (
in LinkName name
) raises (
IllegalLinkName,
UnknownLinkName
);
LinkInfo describe_link (
in LinkName name
) raises (
IllegalLinkName,
UnknownLinkName
);
LinkNameSeq list_links ( );
void modify_link (
in LinkName name,
in FollowOption def_pass_on_follow_rule,
in FollowOption limiting_follow_rule
) raises (
IllegalLinkName,
UnknownLinkName,
DefaultFollowTooPermissive,
LimitingFollowTooPermissive
);
};
interface Proxy : TraderComponents, SupportAttributes {
typedef Istring ConstraintRecipe;
struct ProxyInfo {
ServiceTypeName type;
Lookup target;
PropertySeq properties;
boolean if_match_all;
ConstraintRecipe recipe;
PolicySeq policies_to_pass_on;
};
exception IllegalRecipe {
ConstraintRecipe recipe;
};
exception NotProxyOfferId {
OfferId id;
};
OfferId export_proxy (
in Lookup target,
in ServiceTypeName type,
in PropertySeq properties,
in boolean if_match_all,
in ConstraintRecipe recipe,
in PolicySeq policies_to_pass_on
) raises (
IllegalServiceType,
UnknownServiceType,
InvalidLookupRef, // e.g. nil
IllegalPropertyName,
PropertyTypeMismatch,
ReadonlyDynamicProperty,
MissingMandatoryProperty,
IllegalRecipe,
DuplicatePropertyName,
DuplicatePolicyName
);
void withdraw_proxy (
in OfferId id
) raises (
IllegalOfferId,
UnknownOfferId,
NotProxyOfferId
);
ProxyInfo describe_proxy (
in OfferId id
) raises (
IllegalOfferId,
UnknownOfferId,
NotProxyOfferId
);
};
interface Admin : TraderComponents, SupportAttributes, ImportAttributes,
LinkAttributes {
typedef sequence<octet> OctetSeq;
readonly attribute OctetSeq request_id_stem;
unsigned long set_def_search_card (in unsigned long value);
unsigned long set_max_search_card (in unsigned long value);
unsigned long set_def_match_card (in unsigned long value);
unsigned long set_max_match_card (in unsigned long value);
unsigned long set_def_return_card (in unsigned long value);
unsigned long set_max_return_card (in unsigned long value);
unsigned long set_max_list (in unsigned long value);
boolean set_supports_modifiable_properties (in boolean value);
boolean set_supports_dynamic_properties (in boolean value);
boolean set_supports_proxy_offers (in boolean value);
unsigned long set_def_hop_count (in unsigned long value);
unsigned long set_max_hop_count (in unsigned long value);
FollowOption set_def_follow_policy (in FollowOption policy);
FollowOption set_max_follow_policy (in FollowOption policy);
FollowOption set_max_link_follow_policy (in FollowOption policy);
TypeRepository set_type_repos (in TypeRepository repository);
OctetSeq set_request_id_stem (in OctetSeq stem);
void list_offers (
in unsigned long how_many,
out OfferIdSeq ids,
out OfferIdIterator id_itr
) raises (
NotImplemented
);
void list_proxies (
in unsigned long how_many,
out OfferIdSeq ids,
out OfferIdIterator id_itr
) raises (
NotImplemented
);
};
interface OfferIterator {
unsigned long max_left (
) raises (
UnknownMaxLeft
);
boolean next_n (
in unsigned long n,
out OfferSeq offers
);
void destroy ();
};
interface OfferIdIterator {
unsigned long max_left (
) raises (
UnknownMaxLeft
);
boolean next_n (
in unsigned long n,
out OfferIdSeq ids
);
void destroy ();
};
}; /* end module CosTrading */
#endif /* ifndef _COS_TRADING_IDL_ */
|