GIOP.idl revision 608:7e06bf1dcb09
1/* 2 * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26#include "IOP.idl" 27 28module GIOP { // IDL extended for version 1.1 and 1.2 29 30 struct Version { 31 octet major; 32 octet minor; 33 }; 34 35 36 // GIOP 1.0 37 38 struct MessageHeader_1_0 { // Renamed from MessageHeader 39 char magic [4]; 40 Version GIOP_version; 41 boolean byte_order; 42 octet message_type; 43 unsigned long message_size; 44 }; 45 46 // GIOP 1.1 47 48 struct MessageHeader_1_1 { 49 char magic [4]; 50 Version GIOP_version; 51 octet flags; // GIOP 1.1 change 52 octet message_type; 53 unsigned long message_size; 54 }; 55 56 // GIOP 1.2 57 // Same Header contents for 1.1 and 1.2 58 typedef MessageHeader_1_1 MessageHeader_1_2; 59 60 61 // GIOP 1.0 62 struct RequestHeader_1_0 { // Renamed from RequestHeader 63 IOP::ServiceContextList service_context; 64 unsigned long request_id; 65 boolean response_expected; 66 sequence<octet> object_key; 67 string operation; 68 sequence<octet> requesting_principal; 69 }; 70 71 // GIOP 1.1 72 struct RequestHeader_1_1 { 73 IOP::ServiceContextList service_context; 74 unsigned long request_id; 75 boolean response_expected; 76 octet reserved[3]; // Added in GIOP 1.1 77 sequence <octet> object_key; 78 string operation; 79 sequence<octet> requesting_principal; 80 }; 81 82 // GIOP 1.2 83 typedef short AddressingDisposition; 84 const short KeyAddr = 0; 85 const short ProfileAddr = 1; 86 const short ReferenceAddr = 2; 87 struct IORAddressingInfo { 88 unsigned long selected_profile_index; 89 IOP::IOR ior; 90 }; 91 union TargetAddress switch (AddressingDisposition) { 92 case KeyAddr: sequence <octet> object_key; 93 case ProfileAddr: IOP::TaggedProfile profile; 94 case ReferenceAddr: IORAddressingInfo ior; 95 }; 96 struct RequestHeader_1_2 { 97 unsigned long request_id; 98 octet response_flags; 99 octet reserved[3]; 100 TargetAddress target; 101 string operation; 102 IOP::ServiceContextList service_context; 103 // Principal not in GIOP 1.2 104 }; 105 106 107 #ifndef GIOP_1_2 //We're supporting all versions 108 109 // GIOP 1.0 and 1.1 110 enum ReplyStatusType_1_0 { // Renamed from ReplyStatusType 111 NO_EXCEPTION, 112 USER_EXCEPTION, 113 SYSTEM_EXCEPTION, 114 LOCATION_FORWARD 115 }; 116 117 // GIOP 1.0 118 struct ReplyHeader_1_0 { // Renamed from ReplyHeader 119 IOP::ServiceContextList service_context; 120 unsigned long request_id; 121 ReplyStatusType_1_0 reply_status; 122 }; 123 124 // GIOP 1.1 125 // Same Header contents for 1.0 and 1.1 126 typedef ReplyHeader_1_0 ReplyHeader_1_1; 127 128 #else 129 130 // GIOP 1.2 131 enum ReplyStatusType_1_2 { 132 NO_EXCEPTION, 133 USER_EXCEPTION, 134 SYSTEM_EXCEPTION, 135 LOCATION_FORWARD, 136 LOCATION_FORWARD_PERM,// new value for 1.2 137 NEEDS_ADDRESSING_MODE // new value for 1.2 138 }; 139 140 struct ReplyHeader_1_2 { 141 unsigned long request_id; 142 ReplyStatusType_1_2 reply_status; 143 IOP::ServiceContextList service_context; 144 }; 145 146 #endif // GIOP_1_2 147 148 149 struct SystemExceptionReplyBody { 150 string exception_id; 151 unsigned long minor_code_value; 152 unsigned long completion_status; 153 }; 154 155 156 157 struct CancelRequestHeader { 158 unsigned long request_id; 159 }; 160 161 162 163 // GIOP 1.0 164 struct LocateRequestHeader_1_0 { // Renamed LocationRequestHeader 165 unsigned long request_id; 166 sequence <octet> object_key; 167 }; 168 169 // GIOP 1.1 170 // Same Header contents for 1.0 and 1.1 171 typedef LocateRequestHeader_1_0 LocateRequestHeader_1_1; 172 173 // GIOP 1.2 174 struct LocateRequestHeader_1_2 { 175 unsigned long request_id; 176 TargetAddress target; 177 }; 178 179 180 #ifndef GIOP_1_2 // We're supporting all versions 181 182 // GIOP 1.0 and 1.1 183 enum LocateStatusType_1_0 { // Renamed from LocateStatusType 184 UNKNOWN_OBJECT, 185 OBJECT_HERE, 186 OBJECT_FORWARD 187 }; 188 189 190 // GIOP 1.0 191 struct LocateReplyHeader_1_0 { // Renamed from LocateReplyHeader 192 unsigned long request_id; 193 LocateStatusType_1_0 locate_status; 194 }; 195 196 // GIOP 1.1 197 // same Header contents for 1.0 and 1.1 198 typedef LocateReplyHeader_1_0 LocateReplyHeader_1_1; 199 200 #else 201 202 // GIOP 1.2 203 enum LocateStatusType_1_2 { 204 UNKNOWN_OBJECT, 205 OBJECT_HERE, 206 OBJECT_FORWARD, 207 OBJECT_FORWARD_PERM, // new value for GIOP 1.2 208 LOC_SYSTEM_EXCEPTION, // new value for GIOP 1.2 209 LOC_NEEDS_ADDRESSING_MODE // new value for GIOP 1.2 210 }; 211 212 struct LocateReplyHeader_1_2 { 213 unsigned long request_id; 214 LocateStatusType_1_2 locate_status; 215 }; 216 217 #endif // GIOP_1_2 218 219 220 // GIOP 1.2 221 struct FragmentHeader_1_2 { 222 unsigned long request_id; 223 }; 224}; 225