| 1 | // File: GIOP.idl
|
|---|
| 2 | // From CORBA 3.0: Chapter 15, General Inter-ORB Protocol
|
|---|
| 3 |
|
|---|
| 4 | // To compiler this for
|
|---|
| 5 |
|
|---|
| 6 | #ifndef _GIOP_IDL_
|
|---|
| 7 | #define _GIOP_IDL_
|
|---|
| 8 |
|
|---|
| 9 | #ifdef _PRE_3_0_COMPILER_
|
|---|
| 10 | #include <IOP.idl>
|
|---|
| 11 |
|
|---|
| 12 | #pragma prefix "omg.org"
|
|---|
| 13 | #else
|
|---|
| 14 | import ::IOP;
|
|---|
| 15 | #endif // _PRE_3_0_COMPILER_
|
|---|
| 16 |
|
|---|
| 17 | module GIOP { // IDL extended for version 1.1 and 1.2
|
|---|
| 18 |
|
|---|
| 19 | #ifndef _PRE_3_0_COMPILER_
|
|---|
| 20 | typeprefix GIOP "omg.org";
|
|---|
| 21 | #endif // _PRE_3_0_COMPILER_
|
|---|
| 22 |
|
|---|
| 23 | struct Version {
|
|---|
| 24 | octet major;
|
|---|
| 25 | octet minor;
|
|---|
| 26 | };
|
|---|
| 27 |
|
|---|
| 28 | // Note: Principal is not used in V1.2 and beyond. However, it must
|
|---|
| 29 | // be available for V1.0 and V1.1
|
|---|
| 30 | typedef sequence<octet> Principal;
|
|---|
| 31 |
|
|---|
| 32 | // GIOP 1.1
|
|---|
| 33 | enum MsgType_1_1 {
|
|---|
| 34 | Request, Reply, CancelRequest,
|
|---|
| 35 | LocateRequest, LocateReply,
|
|---|
| 36 | CloseConnection, MessageError,
|
|---|
| 37 | Fragment // GIOP 1.1 addition
|
|---|
| 38 | };
|
|---|
| 39 |
|
|---|
| 40 | typedef GIOP::MsgType_1_1 MsgType_1_2;
|
|---|
| 41 | typedef GIOP::MsgType_1_1 MsgType_1_3;
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 | // GIOP 1.0
|
|---|
| 45 | struct MessageHeader_1_0 {// Renamed from MessageHeader
|
|---|
| 46 | char magic [4];
|
|---|
| 47 | Version GIOP_version;
|
|---|
| 48 | boolean byte_order;
|
|---|
| 49 | octet message_type;
|
|---|
| 50 | unsigned long message_size;
|
|---|
| 51 | };
|
|---|
| 52 |
|
|---|
| 53 | // GIOP 1.1
|
|---|
| 54 | struct MessageHeader_1_1 {
|
|---|
| 55 | char magic [4];
|
|---|
| 56 | Version GIOP_version;
|
|---|
| 57 | octet flags; // GIOP 1.1 change
|
|---|
| 58 | octet message_type;
|
|---|
| 59 | unsigned long message_size;
|
|---|
| 60 | };
|
|---|
| 61 |
|
|---|
| 62 | // GIOP 1.2
|
|---|
| 63 | typedef MessageHeader_1_1 MessageHeader_1_2;
|
|---|
| 64 |
|
|---|
| 65 | // GIOP 1.3
|
|---|
| 66 | typedef MessageHeader_1_1 MessageHeader_1_3;
|
|---|
| 67 |
|
|---|
| 68 | // GIOP 1.0
|
|---|
| 69 | struct RequestHeader_1_0 {
|
|---|
| 70 | IOP::ServiceContextList service_context;
|
|---|
| 71 | unsigned long request_id;
|
|---|
| 72 | boolean response_expected;
|
|---|
| 73 | sequence <octet> object_key;
|
|---|
| 74 | string operation;
|
|---|
| 75 | Principal requesting_principal;
|
|---|
| 76 | };
|
|---|
| 77 |
|
|---|
| 78 | // GIOP 1.1
|
|---|
| 79 | struct RequestHeader_1_1 {
|
|---|
| 80 | IOP::ServiceContextList service_context;
|
|---|
| 81 | unsigned long request_id;
|
|---|
| 82 | boolean response_expected;
|
|---|
| 83 | octet reserved[3]; // Added in GIOP 1.1
|
|---|
| 84 | sequence <octet> object_key;
|
|---|
| 85 | string operation;
|
|---|
| 86 | Principal requesting_principal;
|
|---|
| 87 | };
|
|---|
| 88 |
|
|---|
| 89 | // GIOP 1.2
|
|---|
| 90 | typedef short AddressingDisposition;
|
|---|
| 91 | const short KeyAddr = 0;
|
|---|
| 92 | const short ProfileAddr = 1;
|
|---|
| 93 | const short ReferenceAddr = 2;
|
|---|
| 94 | struct IORAddressingInfo {
|
|---|
| 95 | unsigned long selected_profile_index;
|
|---|
| 96 | IOP::IOR ior;
|
|---|
| 97 | };
|
|---|
| 98 | union TargetAddress switch (AddressingDisposition) {
|
|---|
| 99 | case KeyAddr: sequence <octet> object_key;
|
|---|
| 100 | case ProfileAddr: IOP::TaggedProfile profile;
|
|---|
| 101 | case ReferenceAddr: IORAddressingInfo ior;
|
|---|
| 102 | };
|
|---|
| 103 | struct RequestHeader_1_2 {
|
|---|
| 104 | unsigned long request_id;
|
|---|
| 105 | octet response_flags;
|
|---|
| 106 | octet reserved[3];
|
|---|
| 107 | TargetAddress target;
|
|---|
| 108 | string operation;
|
|---|
| 109 | // Principal not in GIOP 1.2
|
|---|
| 110 | IOP::ServiceContextList service_context; // 1.2 change
|
|---|
| 111 | };
|
|---|
| 112 |
|
|---|
| 113 | // GIOP 1.3
|
|---|
| 114 | typedef RequestHeader_1_2 RequestHeader_1_3;
|
|---|
| 115 |
|
|---|
| 116 | #ifndef GIOP_1_2
|
|---|
| 117 | // GIOP 1.0 and 1.1
|
|---|
| 118 | enum ReplyStatusType_1_0 {// Renamed from ReplyStatusType
|
|---|
| 119 | NO_EXCEPTION,
|
|---|
| 120 | USER_EXCEPTION,
|
|---|
| 121 | SYSTEM_EXCEPTION,
|
|---|
| 122 | LOCATION_FORWARD
|
|---|
| 123 | };
|
|---|
| 124 |
|
|---|
| 125 | // GIOP 1.0
|
|---|
| 126 | struct ReplyHeader_1_0 {// Renamed from ReplyHeader
|
|---|
| 127 | IOP::ServiceContextList service_context;
|
|---|
| 128 | unsigned long request_id;
|
|---|
| 129 | ReplyStatusType_1_0 reply_status;
|
|---|
| 130 | };
|
|---|
| 131 |
|
|---|
| 132 | // GIOP 1.1
|
|---|
| 133 | typedef ReplyHeader_1_0 ReplyHeader_1_1;
|
|---|
| 134 | // Same Header contents for 1.0 and 1.1
|
|---|
| 135 | #else
|
|---|
| 136 | // GIOP 1.2
|
|---|
| 137 | enum ReplyStatusType_1_2 {
|
|---|
| 138 | NO_EXCEPTION,
|
|---|
| 139 | USER_EXCEPTION,
|
|---|
| 140 | SYSTEM_EXCEPTION,
|
|---|
| 141 | LOCATION_FORWARD,
|
|---|
| 142 | LOCATION_FORWARD_PERM, // new value for 1.2
|
|---|
| 143 | NEEDS_ADDRESSING_MODE // new value for 1.2
|
|---|
| 144 | };
|
|---|
| 145 |
|
|---|
| 146 | struct ReplyHeader_1_2 {
|
|---|
| 147 | unsigned long request_id;
|
|---|
| 148 | ReplyStatusType_1_2 reply_status;
|
|---|
| 149 | IOP::ServiceContextList service_context; // 1.2 change
|
|---|
| 150 | };
|
|---|
| 151 |
|
|---|
| 152 | // GIOP 1.3
|
|---|
| 153 | typedef ReplyHeader_1_2 ReplyHeader_1_3;
|
|---|
| 154 | #endif // GIOP_1_2
|
|---|
| 155 |
|
|---|
| 156 | struct SystemExceptionReplyBody {
|
|---|
| 157 | string exception_id;
|
|---|
| 158 | unsigned long minor_code_value;
|
|---|
| 159 | unsigned long completion_status;
|
|---|
| 160 | };
|
|---|
| 161 |
|
|---|
| 162 | struct CancelRequestHeader {
|
|---|
| 163 | unsigned long request_id;
|
|---|
| 164 | };
|
|---|
| 165 |
|
|---|
| 166 | // GIOP 1.0
|
|---|
| 167 | struct LocateRequestHeader_1_0 {// Renamed LocationRequestHeader
|
|---|
| 168 | unsigned long request_id;
|
|---|
| 169 | sequence <octet> object_key;
|
|---|
| 170 | };
|
|---|
| 171 |
|
|---|
| 172 | // GIOP 1.1
|
|---|
| 173 | typedef LocateRequestHeader_1_0 LocateRequestHeader_1_1;
|
|---|
| 174 | // Same Header contents for 1.0 and 1.1
|
|---|
| 175 |
|
|---|
| 176 | // GIOP 1.2
|
|---|
| 177 | struct LocateRequestHeader_1_2 {
|
|---|
| 178 | unsigned long request_id;
|
|---|
| 179 | TargetAddress target;
|
|---|
| 180 | };
|
|---|
| 181 |
|
|---|
| 182 | // GIOP 1.3
|
|---|
| 183 | typedef LocateRequestHeader_1_2 LocateRequestHeader_1_3;
|
|---|
| 184 |
|
|---|
| 185 | #ifndef GIOP_1_2
|
|---|
| 186 | // GIOP 1.0 and 1.1
|
|---|
| 187 | enum LocateStatusType_1_0 {// Renamed from LocateStatusType
|
|---|
| 188 | UNKNOWN_OBJECT,
|
|---|
| 189 | OBJECT_HERE,
|
|---|
| 190 | OBJECT_FORWARD
|
|---|
| 191 | };
|
|---|
| 192 |
|
|---|
| 193 | // GIOP 1.0
|
|---|
| 194 | struct LocateReplyHeader_1_0 {// Renamed from LocateReplyHeader
|
|---|
| 195 | unsigned long request_id;
|
|---|
| 196 | LocateStatusType_1_0 locate_status;
|
|---|
| 197 | };
|
|---|
| 198 |
|
|---|
| 199 | // GIOP 1.1
|
|---|
| 200 | typedef LocateReplyHeader_1_0 LocateReplyHeader_1_1;
|
|---|
| 201 | // same Header contents for 1.0 and 1.1
|
|---|
| 202 |
|
|---|
| 203 | #else
|
|---|
| 204 | // GIOP 1.2
|
|---|
| 205 | enum LocateStatusType_1_2 {
|
|---|
| 206 | UNKNOWN_OBJECT,
|
|---|
| 207 | OBJECT_HERE,
|
|---|
| 208 | OBJECT_FORWARD,
|
|---|
| 209 | OBJECT_FORWARD_PERM, // new value for GIOP 1.2
|
|---|
| 210 | LOC_SYSTEM_EXCEPTION, // new value for GIOP 1.2
|
|---|
| 211 | LOC_NEEDS_ADDRESSING_MODE // new value for GIOP 1.2
|
|---|
| 212 | };
|
|---|
| 213 | struct LocateReplyHeader_1_2 {
|
|---|
| 214 | unsigned long request_id;
|
|---|
| 215 | LocateStatusType_1_2 locate_status;
|
|---|
| 216 | };
|
|---|
| 217 |
|
|---|
| 218 | // GIOP 1.3
|
|---|
| 219 | typedef LocateReplyHeader_1_2 LocateReplyHeader_1_3;
|
|---|
| 220 | #endif // GIOP_1_2
|
|---|
| 221 |
|
|---|
| 222 | // GIOP 1.2
|
|---|
| 223 | struct FragmentHeader_1_2 {
|
|---|
| 224 | unsigned long request_id;
|
|---|
| 225 | };
|
|---|
| 226 |
|
|---|
| 227 | // GIOP 1.3
|
|---|
| 228 | typedef FragmentHeader_1_2 FragmentHeader_1_3;
|
|---|
| 229 |
|
|---|
| 230 | };
|
|---|
| 231 | #endif // _GIOP_IDL_
|
|---|