1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_test_performance_XPerformanceTest_idl__ 28#define __com_sun_star_test_performance_XPerformanceTest_idl__ 29 30#ifndef __com_sun_star_uno_XInterface_idl__ 31#include <com/sun/star/uno/XInterface.idl> 32#endif 33 34module com 35{ 36module sun 37{ 38module star 39{ 40module test 41{ 42module performance 43{ 44 45/** struct of simple types to be carried 46*/ 47published struct SimpleTypes 48{ 49 boolean Bool; 50 char Char; 51 byte Byte; 52 short Short; 53 unsigned short UShort; 54 long Long; 55 unsigned long ULong; 56 hyper Hyper; 57 unsigned hyper UHyper; 58 float Float; 59 double Double; 60}; 61/** struct ComplexTypes adding Sequence, String, Interface, Any to SimpleTypes 62*/ 63published struct ComplexTypes : SimpleTypes 64{ 65 sequence< long > Sequence; 66 string String; 67 com::sun::star::uno::XInterface Interface; 68 any Any; 69}; 70 71/** A performance test object has to be implemented in a special way, that: 72 <ul> 73 <li>queryInterface() execution times remain (nearly) static</li> 74 <li>functions kept simple, thus there is (nearly) no execution time of the function itself</li> 75 <li>no dynamic data is ever returned except of createObject(), so return 0, empty strings etc.</li> 76 </ul> 77 The interface is divided into three sections: 78 <ul> 79 <li>measuring asynchron/ synchron calls</li> 80 <li>complex data calls with/out return value; in/out parameters</li> 81 <li>single data types like long, float, string etc.</li> 82 <li>method calls versa attribute calls</li> 83 <li>raising RuntimeException</li> 84 </ul> 85*/ 86published interface XPerformanceTest : com::sun::star::uno::XInterface 87{ 88 [oneway] void async(); 89 void sync(); 90 91 ComplexTypes complex_in( [in] ComplexTypes aVal ); 92 ComplexTypes complex_inout( [inout] ComplexTypes aVal ); 93 94 [oneway] void complex_oneway( [in] ComplexTypes aVal ); 95 void complex_noreturn( [in] ComplexTypes aVal ); 96 97 XPerformanceTest createObject(); 98 99 [attribute] long Long_attr; 100 [attribute] hyper Hyper_attr; 101 [attribute] float Float_attr; 102 [attribute] double Double_attr; 103 [attribute] string String_attr; 104 [attribute] com::sun::star::uno::XInterface Interface_attr; 105 [attribute] any Any_attr; 106 [attribute] sequence< com::sun::star::uno::XInterface > Sequence_attr; 107 [attribute] ComplexTypes Struct_attr; 108 109 long getLong(); 110 void setLong( [in] long n ); 111 hyper getHyper(); 112 void setHyper( [in] hyper n ); 113 float getFloat(); 114 void setFloat( [in] float f ); 115 double getDouble(); 116 void setDouble( [in] double f ); 117 string getString(); 118 void setString( [in] string s ); 119 com::sun::star::uno::XInterface getInterface(); 120 void setInterface( [in] com::sun::star::uno::XInterface x ); 121 any getAny(); 122 void setAny( [in] any a ); 123 sequence< com::sun::star::uno::XInterface > getSequence(); 124 void setSequence( [in] sequence< com::sun::star::uno::XInterface > seq ); 125 ComplexTypes getStruct(); 126 void setStruct( [in] ComplexTypes c ); 127 128 void raiseRuntimeException(); 129}; 130 131//============================================================================= 132 133}; 134}; 135}; 136}; 137}; 138 139#endif 140