summaryrefslogtreecommitdiff
path: root/testtools/source/bridgetest/idl
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-06-03 14:01:31 +0000
committerOliver Bolte <obo@openoffice.org>2004-06-03 14:01:31 +0000
commita26b688c10fce7ba4a1b35d93ace19455bfba8e5 (patch)
tree86879b62e88d08a9bce45adfa29ada926f59ee5c /testtools/source/bridgetest/idl
parentcb4faf22913833f50ae25c4f9eede907b2cee503 (diff)
INTEGRATION: CWS sb18 (1.1.2); FILE ADDED
2004/05/21 10:09:35 sb 1.1.2.4: #i21150# Extended multiple inheriance tests. 2004/05/19 14:31:51 sb 1.1.2.3: #i21150# Added (very fundamental) multiple inheritance tests. 2004/05/14 11:05:44 sb 1.1.2.2: #i21150# Made testing of polymorphic struct types more thorough. 2004/05/12 15:07:15 sb 1.1.2.1: #i21150# Added tests for extended interface attributes that raise exceptions and for polymorphic struct types; no longer use published com.sun.star.test.bridge UNO types, but local copies instead (which can be extended over time).
Diffstat (limited to 'testtools/source/bridgetest/idl')
-rw-r--r--testtools/source/bridgetest/idl/bridgetest.idl370
1 files changed, 370 insertions, 0 deletions
diff --git a/testtools/source/bridgetest/idl/bridgetest.idl b/testtools/source/bridgetest/idl/bridgetest.idl
new file mode 100644
index 000000000000..062039c4dee0
--- /dev/null
+++ b/testtools/source/bridgetest/idl/bridgetest.idl
@@ -0,0 +1,370 @@
+/*************************************************************************
+ *
+ * $RCSfile: bridgetest.idl,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: obo $ $Date: 2004-06-03 15:01:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "com/sun/star/lang/IllegalArgumentException.idl"
+#include "com/sun/star/uno/XInterface.idl"
+
+module test { module testtools { module bridgetest {
+
+enum TestEnum
+{
+ TEST,
+ ONE,
+ TWO,
+ CHECK,
+ LOLA,
+ PALOO,
+ ZA
+};
+
+struct TestStruct
+{
+ long member;
+};
+
+/**
+ * simple types
+ */
+struct TestSimple
+{
+ boolean Bool;
+ char Char;
+ byte Byte;
+ short Short;
+ unsigned short UShort;
+ long Long;
+ unsigned long ULong;
+ hyper Hyper;
+ unsigned hyper UHyper;
+ float Float;
+ double Double;
+ TestEnum Enum;
+};
+/**
+ * complex types adding string, inteface, any
+ */
+struct TestElement : TestSimple
+{
+ string String;
+ com::sun::star::uno::XInterface Interface;
+ any Any;
+};
+/**
+ * adding even more complexity, sequence< TestElement >
+ */
+struct TestDataElements : TestElement
+{
+ sequence< TestElement > Sequence;
+};
+
+/**
+ * typedef used in interface
+ */
+typedef TestDataElements TestData;
+
+struct TestPolyStruct<T> { T member; };
+
+interface XRecursiveCall : com::sun::star::uno::XInterface
+{
+ /***
+ * @param nToCall If nToCall is 0, the method returns immeadiatly.
+ * Otherwise, call the given interface with nToCall -1
+ *
+ ***/
+ void callRecursivly( [in] XRecursiveCall xCall , [in] long nToCall );
+};
+
+interface XA {
+ long f1();
+};
+
+interface XB {
+ long f2();
+ [attribute] long a;
+};
+
+interface XC {
+ interface XA;
+ interface XB;
+};
+
+interface XMulti: XC {
+ long f3();
+};
+
+/**
+ * Monster test interface to test bridge calls.
+ * An implementation of this object has to store given values and return whenever there
+ * is an out param or return value.
+ */
+interface XBridgeTestBase : com::sun::star::uno::XInterface
+{
+ /**
+ * in parameter test, tests by calls reference also (complex types)
+ */
+ [oneway] void setValues( [in] boolean bBool, [in] char cChar, [in] byte nByte,
+ [in] short nShort, [in] unsigned short nUShort,
+ [in] long nLong, [in] unsigned long nULong,
+ [in] hyper nHyper, [in] unsigned hyper nUHyper,
+ [in] float fFloat, [in] double fDouble,
+ [in] TestEnum eEnum, [in] string aString,
+ [in] com::sun::star::uno::XInterface xInterface, [in] any aAny,
+ [in] sequence< TestElement > aSequence,
+ [in] TestData aStruct );
+ /**
+ * inout parameter test
+ *
+ * @return aStruct. The out parameter contain the values, that were previously set
+ * by setValues or (if not called before) default constructed values.
+ *
+ */
+ TestData setValues2( [inout] boolean bBool, [inout] char cChar, [inout] byte nByte,
+ [inout] short nShort, [inout] unsigned short nUShort,
+ [inout] long nLong, [inout] unsigned long nULong,
+ [inout] hyper nHyper, [inout] unsigned hyper nUHyper,
+ [inout] float fFloat, [inout] double fDouble,
+ [inout] TestEnum eEnum, [inout] string aString,
+ [inout] com::sun::star::uno::XInterface xInterface, [inout] any aAny,
+ [inout] sequence< TestElement > aSequence,
+ [inout] TestData aStruct );
+
+ /**
+ * out parameter test
+ */
+ TestData getValues( [out] boolean bBool, [out] char cChar, [out] byte nByte,
+ [out] short nShort, [out] unsigned short nUShort,
+ [out] long nLong, [out] unsigned long nULong,
+ [out] hyper nHyper, [out] unsigned hyper nUHyper,
+ [out] float fFloat, [out] double fDouble,
+ [out] TestEnum eEnum, [out] string aString,
+ [out] com::sun::star::uno::XInterface xInterface, [out] any aAny,
+ [out] sequence< TestElement > aSequence,
+ [out] TestData aStruct );
+
+ [attribute] boolean Bool;
+ [attribute] byte Byte;
+ [attribute] char Char;
+ [attribute] short Short;
+ [attribute] unsigned short UShort;
+ [attribute] long Long;
+ [attribute] unsigned long ULong;
+ [attribute] hyper Hyper;
+ [attribute] unsigned hyper UHyper;
+ [attribute] float Float;
+ [attribute] double Double;
+ [attribute] TestEnum Enum;
+ [attribute] string String;
+ [attribute] com::sun::star::uno::XInterface Interface;
+ [attribute] any Any;
+ [attribute] sequence< TestElement > Sequence;
+ [attribute] TestData Struct;
+
+ [attribute] long RaiseAttr1 {
+ set raises (com::sun::star::lang::IllegalArgumentException);
+ };
+ [attribute, readonly] long RaiseAttr2 {
+ get raises (com::sun::star::lang::IllegalArgumentException);
+ };
+
+ TestPolyStruct<boolean> transportPolyBoolean(
+ [in] TestPolyStruct<boolean> arg);
+ void transportPolyUnsignedHyper([inout] TestPolyStruct<unsigned hyper> arg);
+ void transportPolySequence(
+ [in] TestPolyStruct<sequence<any> > arg1,
+ [out] TestPolyStruct<sequence<any> > arg2);
+
+ TestPolyStruct<long> getNullPolyLong();
+ TestPolyStruct<string> getNullPolyString();
+ TestPolyStruct<type> getNullPolyType();
+ TestPolyStruct<any> getNullPolyAny();
+ TestPolyStruct<sequence<boolean> > getNullPolySequence();
+ TestPolyStruct<TestEnum> getNullPolyEnum();
+ TestPolyStruct<TestStruct> getNullPolyStruct();
+ TestPolyStruct<XBridgeTestBase> getNullPolyInterface();
+
+ /***
+ * This method returns the parameter value.
+ * Method to extensivly test anys.
+ ****/
+ any transportAny( [in] any value );
+
+ /***
+ * methods to check sequence of calls. Call call() and callOneway
+ * in an arbitrary sequence. Increase the callId for every call.
+ * The testobject sets an error flag.
+
+ @see testSequencePassed
+ ***/
+ void call( [in] long nCallId, [in] long nWaitMUSEC );
+ [oneway] void callOneway( [in] long nCallId, [in] long nWaitMUSEC );
+ boolean sequenceOfCallTestPassed();
+
+ /****
+ * methods to check, if threads thread identity is holded.
+ *
+ ***/
+ void startRecursiveCall( [in] XRecursiveCall xCall , [in] long nToCall );
+
+ XMulti getMulti();
+ long testMultiF1([in] XMulti multi);
+ long testMultiF2([in] XMulti multi);
+ long testMultiF3([in] XMulti multi);
+ long testMultiA([in] XMulti multi, [in] long value);
+};
+
+
+/**
+ * Inherting from monster; adds raiseException(), attribute raising RuntimeException.
+ */
+interface XBridgeTest : XBridgeTestBase
+{
+ /**
+ * the exception struct returned has to be filled with given arguments.
+ * return value is for dummy.
+ */
+ TestData raiseException( [in] short ArgumentPosition,
+ [in] string Message,
+ [in] com::sun::star::uno::XInterface Context )
+ raises( com::sun::star::lang::IllegalArgumentException );
+
+
+ /**
+ * Throws runtime exception.
+ * check remote bridges handle exceptions during oneway calls properly.
+ * Note that on client side the execption may fly or not. When it flies, it should
+ * have the proper message and context.
+ ***/
+ [oneway] void raiseRuntimeExceptionOneway( [in] string Message,
+ [in] com::sun::star::uno::XInterface Context );
+
+ /**
+ * raises runtime exception;
+ * the exception struct returned has to be filled with formerly set test data.
+ */
+ [attribute] long RuntimeException;
+};
+
+/** Extended tests with sequences.
+ */
+interface XBridgeTest2 : XBridgeTest
+{
+ sequence< boolean > setSequenceBool( [in] sequence< boolean > aSeq);
+ sequence< char > setSequenceChar( [in] sequence< char > aSeq);
+ sequence< byte> setSequenceByte( [in] sequence< byte > aSeq);
+ sequence< short> setSequenceShort( [in] sequence< short > aSeq);
+ sequence< unsigned short > setSequenceUShort( [in] sequence< unsigned short > aSeq);
+ sequence< long > setSequenceLong( [in] sequence< long > aSeq);
+ sequence< unsigned long > setSequenceULong( [in] sequence< unsigned long > aSeq);
+ sequence< hyper > setSequenceHyper( [in] sequence< hyper > aSeq);
+ sequence< unsigned hyper > setSequenceUHyper( [in] sequence< unsigned hyper > aSeq);
+ sequence< float > setSequenceFloat( [in] sequence< float > aSeq);
+ sequence< double > setSequenceDouble( [in] sequence< double > aSeq);
+ sequence< TestEnum > setSequenceEnum( [in] sequence< TestEnum > aSeq);
+ sequence< string > setSequenceString( [in] sequence< string > aString);
+ sequence< com::sun::star::uno::XInterface > setSequenceXInterface(
+ [in] sequence< com::sun::star::uno::XInterface > aSeq);
+ sequence< any > setSequenceAny( [in] sequence< any > aSeq);
+ sequence< TestElement > setSequenceStruct( [in] sequence< TestElement > aSeq);
+
+ sequence< sequence< long > > setDim2( [in] sequence< sequence< long > > aSeq);
+ sequence< sequence < sequence < long > > > setDim3(
+ [in] sequence< sequence < sequence < long > > > aSeq);
+
+ void setSequencesInOut( [inout] sequence< boolean > aSeqBoolean,
+ [inout] sequence< char > aSeqChar,
+ [inout] sequence< byte > aSeqByte,
+ [inout] sequence< short > aSeqShort,
+ [inout] sequence< unsigned short> aSeqUShort,
+ [inout] sequence< long > aSeqLong,
+ [inout] sequence< unsigned long > aSeqULong,
+ [inout] sequence< hyper > aSeqHyper,
+ [inout] sequence< unsigned hyper > aSeqUHyper,
+ [inout] sequence< float > aSeqFloat,
+ [inout] sequence< double > aSeqDouble,
+ [inout] sequence< TestEnum > aSeqEnum,
+ [inout] sequence< string > aSeqString,
+ [inout] sequence< com::sun::star::uno::XInterface > aSeqXInterface,
+ [inout] sequence< any > aSeqAny,
+ [inout] sequence< sequence< long > > aSeqDim2,
+ [inout] sequence< sequence < sequence < long > > > aSeqDim3);
+
+ void setSequencesOut( [out] sequence< boolean > aSeqBoolean,
+ [out] sequence< char > aSeqChar,
+ [out] sequence< byte > aSeqByte,
+ [out] sequence< short > aSeqShort,
+ [out] sequence< unsigned short> aSeqUShort,
+ [out] sequence< long > aSeqLong,
+ [out] sequence< unsigned long > aSeqULong,
+ [out] sequence< hyper > aSeqHyper,
+ [out] sequence< unsigned hyper > aSeqUHyper,
+ [out] sequence< float > aSeqFloat,
+ [out] sequence< double > aSeqDouble,
+ [out] sequence< TestEnum > aSeqEnum,
+ [out] sequence< string > aSeqString,
+ [out] sequence< com::sun::star::uno::XInterface > aSeqXInterface,
+ [out] sequence< any > aSeqAny,
+ [out] sequence< sequence< long > > aSeqDim2,
+ [out] sequence< sequence < sequence < long > > > aSeqDim3);
+
+
+};
+
+}; }; };