GIOP.idl revision 608:7e06bf1dcb09
1168404Spjd/* 2168404Spjd * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. 3168404Spjd * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4168404Spjd * 5168404Spjd * This code is free software; you can redistribute it and/or modify it 6168404Spjd * under the terms of the GNU General Public License version 2 only, as 7168404Spjd * published by the Free Software Foundation. Oracle designates this 8168404Spjd * particular file as subject to the "Classpath" exception as provided 9168404Spjd * by Oracle in the LICENSE file that accompanied this code. 10168404Spjd * 11168404Spjd * This code is distributed in the hope that it will be useful, but WITHOUT 12168404Spjd * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13168404Spjd * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14168404Spjd * version 2 for more details (a copy is included in the LICENSE file that 15168404Spjd * accompanied this code). 16168404Spjd * 17168404Spjd * You should have received a copy of the GNU General Public License version 18168404Spjd * 2 along with this work; if not, write to the Free Software Foundation, 19168404Spjd * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20168404Spjd * 21168404Spjd * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22219089Spjd * or visit www.oracle.com if you need additional information or have any 23265740Sdelphij * questions. 24168404Spjd */ 25168404Spjd 26168404Spjd#include "IOP.idl" 27168404Spjd 28168404Spjdmodule GIOP { // IDL extended for version 1.1 and 1.2 29168404Spjd 30168404Spjd struct Version { 31168404Spjd octet major; 32219089Spjd octet minor; 33219089Spjd }; 34219089Spjd 35168404Spjd 36219089Spjd // GIOP 1.0 37168404Spjd 38168404Spjd struct MessageHeader_1_0 { // Renamed from MessageHeader 39168404Spjd char magic [4]; 40219089Spjd Version GIOP_version; 41168404Spjd boolean byte_order; 42185029Spjd octet message_type; 43185029Spjd unsigned long message_size; 44168404Spjd }; 45168404Spjd 46168404Spjd // GIOP 1.1 47168404Spjd 48168404Spjd struct MessageHeader_1_1 { 49168404Spjd char magic [4]; 50168404Spjd Version GIOP_version; 51168404Spjd octet flags; // GIOP 1.1 change 52168404Spjd octet message_type; 53168404Spjd unsigned long message_size; 54168404Spjd }; 55168404Spjd 56168404Spjd // GIOP 1.2 57168404Spjd // Same Header contents for 1.1 and 1.2 58168404Spjd typedef MessageHeader_1_1 MessageHeader_1_2; 59168404Spjd 60168404Spjd 61168404Spjd // GIOP 1.0 62168404Spjd struct RequestHeader_1_0 { // Renamed from RequestHeader 63168404Spjd IOP::ServiceContextList service_context; 64168404Spjd unsigned long request_id; 65168404Spjd boolean response_expected; 66168404Spjd sequence<octet> object_key; 67168404Spjd string operation; 68168404Spjd sequence<octet> requesting_principal; 69168404Spjd }; 70168404Spjd 71168404Spjd // GIOP 1.1 72168404Spjd struct RequestHeader_1_1 { 73168404Spjd IOP::ServiceContextList service_context; 74168404Spjd unsigned long request_id; 75168404Spjd boolean response_expected; 76168404Spjd octet reserved[3]; // Added in GIOP 1.1 77168404Spjd sequence <octet> object_key; 78168404Spjd string operation; 79168404Spjd sequence<octet> requesting_principal; 80168404Spjd }; 81168404Spjd 82168404Spjd // GIOP 1.2 83168404Spjd typedef short AddressingDisposition; 84168404Spjd const short KeyAddr = 0; 85168404Spjd const short ProfileAddr = 1; 86168404Spjd const short ReferenceAddr = 2; 87168404Spjd struct IORAddressingInfo { 88168404Spjd unsigned long selected_profile_index; 89168404Spjd IOP::IOR ior; 90168404Spjd }; 91168404Spjd union TargetAddress switch (AddressingDisposition) { 92168404Spjd case KeyAddr: sequence <octet> object_key; 93168404Spjd case ProfileAddr: IOP::TaggedProfile profile; 94168404Spjd case ReferenceAddr: IORAddressingInfo ior; 95168404Spjd }; 96168404Spjd struct RequestHeader_1_2 { 97168404Spjd unsigned long request_id; 98168404Spjd octet response_flags; 99168404Spjd octet reserved[3]; 100168404Spjd TargetAddress target; 101168404Spjd string operation; 102168404Spjd IOP::ServiceContextList service_context; 103168404Spjd // Principal not in GIOP 1.2 104168404Spjd }; 105168404Spjd 106168404Spjd 107168404Spjd #ifndef GIOP_1_2 //We're supporting all versions 108265740Sdelphij 109168404Spjd // GIOP 1.0 and 1.1 110168404Spjd enum ReplyStatusType_1_0 { // Renamed from ReplyStatusType 111265740Sdelphij NO_EXCEPTION, 112265740Sdelphij USER_EXCEPTION, 113265740Sdelphij SYSTEM_EXCEPTION, 114265740Sdelphij LOCATION_FORWARD 115265740Sdelphij }; 116265740Sdelphij 117265740Sdelphij // GIOP 1.0 118168404Spjd struct ReplyHeader_1_0 { // Renamed from ReplyHeader 119168404Spjd IOP::ServiceContextList service_context; 120168404Spjd unsigned long request_id; 121168404Spjd ReplyStatusType_1_0 reply_status; 122168404Spjd }; 123168404Spjd 124168404Spjd // GIOP 1.1 125168404Spjd // Same Header contents for 1.0 and 1.1 126168404Spjd typedef ReplyHeader_1_0 ReplyHeader_1_1; 127168404Spjd 128168404Spjd #else 129168404Spjd 130168404Spjd // GIOP 1.2 131219089Spjd enum ReplyStatusType_1_2 { 132168404Spjd NO_EXCEPTION, 133168404Spjd USER_EXCEPTION, 134219089Spjd SYSTEM_EXCEPTION, 135168404Spjd LOCATION_FORWARD, 136219089Spjd LOCATION_FORWARD_PERM,// new value for 1.2 137168404Spjd NEEDS_ADDRESSING_MODE // new value for 1.2 138168404Spjd }; 139168404Spjd 140168404Spjd struct ReplyHeader_1_2 { 141168404Spjd unsigned long request_id; 142168404Spjd ReplyStatusType_1_2 reply_status; 143168404Spjd IOP::ServiceContextList service_context; 144168404Spjd }; 145168404Spjd 146168404Spjd #endif // GIOP_1_2 147168404Spjd 148168404Spjd 149168404Spjd struct SystemExceptionReplyBody { 150168404Spjd string exception_id; 151168404Spjd unsigned long minor_code_value; 152168404Spjd unsigned long completion_status; 153168404Spjd }; 154168404Spjd 155168404Spjd 156185029Spjd 157168404Spjd struct CancelRequestHeader { 158168404Spjd unsigned long request_id; 159168404Spjd }; 160265740Sdelphij 161168404Spjd 162168404Spjd 163168404Spjd // GIOP 1.0 164168404Spjd struct LocateRequestHeader_1_0 { // Renamed LocationRequestHeader 165168404Spjd unsigned long request_id; 166168404Spjd sequence <octet> object_key; 167168404Spjd }; 168168404Spjd 169168404Spjd // GIOP 1.1 170168404Spjd // Same Header contents for 1.0 and 1.1 171185029Spjd typedef LocateRequestHeader_1_0 LocateRequestHeader_1_1; 172185029Spjd 173168404Spjd // GIOP 1.2 174168404Spjd struct LocateRequestHeader_1_2 { 175168404Spjd unsigned long request_id; 176168404Spjd TargetAddress target; 177168404Spjd }; 178168404Spjd 179168404Spjd 180168404Spjd #ifndef GIOP_1_2 // We're supporting all versions 181168404Spjd 182168404Spjd // GIOP 1.0 and 1.1 183168404Spjd enum LocateStatusType_1_0 { // Renamed from LocateStatusType 184168404Spjd UNKNOWN_OBJECT, 185168404Spjd OBJECT_HERE, 186168404Spjd OBJECT_FORWARD 187168404Spjd }; 188168404Spjd 189168404Spjd 190168404Spjd // GIOP 1.0 191168404Spjd struct LocateReplyHeader_1_0 { // Renamed from LocateReplyHeader 192168404Spjd unsigned long request_id; 193168404Spjd LocateStatusType_1_0 locate_status; 194168404Spjd }; 195168404Spjd 196168404Spjd // GIOP 1.1 197168404Spjd // same Header contents for 1.0 and 1.1 198168404Spjd typedef LocateReplyHeader_1_0 LocateReplyHeader_1_1; 199168404Spjd 200168404Spjd #else 201168404Spjd 202168404Spjd // GIOP 1.2 203168404Spjd enum LocateStatusType_1_2 { 204168404Spjd UNKNOWN_OBJECT, 205168404Spjd OBJECT_HERE, 206168404Spjd OBJECT_FORWARD, 207168404Spjd OBJECT_FORWARD_PERM, // new value for GIOP 1.2 208168404Spjd LOC_SYSTEM_EXCEPTION, // new value for GIOP 1.2 209168404Spjd LOC_NEEDS_ADDRESSING_MODE // new value for GIOP 1.2 210168404Spjd }; 211168404Spjd 212168404Spjd struct LocateReplyHeader_1_2 { 213168404Spjd unsigned long request_id; 214168404Spjd LocateStatusType_1_2 locate_status; 215168404Spjd }; 216168404Spjd 217168404Spjd #endif // GIOP_1_2 218168404Spjd 219219089Spjd 220168404Spjd // GIOP 1.2 221168404Spjd struct FragmentHeader_1_2 { 222168404Spjd unsigned long request_id; 223168404Spjd }; 224247187Smm}; 225168404Spjd