// Common Object Request Broker Architecture (CORBA), v2.4.2 February 2001
// Common Object Request Broker Architecture (CORBA), v2.6 December 2001
//
// Include this file in your IDL if you need standard definition(s).

#if !defined(IOP_IDL)
#define IOP_IDL

#include "CORBA.idl"	// IOP need CORBA definitions

#pragma vbClsPrefix c
#pragma vbModPrefix m

#pragma prefix "omg.org"

module IOP
{
	typedef unsigned long ServiceId;
	struct ServiceContext
	{	ServiceId context_id;
#pragma vbClsPrefix c_
		sequence <octet> context_data;
#pragma vbClsPrefix c
	};
	typedef sequence <ServiceContext>ServiceContextList;
	
	// Standard Service Tags
	const ServiceId TransactionService= 0;
	const ServiceId CodeSets= 1;
	const ServiceId ChainBypassCheck= 2;
	const ServiceId ChainBypassInfo= 3;
	const ServiceId LogicalThreadId= 4;
	const ServiceId BI_DIR_IIOP= 5;
	const ServiceId SendingContextRunTime= 6;
	const ServiceId INVOCATION_POLICIES= 7;
	const ServiceId FORWARDED_IDENTITY= 8;
	const ServiceId UnknownExceptionInfo= 9;
	const ServiceId RTCorbaPriority= 10;
	const ServiceId RTCorbaPriorityRange =11;
	const ServiceId FT_GROUP_VERSION= 12;
	const ServiceId FT_REQUEST= 13;
	const ServiceId ExceptionDetailMessage= 14;
	const ServiceId SecurityAttributeService= 15;
};

/* ::IOP::IOR
   See CORBA v2.6   December 2001 13-17
*/
module IOP
{
	typedef unsigned long ProfileId;
	
	// Standard Profile Tags
	const ProfileId TAG_INTERNET_IOP= 0;
	const ProfileId TAG_MULTIPLE_COMPONENTS= 1;
	const ProfileId TAG_SCCP_IOP= 2;
	
	struct TaggedProfile
	{	ProfileId tag;
#pragma vbClsPrefix c_
		sequence <octet> profile_data;
#pragma vbClsPrefix c
	};
	// an Interoperable Object Reference is a sequence of
	// object-specific protocol profiles, plus a type ID.
	struct IOR
	{	string type_id;
		sequence <TaggedProfile> profiles;
	};
	// Standard way of representing multicomponent profiles.
	// This would be encapsulated in a TaggedProfile.
	typedef unsigned long ComponentId;
	struct TaggedComponent
	{	ComponentId tag;
#pragma vbClsPrefix c_
		sequence <octet> component_data;
#pragma vbClsPrefix c
	};
	typedef sequence <TaggedComponent> MultipleComponentProfile;

	// Standard Component Tags
	const ComponentId TAG_ORB_TYPE= 0;
	const ComponentId TAG_CODE_SETS= 1;
	const ComponentId TAG_POLICIES= 2;
	const ComponentId TAG_ALTERNATE_IIOP_ADDRESS= 3;
	const ComponentId TAG_COMPLETE_OBJECT_KEY= 5;
	const ComponentId TAG_ENDPOINT_ID_POSITION= 6;
	const ComponentId TAG_LOCATION_POLICY= 12;
	const ComponentId TAG_ASSOCIATION_OPTIONS= 13;
	const ComponentId TAG_SEC_NAME= 14;
	const ComponentId TAG_SPKM_1_SEC_MECH= 15;
	const ComponentId TAG_SPKM_2_SEC_MECH= 16;
	const ComponentId TAG_KerberosV5_SEC_MECH= 17;
	const ComponentId TAG_CSI_ECMA_Secret_SEC_MECH= 18;
	const ComponentId TAG_CSI_ECMA_Hybrid_SEC_MECH= 19;
	const ComponentId TAG_SSL_SEC_TRANS= 20;
	const ComponentId TAG_CSI_ECMA_Public_SEC_MECH= 21;
	const ComponentId TAG_GENERIC_SEC_MECH= 22;
	const ComponentId TAG_FIREWALL_TRANS= 23;
	const ComponentId TAG_SCCP_CONTACT_INFO= 24;
	const ComponentId TAG_JAVA_CODEBASE= 25;
	const ComponentId TAG_TRANSACTION_POLICY= 26;
	const ComponentId TAG_FT_GROUP= 27;
	const ComponentId TAG_FT_PRIMARY= 28;
	const ComponentId TAG_FT_HEARTBEAT_ENABLED= 29;
	const ComponentId TAG_MESSAGE_ROUTERS= 30;
	const ComponentId TAG_OTS_POLICY= 31;
	const ComponentId TAG_INV_POLICY= 32;
	const ComponentId TAG_CSI_SEC_MECH_LIST= 33;
	const ComponentId TAG_NULL_TAG= 34;
	const ComponentId TAG_SECIOP_SEC_TRANS= 35;
	const ComponentId TAG_TLS_SEC_TRANS= 36;
	const ComponentId TAG_DCE_STRING_BINDING= 100;
	const ComponentId TAG_DCE_BINDING_NAME= 101;
	const ComponentId TAG_DCE_NO_PIPES= 102;
	const ComponentId TAG_DCE_SEC_MECH= 103;
	const ComponentId TAG_INET_SEC_TRANS= 123;


	struct EndpointIdPositionComponent
	{	unsigned short begin;
		unsigned short end;
	};

	const octet LOCATE_NEVER= 0;
	const octet LOCATE_OBJECT= 1;
	const octet LOCATE_OPERATION= 2;
	const octet LOCATE_ALWAYS= 3;
};

module IOP
{
	local interface Codec
	{
		exception InvalidTypeForEncoding {};
		exception FormatMismatch {};
		exception TypeMismatch {};
		
		CORBA::OctetSeq encode(in any data)
			raises(InvalidTypeForEncoding);
		any decode(in CORBA::OctetSeq data)
			raises(FormatMismatch);
		
		CORBA::OctetSeq encode_value(in any data)
			raises(InvalidTypeForEncoding);
		any decode_value(in CORBA::OctetSeq data,
			in CORBA::TypeCode tc)
			raises(FormatMismatch, TypeMismatch);
	};
};

module IOP
{
	typedef short EncodingFormat;
	const EncodingFormat ENCODING_CDR_ENCAPS= 0;
	struct Encoding
	{
		EncodingFormat format;
		octet major_version;
		octet minor_version;
	};
	local interface CodecFactory
	{
		exception UnknownEncoding {};
		Codec create_codec(in Encoding enc)
			raises(UnknownEncoding);
	};
};

/** CONV_FRAME.idl???
module CONV_FRAME
{
	typedef unsigned long CodeSetId;

	// const IOP::ComponentID TAG_CODE_SETS= 1;
	typedef unsigned long CodeSetId;
	struct CodeSetComponent
	{	CodeSetId native_code_set;
		sequence<CodeSetId> conversion_code_sets;
	};
	struct CodeSetComponentInfo
	{	CodeSetComponent ForCharData;
		CodeSetComponent ForWcharData;
	};
	
	// Transmission Code Set, const IOP::ServiceID CodeSets= 1;
	struct CodeSetContext
	{	CodeSetId char_data;
		CodeSetId wchar_data;
	};
};
*/

// Map long IDL names to short Visual Basic names
//
//#pragma vbName IOP:: IOP

#endif // IOP_IDL
