[jboss-cvs] JBossAS SVN: r65452 - trunk/iiop/src/idl.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Sep 18 12:37:17 EDT 2007


Author: pgier
Date: 2007-09-18 12:37:16 -0400 (Tue, 18 Sep 2007)
New Revision: 65452

Added:
   trunk/iiop/src/idl/CSI.idl
   trunk/iiop/src/idl/CosTransactions.idl
   trunk/iiop/src/idl/orb.idl
Log:
Adding idl files required by the maven idl compiler plugin.

Added: trunk/iiop/src/idl/CSI.idl
===================================================================
--- trunk/iiop/src/idl/CSI.idl	                        (rev 0)
+++ trunk/iiop/src/idl/CSI.idl	2007-09-18 16:37:16 UTC (rev 65452)
@@ -0,0 +1,202 @@
+#ifndef _CSI_IDL_
+#define _CSI_IDL_
+
+#pragma prefix "omg.org"
+
+module CSI {
+
+    // The OMG VMCID; same value as CORBA::OMGVMCID. Do not change ever.
+
+    const unsigned long OMGVMCID = 0x4F4D0;
+
+    // An X509CertificateChain contains an ASN.1 BER encoded SEQUENCE 
+    // [1..MAX] OF X.509 certificates encapsulated in a sequence of octets. The
+    // subject's certificate shall come first in the list. Each following 
+    // certificate shall directly certify the one preceding it. The ASN.1
+    // representation of Certificate is as defined in [IETF RFC 2459].
+
+    typedef sequence <octet> X509CertificateChain; 
+
+    // an X.501 type name or Distinguished Name encapsulated in a sequence of
+    // octets containing the ASN.1 encoding.
+
+    typedef sequence <octet> X501DistinguishedName;
+
+    // UTF-8 Encoding of String
+
+    typedef sequence <octet> UTF8String;
+
+    // ASN.1 Encoding of an OBJECT IDENTIFIER
+
+    typedef sequence <octet> OID;
+
+    typedef sequence <OID> OIDList;
+
+    // A sequence of octets containing a GSStoken. Initial context tokens are
+    // ASN.1 encoded as defined in [IETF RFC 2743] Section 3.1, 
+    // "Mechanism-Independent token Format", pp. 81-82. Initial context tokens
+    // contain an ASN.1 tag followed by a token length, a mechanism identifier,
+    // and a mechanism-specific token (i.e. a GSSUP::InitialContextToken). The
+    // encoding of all other GSS tokens (e.g. error tokens and final context
+    // tokens) is mechanism dependent.
+
+    typedef sequence <octet> GSSToken;
+
+    // An encoding of a GSS Mechanism-Independent Exported Name Object as
+    // defined in [IETF RFC 2743] Section 3.2, "GSS Mechanism-Independent
+    // Exported Name Object Format," p. 84.
+
+    typedef sequence <octet> GSS_NT_ExportedName;
+
+    typedef sequence <GSS_NT_ExportedName> GSS_NT_ExportedNameList;
+
+    // The MsgType enumeration defines the complete set of service context
+    // message types used by the CSI context management protocols, including
+    // those message types pertaining only to the stateful application of the 
+    // protocols (to insure proper alignment of the identifiers between
+    // stateless and stateful implementations). Specifically, the 
+    // MTMessageInContext is not sent by stateless clients (although it may
+    // be received by stateless targets).
+
+    typedef short MsgType;
+      
+    const MsgType MTEstablishContext = 0;
+    const MsgType MTCompleteEstablishContext = 1;      
+    const MsgType MTContextError = 4; 
+    const MsgType MTMessageInContext = 5;
+
+    // The ContextId type is used carry session identifiers. A stateless 
+    // application of the service context protocol is indicated by a session
+    // identifier value of 0.
+
+    typedef unsigned long long ContextId;
+
+    // The AuthorizationElementType defines the contents and encoding of
+    // the_element field of the AuthorizationElement.
+
+    // The high order 20-bits of each AuthorizationElementType constant
+    // shall contain the Vendor Minor Codeset ID (VMCID) of the
+    // organization that defined the element type. The low order 12 bits
+    // shall contain the organization-scoped element type identifier. The
+    // high-order 20 bits of all element types defined by the OMG shall
+    // contain the VMCID allocated to the OMG (that is, 0x4F4D0).
+      
+    typedef unsigned long AuthorizationElementType;
+
+    // An AuthorizationElementType of X509AttributeCertChain indicates that 
+    // the_element field of the AuthorizationElement contains an ASN.1 BER
+    // SEQUENCE composed of an (X.509) AttributeCertificate followed by a
+    // SEQUENCE OF (X.509) Certificate. The two-part SEQUENCE is encapsulated
+    // in an octet stream. The chain of identity certificates is provided
+    // to certify the attribute certificate. Each certificate in the chain 
+    // shall directly certify the one preceding it. The first certificate
+    // in the chain shall certify the attribute certificate. The ASN.1
+    // representation of (X.509) Certificate is as defined in [IETF RFC 2459].
+    // The ASN.1 representation of (X.509) AtributeCertificate is as defined
+    // in [IETF ID PKIXAC].  
+
+    const AuthorizationElementType X509AttributeCertChain = OMGVMCID | 1;
+
+    typedef sequence <octet> AuthorizationElementContents;
+
+    // The AuthorizationElement contains one element of an authorization token.
+    // Each element of an authorization token is logically a PAC.
+
+    struct AuthorizationElement {
+	AuthorizationElementType   the_type;
+	AuthorizationElementContents   the_element;
+    };
+
+    // The AuthorizationToken is made up of a sequence of 
+    // AuthorizationElements
+
+    typedef sequence <AuthorizationElement> AuthorizationToken;
+      
+    typedef unsigned long IdentityTokenType;
+
+    // Additional standard identity token types shall only be defined by the
+    // OMG. All IdentityTokenType constants shall be a power of 2.
+
+    const IdentityTokenType ITTAbsent = 0;      
+    const IdentityTokenType ITTAnonymous = 1;
+    const IdentityTokenType ITTPrincipalName = 2;
+    const IdentityTokenType ITTX509CertChain = 4;
+    const IdentityTokenType ITTDistinguishedName = 8;
+
+    typedef sequence <octet> IdentityExtension;
+      
+    union IdentityToken switch ( IdentityTokenType ) {
+	case ITTAbsent: boolean absent;
+	case ITTAnonymous: boolean anonymous;
+        case ITTPrincipalName: GSS_NT_ExportedName principal_name;
+	case ITTX509CertChain: X509CertificateChain certificate_chain;
+	case ITTDistinguishedName: X501DistinguishedName dn;
+	default: IdentityExtension id;
+    };
+
+    struct EstablishContext {
+	ContextId client_context_id;
+	AuthorizationToken authorization_token;
+	IdentityToken identity_token;
+	GSSToken client_authentication_token;
+    };
+      
+    struct CompleteEstablishContext {
+	ContextId client_context_id;
+	boolean context_stateful;
+	GSSToken final_context_token;
+    };
+
+    struct ContextError {
+	ContextId client_context_id;
+	long major_status;
+	long minor_status;
+	GSSToken error_token;
+    };
+
+    // Not sent by stateless clients. If received by a stateless server, a
+    // ContextError message should be returned, indicating the session does
+    // not exist.
+      
+    struct MessageInContext {
+	ContextId client_context_id;
+	boolean discard_context;
+    };
+      
+    union SASContextBody switch ( MsgType ) {
+	case MTEstablishContext: EstablishContext establish_msg;
+	case MTCompleteEstablishContext: CompleteEstablishContext complete_msg;
+	case MTContextError: ContextError error_msg;
+	case MTMessageInContext: MessageInContext in_context_msg;
+    };
+
+    // The following type represents the string representation of an ASN.1
+    // OBJECT IDENTIFIER (OID). OIDs are represented by the string "oid:"
+    // followed by the integer base 10 representation of the OID separated
+    // by dots. For example, the OID corresponding to the OMG is represented
+    // as: "oid:2.23.130"     
+
+    typedef string StringOID;
+
+    // The GSS Object Identifier for the KRB5 mechanism is:
+    // { iso(1) member-body(2) United States(840) mit(113554) infosys(1)
+    // gssapi(2) krb5(2) }
+
+    const StringOID KRB5MechOID = "oid:1.2.840.113554.1.2.2";
+
+    // The GSS Object Identifier for name objects of the Mechanism-idependent
+    // Exported Name Object type is:
+    // { iso(1) org(3) dod(6) internet(1) security(5) nametypes(6)
+    // gss-api-exported-name(4) }
+
+    const StringOID GSS_NT_Export_Name_OID = "oid:1.3.6.1.5.6.4";
+
+    // The GSS Object Identifier for the scoped-username name form is:
+    // { iso-itu-t (2) international-organization (23) omg (130) security (1)
+    // naming (2) scoped-username(1) }
+
+    const StringOID GSS_NT_Scoped_Username_OID = "oid:2.23.130.1.2.1";
+
+}; // CSI
+
+#endif

Added: trunk/iiop/src/idl/CosTransactions.idl
===================================================================
--- trunk/iiop/src/idl/CosTransactions.idl	                        (rev 0)
+++ trunk/iiop/src/idl/CosTransactions.idl	2007-09-18 16:37:16 UTC (rev 65452)
@@ -0,0 +1,206 @@
+//File: CosTransactions.idl
+//Part of the Transaction Service
+
+#ifndef _COS_TRANSACTIONS_IDL_
+#define _COS_TRANSACTIONS_IDL_
+
+#include <orb.idl>
+
+#pragma prefix "omg.org"
+
+module CosTransactions {
+
+	// Forward references for interfaces defined later in module
+	interface Current;
+	interface TransactionFactory;
+	interface Control;
+	interface Terminator;
+	interface Coordinator;
+	interface RecoveryCoordinator;
+	interface Resource;
+	interface Synchronization;
+	interface SubtransactionAwareResource;
+	interface TransactionalObject;
+
+	// DATATYPES
+	enum Status {
+		StatusActive,
+		StatusMarkedRollback,
+		StatusPrepared,
+		StatusCommitted,
+		StatusRolledBack,
+		StatusUnknown,
+		StatusNoTransaction,
+		StatusPreparing,
+		StatusCommitting,
+		StatusRollingBack
+	};
+
+	enum Vote {
+		VoteCommit,
+		VoteRollback,
+		VoteReadOnly
+	};
+
+	// Structure definitions
+	struct otid_t {
+		long formatID; /*format identifier. 0 is OSI TP */
+		long bqual_length;
+		sequence <octet> tid;
+	};
+	struct TransIdentity {
+		Coordinator coord;
+		Terminator term;
+		otid_t otid;
+	};
+	struct PropagationContext {
+		unsigned long timeout;
+		TransIdentity current;
+		sequence <TransIdentity> parents;
+		any implementation_specific_data;
+	};
+
+	// Heuristic exceptions
+	exception HeuristicRollback {};
+	exception HeuristicCommit {};
+	exception HeuristicMixed {};
+	exception HeuristicHazard {};
+
+	// Other transaction-specific exceptions
+	exception SubtransactionsUnavailable {};
+	exception NotSubtransaction {};
+	exception Inactive {};
+	exception NotPrepared {};
+	exception NoTransaction {};
+	exception InvalidControl {};
+	exception Unavailable {};
+	exception SynchronizationUnavailable {};
+
+	// Current transaction
+	interface Current : CORBA::Current {
+		void begin()
+			raises(SubtransactionsUnavailable);
+		void commit(in boolean report_heuristics)
+			raises(
+				NoTransaction,
+				HeuristicMixed,
+				HeuristicHazard
+			);
+		void rollback()
+			raises(NoTransaction);
+		void rollback_only()
+			raises(NoTransaction);
+
+		Status get_status();
+		string get_transaction_name();
+		void set_timeout(in unsigned long seconds);
+		Control get_control();
+		Control suspend();
+		void resume(in Control which)
+			raises(InvalidControl);
+	};
+
+
+	interface TransactionFactory {
+		Control create(in unsigned long time_out);
+		Control recreate(in PropagationContext ctx);
+	};
+
+	interface Control {
+		Terminator get_terminator()
+			raises(Unavailable);
+		Coordinator get_coordinator()
+			raises(Unavailable);
+	};
+
+	interface Terminator {
+		void commit(in boolean report_heuristics)
+			raises(
+				HeuristicMixed,
+				HeuristicHazard
+			);
+		void rollback();
+	};
+
+	interface Coordinator {
+
+		Status get_status();
+		Status get_parent_status();
+		Status get_top_level_status();
+
+		boolean is_same_transaction(in Coordinator tc);
+		boolean is_related_transaction(in Coordinator tc);
+		boolean is_ancestor_transaction(in Coordinator tc);
+		boolean is_descendant_transaction(in Coordinator tc);
+		boolean is_top_level_transaction();
+
+		unsigned long hash_transaction();
+		unsigned long hash_top_level_tran();
+
+		RecoveryCoordinator register_resource(in Resource r)
+			raises(Inactive);
+
+		void register_synchronization (in Synchronization sync)
+			raises(Inactive, SynchronizationUnavailable);
+
+		void register_subtran_aware(in SubtransactionAwareResource r)
+			raises(Inactive, NotSubtransaction);
+
+		void rollback_only()
+			raises(Inactive);
+
+		string get_transaction_name();
+		Control create_subtransaction()
+			raises(SubtransactionsUnavailable, Inactive);
+
+		PropagationContext get_txcontext ()
+			raises(Unavailable);
+	};
+
+	interface RecoveryCoordinator {
+		Status replay_completion(in Resource r)
+			raises(NotPrepared);
+	};
+
+	interface Resource {
+		Vote prepare()
+			raises(
+				HeuristicMixed,
+				HeuristicHazard
+			);
+		void rollback()
+			raises(
+				HeuristicCommit,
+				HeuristicMixed,
+				HeuristicHazard
+			);
+		void commit()
+			raises(
+				NotPrepared,
+				HeuristicRollback,
+				HeuristicMixed,
+				HeuristicHazard
+			);
+		void commit_one_phase()
+			raises(
+				HeuristicHazard
+			);
+		void forget();
+	};
+
+	interface TransactionalObject {
+	};
+
+	interface Synchronization : TransactionalObject {
+		void before_completion();
+		void after_completion(in CosTransactions::Status status_);
+	};
+
+	interface SubtransactionAwareResource : Resource {
+		void commit_subtransaction(in Coordinator parent);
+		void rollback_subtransaction();
+	};
+
+}; // End of CosTransactions Module
+
+#endif /* ifndef _COS_TRANSACTIONS_IDL_ */

Added: trunk/iiop/src/idl/orb.idl
===================================================================
--- trunk/iiop/src/idl/orb.idl	                        (rev 0)
+++ trunk/iiop/src/idl/orb.idl	2007-09-18 16:37:16 UTC (rev 65452)
@@ -0,0 +1,177 @@
+
+// Some definitions from the CORBA module as needed
+// by other modules. This file is for declaration
+// purposes only!!
+
+// $Id: orb.idl,v 1.1 2007/05/28 15:58:35 fnasser Exp $
+
+#ifndef _MYORB_IDL
+#define _MYORB_IDL
+
+/*
+  the following pragma is proprietary to JacORB. It ensures
+  that no code is ever generated when this file is included in
+  other files even when the -all compiler option is set
+ */
+
+#pragma inhibit_code_generation
+#pragma prefix "omg.org"
+
+
+module CORBA 
+{
+    typedef unsigned short ServiceOption;
+    typedef unsigned short ServiceDetailType;
+
+    // for PortableInterceptors
+    typedef sequence<string> StringSeq;
+    typedef sequence<wstring> WStringSeq;
+    typedef sequence<octet> OctetSeq;
+
+    typedef unsigned long PolicyType;
+	
+    // actually, Current is pseudo, but we need it this way so everything compiles
+    interface Current {}; 
+
+    pseudo interface Environment{};
+    pseudo interface NamedValue {};
+    pseudo interface NVList {};	
+
+    // not suitable for deriving user-defined interfaces !
+    enum TCKind { 
+	tk_null, tk_void, 
+	tk_short, tk_long, tk_ushort, tk_ulong, 
+	tk_float, tk_double, tk_boolean, tk_char, 
+	tk_octet, tk_any, tk_TypeCode, tk_Principal, tk_objref, 
+	tk_struct, tk_union, tk_enum, tk_string, 
+	tk_sequence, tk_array, tk_alias, tk_except, 
+	tk_longlong, tk_ulonglong, tk_longdouble,
+	tk_wchar, tk_wstring, tk_fixed, tk_value,
+	tk_value_box,
+	tk_native, tk_abstract_interface,
+        tk_local_interface // latest addition
+    };
+    
+    // not suitable for deriving user-defined interfaces
+    typedef string Identifier;
+    typedef string RepositoryId;
+
+    pseudo interface TypeCode { // PIDL
+	exception Bounds {};
+	exception BadKind {};
+	
+	// for all TypeCode kinds
+	boolean equal (in TypeCode tc);
+	TCKind kind ();
+
+	boolean equivalent(in TypeCode tc);
+	TypeCode get_compact_typecode();
+
+	// for tk_objref, tk_struct, tk_union, tk_enum, 
+	// tk_alias, and tk_except
+	RepositoryId id () raises (BadKind);
+	
+	// for tk_objref, tk_struct, tk_union, tk_enum, 
+	// tk_alias, and tk_except
+	Identifier name () raises (BadKind);
+	
+	// for tk_struct, tk_union, tk_enum, and tk_except
+	unsigned long member_count () raises (BadKind);
+	Identifier member_name (in unsigned long index) 
+	    raises (BadKind, Bounds);
+	
+	// for tk_struct, tk_union, and tk_except
+	TypeCode member_type (in unsigned long index) 
+	    raises (BadKind, Bounds);
+	
+	// for tk_union
+	any member_label (in unsigned long index) 
+	    raises (BadKind, Bounds);
+	TypeCode discriminator_type () raises (BadKind);
+	long default_index () raises (BadKind); 
+	
+	// for tk_string, tk_sequence, and tk_array
+	unsigned long length () raises (BadKind);
+	
+	// for tk_sequence, tk_array, and tk_alias
+	TypeCode content_type () raises (BadKind);
+       	
+    };
+
+
+    interface InterfaceDef     {};
+
+    /* this is the original PIDL from the lang. mapping, 
+       but we do not use it! Instead...
+
+    pseudo interface Principal
+    { 
+	attribute sequence<octet> name;
+    };
+    */
+
+    /* ... we use this little hack. It saves us fiddling with 
+       the generated code that uses  Principals. Actually, we 
+       should not be doing this....
+    */
+
+    typedef sequence<octet> Principal;
+
+    interface IDLType {};
+
+    enum OperationMode {OP_NORMAL, OP_ONEWAY};
+    enum ParameterMode {PARAM_IN, PARAM_OUT, PARAM_INOUT};
+
+    struct ParameterDescription {
+	Identifier name; 
+	TypeCode type; 
+	IDLType type_def;
+	ParameterMode mode;
+    };
+    typedef sequence <ParameterDescription> ParDescriptionSeq;
+	
+    interface Policy
+    {
+	readonly attribute PolicyType policy_type;
+	Policy copy();
+	void destroy();
+    };
+	
+    typedef sequence <Policy> PolicyList;
+
+    interface DomainManager
+    {
+	Policy get_domain_policy(in PolicyType policy_type);
+    };
+
+    interface ConstructionPolicy: Policy
+    {
+	void make_domain_manager(in InterfaceDef object_type,
+				 in boolean constr_policy);
+    };
+
+    typedef sequence <DomainManager> DomainManagersList;
+	
+
+    typedef short PolicyErrorCode;
+    const PolicyErrorCode BAD_POLICY = 0;
+    // ... to be continued
+
+    exception PolicyError
+    {
+	PolicyErrorCode reason;
+    };
+
+    exception UserException {};
+    pseudo interface ExceptionList {};
+
+
+    valuetype WStringValue {
+       public wstring value;
+    };
+
+
+};
+
+
+#endif /* _MYORB_IDL */




More information about the jboss-cvs-commits mailing list