1*408a4873SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*408a4873SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*408a4873SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*408a4873SAndrew Rist * distributed with this work for additional information 6*408a4873SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*408a4873SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*408a4873SAndrew Rist * "License"); you may not use this file except in compliance 9*408a4873SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*408a4873SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*408a4873SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*408a4873SAndrew Rist * software distributed under the License is distributed on an 15*408a4873SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*408a4873SAndrew Rist * KIND, either express or implied. See the License for the 17*408a4873SAndrew Rist * specific language governing permissions and limitations 18*408a4873SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*408a4873SAndrew Rist *************************************************************/ 21*408a4873SAndrew Rist 22*408a4873SAndrew Rist 23cdf0e10cSrcweir#ifndef __com_sun_star_test_performance_XPerformanceTest_idl__ 24cdf0e10cSrcweir#define __com_sun_star_test_performance_XPerformanceTest_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__ 27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir 30cdf0e10cSrcweirmodule com 31cdf0e10cSrcweir{ 32cdf0e10cSrcweirmodule sun 33cdf0e10cSrcweir{ 34cdf0e10cSrcweirmodule star 35cdf0e10cSrcweir{ 36cdf0e10cSrcweirmodule test 37cdf0e10cSrcweir{ 38cdf0e10cSrcweirmodule performance 39cdf0e10cSrcweir{ 40cdf0e10cSrcweir 41cdf0e10cSrcweir/** struct of simple types to be carried 42cdf0e10cSrcweir*/ 43cdf0e10cSrcweirpublished struct SimpleTypes 44cdf0e10cSrcweir{ 45cdf0e10cSrcweir boolean Bool; 46cdf0e10cSrcweir char Char; 47cdf0e10cSrcweir byte Byte; 48cdf0e10cSrcweir short Short; 49cdf0e10cSrcweir unsigned short UShort; 50cdf0e10cSrcweir long Long; 51cdf0e10cSrcweir unsigned long ULong; 52cdf0e10cSrcweir hyper Hyper; 53cdf0e10cSrcweir unsigned hyper UHyper; 54cdf0e10cSrcweir float Float; 55cdf0e10cSrcweir double Double; 56cdf0e10cSrcweir}; 57cdf0e10cSrcweir/** struct ComplexTypes adding Sequence, String, Interface, Any to SimpleTypes 58cdf0e10cSrcweir*/ 59cdf0e10cSrcweirpublished struct ComplexTypes : SimpleTypes 60cdf0e10cSrcweir{ 61cdf0e10cSrcweir sequence< long > Sequence; 62cdf0e10cSrcweir string String; 63cdf0e10cSrcweir com::sun::star::uno::XInterface Interface; 64cdf0e10cSrcweir any Any; 65cdf0e10cSrcweir}; 66cdf0e10cSrcweir 67cdf0e10cSrcweir/** A performance test object has to be implemented in a special way, that: 68cdf0e10cSrcweir <ul> 69cdf0e10cSrcweir <li>queryInterface() execution times remain (nearly) static</li> 70cdf0e10cSrcweir <li>functions kept simple, thus there is (nearly) no execution time of the function itself</li> 71cdf0e10cSrcweir <li>no dynamic data is ever returned except of createObject(), so return 0, empty strings etc.</li> 72cdf0e10cSrcweir </ul> 73cdf0e10cSrcweir The interface is divided into three sections: 74cdf0e10cSrcweir <ul> 75cdf0e10cSrcweir <li>measuring asynchron/ synchron calls</li> 76cdf0e10cSrcweir <li>complex data calls with/out return value; in/out parameters</li> 77cdf0e10cSrcweir <li>single data types like long, float, string etc.</li> 78cdf0e10cSrcweir <li>method calls versa attribute calls</li> 79cdf0e10cSrcweir <li>raising RuntimeException</li> 80cdf0e10cSrcweir </ul> 81cdf0e10cSrcweir*/ 82cdf0e10cSrcweirpublished interface XPerformanceTest : com::sun::star::uno::XInterface 83cdf0e10cSrcweir{ 84cdf0e10cSrcweir [oneway] void async(); 85cdf0e10cSrcweir void sync(); 86cdf0e10cSrcweir 87cdf0e10cSrcweir ComplexTypes complex_in( [in] ComplexTypes aVal ); 88cdf0e10cSrcweir ComplexTypes complex_inout( [inout] ComplexTypes aVal ); 89cdf0e10cSrcweir 90cdf0e10cSrcweir [oneway] void complex_oneway( [in] ComplexTypes aVal ); 91cdf0e10cSrcweir void complex_noreturn( [in] ComplexTypes aVal ); 92cdf0e10cSrcweir 93cdf0e10cSrcweir XPerformanceTest createObject(); 94cdf0e10cSrcweir 95cdf0e10cSrcweir [attribute] long Long_attr; 96cdf0e10cSrcweir [attribute] hyper Hyper_attr; 97cdf0e10cSrcweir [attribute] float Float_attr; 98cdf0e10cSrcweir [attribute] double Double_attr; 99cdf0e10cSrcweir [attribute] string String_attr; 100cdf0e10cSrcweir [attribute] com::sun::star::uno::XInterface Interface_attr; 101cdf0e10cSrcweir [attribute] any Any_attr; 102cdf0e10cSrcweir [attribute] sequence< com::sun::star::uno::XInterface > Sequence_attr; 103cdf0e10cSrcweir [attribute] ComplexTypes Struct_attr; 104cdf0e10cSrcweir 105cdf0e10cSrcweir long getLong(); 106cdf0e10cSrcweir void setLong( [in] long n ); 107cdf0e10cSrcweir hyper getHyper(); 108cdf0e10cSrcweir void setHyper( [in] hyper n ); 109cdf0e10cSrcweir float getFloat(); 110cdf0e10cSrcweir void setFloat( [in] float f ); 111cdf0e10cSrcweir double getDouble(); 112cdf0e10cSrcweir void setDouble( [in] double f ); 113cdf0e10cSrcweir string getString(); 114cdf0e10cSrcweir void setString( [in] string s ); 115cdf0e10cSrcweir com::sun::star::uno::XInterface getInterface(); 116cdf0e10cSrcweir void setInterface( [in] com::sun::star::uno::XInterface x ); 117cdf0e10cSrcweir any getAny(); 118cdf0e10cSrcweir void setAny( [in] any a ); 119cdf0e10cSrcweir sequence< com::sun::star::uno::XInterface > getSequence(); 120cdf0e10cSrcweir void setSequence( [in] sequence< com::sun::star::uno::XInterface > seq ); 121cdf0e10cSrcweir ComplexTypes getStruct(); 122cdf0e10cSrcweir void setStruct( [in] ComplexTypes c ); 123cdf0e10cSrcweir 124cdf0e10cSrcweir void raiseRuntimeException(); 125cdf0e10cSrcweir}; 126cdf0e10cSrcweir 127cdf0e10cSrcweir//============================================================================= 128cdf0e10cSrcweir 129cdf0e10cSrcweir}; 130cdf0e10cSrcweir}; 131cdf0e10cSrcweir}; 132cdf0e10cSrcweir}; 133cdf0e10cSrcweir}; 134cdf0e10cSrcweir 135cdf0e10cSrcweir#endif 136